|
@@ -70,7 +70,7 @@
|
|
|
<!-- 筛选条件 -->
|
|
|
<div class="table-page-search-wrapper">
|
|
|
<a-row :gutter="15">
|
|
|
- <a-col :span="18">
|
|
|
+ <a-col :span="19">
|
|
|
<a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
|
|
|
<a-row :gutter="15">
|
|
|
<a-col :md="8" :sm="24">
|
|
@@ -83,21 +83,21 @@
|
|
|
<ProductType id="inventoryCheckMakeInventoryList-productType" @change="changeProductType" v-model="productType"></ProductType>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
- <a-col :md="6" :sm="24" v-if="basicInfoData&&basicInfoData.warehouseFlag=='1'">
|
|
|
+ <a-col :md="5" :sm="24" v-if="basicInfoData&&basicInfoData.warehouseFlag=='1'">
|
|
|
<a-form-item label="仓库">
|
|
|
<a-select id="inventoryCheckMakeInventoryList-warehouseSn" allowClear placeholder="请选择仓库" v-model="queryParam.warehouseSn" >
|
|
|
<a-select-option v-for="item in warehouseList" :key="item.warehouseSn" :value="item.warehouseSn">{{ item.name }}</a-select-option>
|
|
|
</a-select>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
- <a-col :md="8" :sm="24" style="margin-bottom: 10px;">
|
|
|
+ <a-col :md="5" :sm="24" style="margin-bottom: 10px;">
|
|
|
<a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="inventoryCheckMakeInventoryList-refresh">查询</a-button>
|
|
|
<a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="inventoryCheckMakeInventoryList-reset">重置</a-button>
|
|
|
</a-col>
|
|
|
</a-row>
|
|
|
</a-form>
|
|
|
</a-col>
|
|
|
- <a-col :span="6">
|
|
|
+ <a-col :span="5">
|
|
|
<div style="float:right;overflow: hidden;">
|
|
|
<a-button size="small" type="primary" class="button-info" id="inventoryCheckMakeInventoryList-checkZero-btn" @click="handleCheckZero">整单盘零</a-button>
|
|
|
</div>
|
|
@@ -251,7 +251,7 @@ export default {
|
|
|
},
|
|
|
// 数量 blur
|
|
|
checkQtyBlur (val, record) {
|
|
|
- if (val != record.checkQtyBackups) {
|
|
|
+ if ((val != record.checkQtyBackups) || (!val && record.checkQtyBackups == 0)) {
|
|
|
this.handleAdd(record, 'edit')
|
|
|
}
|
|
|
},
|
|
@@ -284,7 +284,7 @@ export default {
|
|
|
}
|
|
|
if (isEdit) { // 编辑
|
|
|
// 清空数量时,值应保持未清空前的值,因数量都不可为空
|
|
|
- if (!row.checkQty) {
|
|
|
+ if (!(row.checkQty || row.checkQty == 0)) {
|
|
|
row.checkQty = row.checkQtyBackups
|
|
|
return
|
|
|
}
|
|
@@ -302,14 +302,22 @@ export default {
|
|
|
},
|
|
|
// 整单盘零
|
|
|
handleCheckZero () {
|
|
|
- this.spinning = true
|
|
|
- checkWarehouseCheckZero({ checkWarehouseSn: this.$route.params.sn }).then(res => {
|
|
|
- if (res.status == 200) {
|
|
|
- this.$message.success(res.message)
|
|
|
- this.$refs.table.refresh(true)
|
|
|
- this.spinning = false
|
|
|
- } else {
|
|
|
- this.spinning = false
|
|
|
+ const _this = this
|
|
|
+ this.$confirm({
|
|
|
+ title: '提示',
|
|
|
+ content: '确定要进行 整单盘零 操作吗?',
|
|
|
+ centered: true,
|
|
|
+ onOk () {
|
|
|
+ _this.spinning = true
|
|
|
+ checkWarehouseCheckZero({ checkWarehouseSn: _this.$route.params.sn }).then(res => {
|
|
|
+ if (res.status == 200) {
|
|
|
+ _this.$message.success(res.message)
|
|
|
+ _this.$refs.table.refresh(true)
|
|
|
+ _this.spinning = false
|
|
|
+ } else {
|
|
|
+ _this.spinning = false
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
})
|
|
|
},
|
|
@@ -320,10 +328,12 @@ export default {
|
|
|
// 查询基础信息
|
|
|
getDetail () {
|
|
|
checkWarehouseDetail({ sn: this.$route.params.sn }).then(res => {
|
|
|
- if (res.status == 200) {
|
|
|
- this.basicInfoData = res.data || null
|
|
|
+ if (res.status == 200 && res.data) {
|
|
|
+ this.basicInfoData = res.data
|
|
|
+ this.warehouseList = res.data.warehouseList || []
|
|
|
} else {
|
|
|
this.basicInfoData = null
|
|
|
+ this.warehouseList = []
|
|
|
}
|
|
|
})
|
|
|
},
|
|
@@ -343,16 +353,6 @@ export default {
|
|
|
this.queryParam.productTypeSn2 = val[1] ? val[1] : ''
|
|
|
this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
|
|
|
},
|
|
|
- // 仓库下拉数据
|
|
|
- getWarehouseList () {
|
|
|
- checkWarehouseWarehouse({}).then(res => {
|
|
|
- if (res.status == 200) {
|
|
|
- this.warehouseList = res.data
|
|
|
- } else {
|
|
|
- this.warehouseList = []
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
// 打印导出
|
|
|
handlePrint (type) {
|
|
|
if (type == 'export') {
|
|
@@ -426,7 +426,6 @@ export default {
|
|
|
beforeRouteEnter (to, from, next) {
|
|
|
next(vm => {
|
|
|
vm.getDetail()
|
|
|
- vm.getWarehouseList()
|
|
|
})
|
|
|
}
|
|
|
}
|