组袋修改
This commit is contained in:
@@ -9,8 +9,8 @@
|
|||||||
<span class="filter_label">袋号</span>
|
<span class="filter_label">袋号</span>
|
||||||
</view>
|
</view>
|
||||||
<view class="zd-col-10">
|
<view class="zd-col-10">
|
||||||
<!-- <search-box v-model="val1"/> -->
|
<search-box v-model="val1" @handleChange="handleChange"/>
|
||||||
<input type="text" class="filter_input" v-model="val1" disabled>
|
<!-- <input type="text" class="filter_input" v-model="val1" disabled> -->
|
||||||
</view>
|
</view>
|
||||||
<button class="mini-btn" type="primary" @tap="_byBagCodeInfo">获取袋码</button>
|
<button class="mini-btn" type="primary" @tap="_byBagCodeInfo">获取袋码</button>
|
||||||
</view>
|
</view>
|
||||||
@@ -79,6 +79,17 @@
|
|||||||
<input type="number" v-model="num" class="filter_input">
|
<input type="number" v-model="num" class="filter_input">
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="zd-row border-bottom">
|
||||||
|
<view class="zd-col-6">
|
||||||
|
<span class="filter_label">有效期至</span>
|
||||||
|
</view>
|
||||||
|
<view class="zd-col-14 filter_picker">
|
||||||
|
<picker mode="date" :value="date" :start="startDate" :end="endDate" @change="bindDateChange">
|
||||||
|
<view class="uni-input">{{date}}</view>
|
||||||
|
</picker>
|
||||||
|
</view>
|
||||||
|
<button class="mini-btn" type="primary" @tap="bindDel">删除</button>
|
||||||
|
</view>
|
||||||
<view class="zd-row border-bottom">
|
<view class="zd-row border-bottom">
|
||||||
<view class="zd-col-6">
|
<view class="zd-col-6">
|
||||||
<span class="filter_label">计量单位</span>
|
<span class="filter_label">计量单位</span>
|
||||||
@@ -91,8 +102,8 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="zd-row submit-bar">
|
<view class="zd-row submit-bar">
|
||||||
<!-- <button class="zd-col-5 button-default" @tap="toEmpty">清空</button> -->
|
<!-- <button class="zd-col-5 button-default" @tap="toEmpty">清空</button> -->
|
||||||
<button class="zd-col-7 button-primary" :class="{'button-info': !val1 || !pcsn || !num || JSON.stringify(materialData) === '{}'}" :disabled="disabled" @tap="toZdPrint">组袋并打印</button>
|
<button class="zd-col-7 button-primary" :class="{'button-info': flag || !val1 || !pcsn || !num || JSON.stringify(materialData) === '{}'}" :disabled="disabled" @tap="toZdPrint">组袋并打印</button>
|
||||||
<button class="zd-col-7 button-primary" :class="{'button-info': !val1 || !pcsn || !num || JSON.stringify(materialData) === '{}'}" :disabled="disabled" @tap="_confirmBagAssembly">确认组袋</button>
|
<button class="zd-col-7 button-primary" :class="{'button-info': flag || !val1 || !pcsn || !num || JSON.stringify(materialData) === '{}'}" :disabled="disabled" @tap="_confirmBagAssembly">确认组袋</button>
|
||||||
<button class="zd-col-7 button-primary" :class="{'button-info': !val1 || !pcsn || !num || JSON.stringify(materialData) === '{}'}" :disabled="disabled1" @tap="labelPrint">标签打印</button>
|
<button class="zd-col-7 button-primary" :class="{'button-info': !val1 || !pcsn || !num || JSON.stringify(materialData) === '{}'}" :disabled="disabled1" @tap="labelPrint">标签打印</button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -103,14 +114,19 @@
|
|||||||
import NavBar from '@/components/NavBar.vue'
|
import NavBar from '@/components/NavBar.vue'
|
||||||
import SearchBox from '@/components/SearchBox.vue'
|
import SearchBox from '@/components/SearchBox.vue'
|
||||||
import {getDate} from '@/utils/utils.js'
|
import {getDate} from '@/utils/utils.js'
|
||||||
import {queryRecordNo, byBagCodeInfo, confirmBagAssembly, printBag} from '@/utils/getData3.js'
|
import {queryRecordNo, byBagCodeInfo, confirmBagAssembly, queryBagInfo, printBag} from '@/utils/getData3.js'
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
NavBar,
|
NavBar,
|
||||||
SearchBox
|
SearchBox
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
const currentDate = getDate({
|
||||||
|
format: true
|
||||||
|
})
|
||||||
return {
|
return {
|
||||||
|
nowDate: currentDate,
|
||||||
|
date: currentDate,
|
||||||
title: '',
|
title: '',
|
||||||
val1: '',
|
val1: '',
|
||||||
recordNo: '',
|
recordNo: '',
|
||||||
@@ -119,9 +135,19 @@
|
|||||||
unit: 'KG',
|
unit: 'KG',
|
||||||
disabled: false,
|
disabled: false,
|
||||||
disabled1: false,
|
disabled1: false,
|
||||||
pcsn: ''
|
pcsn: '',
|
||||||
|
flag: false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
startDate() {
|
||||||
|
return this.nowDate
|
||||||
|
// return getDate('start');
|
||||||
|
},
|
||||||
|
endDate() {
|
||||||
|
return getDate('end');
|
||||||
|
}
|
||||||
|
},
|
||||||
onLoad (options) {
|
onLoad (options) {
|
||||||
this.title = options.title
|
this.title = options.title
|
||||||
this._queryRecordNo()
|
this._queryRecordNo()
|
||||||
@@ -133,6 +159,36 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
bindDateChange: function(e) {
|
||||||
|
this.date = e.detail.value
|
||||||
|
},
|
||||||
|
bindDel () {
|
||||||
|
this.date = ''
|
||||||
|
},
|
||||||
|
handleChange (e) {
|
||||||
|
if (e) {
|
||||||
|
this._queryBagInfo(e)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async _queryBagInfo (e) {
|
||||||
|
try {
|
||||||
|
let res = await queryBagInfo(e)
|
||||||
|
if (res) {
|
||||||
|
this.materialData = res.data
|
||||||
|
this.pcsn = this.materialData.pcsn
|
||||||
|
this.num = this.materialData.qty
|
||||||
|
this.date = this.materialData.validity_period
|
||||||
|
// 调用此接口后并成功返回结构后,页面所有操作禁用,【标签打印】按钮可以正常使用。
|
||||||
|
this.flag = true
|
||||||
|
} else {
|
||||||
|
this.materialData = {}
|
||||||
|
this.flag = false
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
this.materialData = {}
|
||||||
|
this.flag = false
|
||||||
|
}
|
||||||
|
},
|
||||||
async _queryRecordNo () {
|
async _queryRecordNo () {
|
||||||
try {
|
try {
|
||||||
let res = await queryRecordNo()
|
let res = await queryRecordNo()
|
||||||
@@ -167,12 +223,15 @@
|
|||||||
this.disabled1 = false
|
this.disabled1 = false
|
||||||
},
|
},
|
||||||
toZdPrint () {
|
toZdPrint () {
|
||||||
|
if (this.flag) {
|
||||||
|
return
|
||||||
|
}
|
||||||
this._confirmBagAssembly()
|
this._confirmBagAssembly()
|
||||||
this.labelPrint()
|
this.labelPrint()
|
||||||
},
|
},
|
||||||
async _confirmBagAssembly () {
|
async _confirmBagAssembly () {
|
||||||
this.disabled = true
|
this.disabled = true
|
||||||
if (!this.val1 || !this.num || !this.pcsn || JSON.stringify(this.materialData) === '{}') {
|
if (this.flag || !this.val1 || !this.num || !this.pcsn || JSON.stringify(this.materialData) === '{}') {
|
||||||
this.disabled = false
|
this.disabled = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -202,6 +261,7 @@
|
|||||||
// },
|
// },
|
||||||
async labelPrint () {
|
async labelPrint () {
|
||||||
this.disabled1 = true
|
this.disabled1 = true
|
||||||
|
this.flag = false
|
||||||
if (!this.val1 || JSON.stringify(this.materialData) === '{}') {
|
if (!this.val1 || JSON.stringify(this.materialData) === '{}') {
|
||||||
this.disabled1 = false
|
this.disabled1 = false
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
<span class="filter_label">桶号</span>
|
<span class="filter_label">桶号</span>
|
||||||
</view>
|
</view>
|
||||||
<view class="zd-col-18">
|
<view class="zd-col-18">
|
||||||
<search-box v-model="val1"/>
|
<search-box v-model="val1" @handleChange="handleChange"/>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="zd-row border-bottom">
|
<view class="zd-row border-bottom">
|
||||||
@@ -74,8 +74,8 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="zd-row submit-bar">
|
<view class="zd-row submit-bar">
|
||||||
<!-- <button class="zd-col-5 button-default" @tap="toEmpty">清空</button> -->
|
<!-- <button class="zd-col-5 button-default" @tap="toEmpty">清空</button> -->
|
||||||
<button class="zd-col-7 button-primary" :class="{'button-info': !val1 || !weight || !pcsn || JSON.stringify(materialData) === '{}'}" :disabled="disabled" @tap="toZtPrint">组桶并打印</button>
|
<button class="zd-col-7 button-primary" :class="{'button-info': flag || !val1 || !weight || !pcsn || JSON.stringify(materialData) === '{}'}" :disabled="disabled" @tap="toZtPrint">组桶并打印</button>
|
||||||
<button class="zd-col-7 button-primary" :class="{'button-info': !val1 || !weight || !pcsn || JSON.stringify(materialData) === '{}'}" :disabled="disabled" @tap="_confirmBucketAssembly">确认组桶</button>
|
<button class="zd-col-7 button-primary" :class="{'button-info': flag || !val1 || !weight || !pcsn || JSON.stringify(materialData) === '{}'}" :disabled="disabled" @tap="_confirmBucketAssembly">确认组桶</button>
|
||||||
<button class="zd-col-7 button-primary" :class="{'button-info': !val1 || !weight || !pcsn || JSON.stringify(materialData) === '{}'}" :disabled="disabled1" @tap="labelPrint">标签打印</button>
|
<button class="zd-col-7 button-primary" :class="{'button-info': !val1 || !weight || !pcsn || JSON.stringify(materialData) === '{}'}" :disabled="disabled1" @tap="labelPrint">标签打印</button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -87,7 +87,7 @@
|
|||||||
import SearchBox from '@/components/SearchBox.vue'
|
import SearchBox from '@/components/SearchBox.vue'
|
||||||
import NumberInput from '@/components/NumberInput.vue'
|
import NumberInput from '@/components/NumberInput.vue'
|
||||||
import {getDate} from '@/utils/utils.js'
|
import {getDate} from '@/utils/utils.js'
|
||||||
import {queryRecordNoBucked, confirmBucketAssembly, printBucked} from '@/utils/getData3.js'
|
import {queryBuckInfo, queryRecordNoBucked, confirmBucketAssembly, printBucked} from '@/utils/getData3.js'
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
NavBar,
|
NavBar,
|
||||||
@@ -105,7 +105,8 @@
|
|||||||
unit: 'KG',
|
unit: 'KG',
|
||||||
disabled: false,
|
disabled: false,
|
||||||
disabled1: false,
|
disabled1: false,
|
||||||
pcsn: ''
|
pcsn: '',
|
||||||
|
flag: false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad (options) {
|
onLoad (options) {
|
||||||
@@ -119,6 +120,30 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleChange (e) {
|
||||||
|
if (e) {
|
||||||
|
this._queryBuckInfo(e)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async _queryBuckInfo (e) {
|
||||||
|
try {
|
||||||
|
let res = await queryBuckInfo(e)
|
||||||
|
if (res) {
|
||||||
|
this.materialData = res.data
|
||||||
|
this.pcsn = this.materialData.pcsn
|
||||||
|
this.weight = this.materialData.bucket_weight
|
||||||
|
this.num = this.materialData.qty
|
||||||
|
// 调用此接口后并成功返回结构后,页面所有操作禁用,【标签打印】按钮可以正常使用。
|
||||||
|
this.flag = true
|
||||||
|
} else {
|
||||||
|
this.materialData = {}
|
||||||
|
this.flag = false
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
this.materialData = {}
|
||||||
|
this.flag = false
|
||||||
|
}
|
||||||
|
},
|
||||||
async _queryRecordNoBucked () {
|
async _queryRecordNoBucked () {
|
||||||
try {
|
try {
|
||||||
let res = await queryRecordNoBucked()
|
let res = await queryRecordNoBucked()
|
||||||
@@ -144,12 +169,15 @@
|
|||||||
this.disabled1 = false
|
this.disabled1 = false
|
||||||
},
|
},
|
||||||
toZtPrint () {
|
toZtPrint () {
|
||||||
|
if (this.flag) {
|
||||||
|
return
|
||||||
|
}
|
||||||
this._confirmBucketAssembly()
|
this._confirmBucketAssembly()
|
||||||
this.labelPrint()
|
this.labelPrint()
|
||||||
},
|
},
|
||||||
async _confirmBucketAssembly () {
|
async _confirmBucketAssembly () {
|
||||||
this.disabled = true
|
this.disabled = true
|
||||||
if (!this.val1 || !this.weight || !this.pcsn || JSON.stringify(this.materialData) === '{}') {
|
if (this.flag || !this.val1 || !this.weight || !this.pcsn || JSON.stringify(this.materialData) === '{}') {
|
||||||
this.disabled = false
|
this.disabled = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -178,6 +206,7 @@
|
|||||||
// },
|
// },
|
||||||
async labelPrint () {
|
async labelPrint () {
|
||||||
this.disabled1 = true
|
this.disabled1 = true
|
||||||
|
this.flag = false
|
||||||
if (!this.val1 || JSON.stringify(this.materialData) === '{}' || JSON.stringify(this.suppData) === '{}') {
|
if (!this.val1 || JSON.stringify(this.materialData) === '{}' || JSON.stringify(this.suppData) === '{}') {
|
||||||
this.disabled1 = false
|
this.disabled1 = false
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -158,6 +158,11 @@ export const printBag = (row, printId) => request({
|
|||||||
url:'api/print/printBag',
|
url:'api/print/printBag',
|
||||||
data: {row: row, print_id: printId}
|
data: {row: row, print_id: printId}
|
||||||
})
|
})
|
||||||
|
// 根据扫袋码查询组袋信息
|
||||||
|
export const queryBagInfo = (bagNo) => request({
|
||||||
|
url:'api/pdaCommon/queryBagInfo',
|
||||||
|
data: {bagNo: bagNo}
|
||||||
|
})
|
||||||
|
|
||||||
// 物料组盘
|
// 物料组盘
|
||||||
// 获取组盘信息
|
// 获取组盘信息
|
||||||
@@ -187,6 +192,12 @@ export const printBucked = (row, printId) => request({
|
|||||||
url:'api/print/printBucked',
|
url:'api/print/printBucked',
|
||||||
data: {row: row, print_id: printId}
|
data: {row: row, print_id: printId}
|
||||||
})
|
})
|
||||||
|
// 根据扫桶码获取组桶信息
|
||||||
|
export const queryBuckInfo = (bcode) => request({
|
||||||
|
url:'api/pdaCommon/queryBuckInfo',
|
||||||
|
data: {bucket_code: bcode}
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 仓储管理
|
* 仓储管理
|
||||||
|
|||||||
Reference in New Issue
Block a user