This commit is contained in:
2022-12-29 13:53:01 +08:00
10 changed files with 220 additions and 42 deletions

View File

@@ -220,18 +220,21 @@
@selection-change="crud.selectionChangeHandler"
>
<el-table-column type="selection" width="55" />
<el-table-column type="index" label="序号" width="50" align="center" />
<el-table-column show-overflow-tooltip prop="is_upload" label="是否回传" :formatter="formatIsUpload" />
<el-table-column show-overflow-tooltip prop="upload_mes" label="回传MES" :formatter="formatUploadMes" />
<el-table-column show-overflow-tooltip prop="upload_sap" label="回传SAP" :formatter="formatUploadSap" />
<!-- <el-table-column type="index" label="序号" width="50" align="center" />-->
<el-table-column show-overflow-tooltip prop="is_upload" label="是否回传" :formatter="formatIsUpload" width="80" />
<el-table-column show-overflow-tooltip prop="upload_mes" label="回传MES" :formatter="formatUploadMes" width="80" />
<el-table-column show-overflow-tooltip prop="upload_sap" label="回传SAP" :formatter="formatUploadSap" width="80" />
<el-table-column show-overflow-tooltip prop="bill_code" width="130" label="单据号">
<template slot-scope="scope">
<el-link type="warning" @click="toView(scope.$index, scope.row)">{{ scope.row.bill_code }}</el-link>
</template>
</el-table-column>
<el-table-column prop="stor_name" label="仓库" width="100" />
<el-table-column min-width="130" show-overflow-tooltip prop="bill_type" :formatter="bill_typeFormat" label="业务类型" />
<el-table-column show-overflow-tooltip width="135" prop="biz_date" label="业务日期" />
<el-table-column min-width="100" show-overflow-tooltip prop="bill_type" :formatter="bill_typeFormat" label="业务类型" />
<el-table-column show-overflow-tooltip width="100" prop="biz_date" label="业务日期" />
<el-table-column show-overflow-tooltip width="100" prop="vbeln" label="交货单" />
<el-table-column prop="total_qty" label="总重量" width="100" :formatter="crud.formatNum3" />
<el-table-column show-overflow-tooltip prop="remark" label="备注" width="100" />
<el-table-column
show-overflow-tooltip
:formatter="create_modeFormat"
@@ -240,8 +243,6 @@
width="100"
/>
<el-table-column label="明细数" align="center" prop="detail_count" width="100" />
<el-table-column prop="total_qty" label="总重量" width="100" :formatter="crud.formatNum3" />
<el-table-column show-overflow-tooltip prop="remark" label="备注" width="100" />
<el-table-column prop="input_optname" label="制单人" width="100" />
<el-table-column show-overflow-tooltip prop="input_time" label="制单时间" width="150" />
<el-table-column prop="update_optname" label="修改人" width="100" />

View File

@@ -304,7 +304,7 @@ export default {
rowmst: {
handler(newValue, oldValue) {
this.mstrow = newValue
this.mstrow.stor_id = ''
// this.mstrow.stor_id = ''
}
}
},
@@ -447,20 +447,20 @@ export default {
}
},
allDiv() {
if (!this.mstrow.sect_id) {
this.crud.notify('请先选择库区!', CRUD.NOTIFICATION_TYPE.INFO)
return
}
// if (!this.mstrow.sect_id) {
// this.crud.notify('请先选择库区!', CRUD.NOTIFICATION_TYPE.INFO)
// return
// }
checkoutbill.allDiv(this.mstrow).then(res => {
this.crud.notify('分配成功!', CRUD.NOTIFICATION_TYPE.INFO)
this.queryTableDtl()
})
},
oneDiv() {
if (!this.mstrow.sect_id) {
this.crud.notify('请先选择库区!', CRUD.NOTIFICATION_TYPE.INFO)
return
}
// if (!this.mstrow.sect_id) {
// this.crud.notify('请先选择库区!', CRUD.NOTIFICATION_TYPE.INFO)
// return
// }
if (this.currentRow.iostorinvdtl_id !== null) {
this.mstrow.iostorinvdtl_id = this.currentRow.iostorinvdtl_id
checkoutbill.allDivOne(this.mstrow).then(res => {
@@ -496,7 +496,6 @@ export default {
// 根据此仓位的 ‘相同块、相同排、相同层’ 判断上一个任务是否生成
const tab = this.tabledis
for (let i = 0; i < tab.length; i++) {
debugger
const item = tab[i]
if (this.currentDis.block_num === item.block_num && this.currentDis.row_num === item.row_num && this.currentDis.layer_num === item.layer_num) {
const out_order_seq = parseInt(this.currentDis.out_order_seq) - 1
@@ -529,7 +528,6 @@ export default {
})
},
cellStyle({ row, column, rowIndex, columnIndex }) {
debugger
const assign_qty = parseFloat(row.assign_qty)
const plan_qty = parseFloat(row.plan_qty)

View File

@@ -231,11 +231,20 @@ export default {
this.queryrow.unassign_qty = parseFloat(this.queryrow.unassign_qty) - parseFloat(row.canuse_qty)
this.queryrow.assign_qty = parseFloat(this.queryrow.assign_qty) + parseFloat(row.canuse_qty)
} else {
this.queryrow.unassign_qty = parseFloat(this.queryrow.unassign_qty) + parseFloat(row.canuse_qty)
if (this.queryrow.unassign_qty > this.goal_unassign_qty){
this.queryrow.assign_qty = parseFloat(this.queryrow.assign_qty) - parseFloat(row.canuse_qty)
// 如果待分配重量等于0则 明细重量 - 已分配重量
if (parseInt(this.queryrow.unassign_qty) === 0) {
this.queryrow.unassign_qty = parseFloat(this.goal_unassign_qty) - parseFloat(this.queryrow.assign_qty)
} else {
this.queryrow.unassign_qty = parseFloat(this.queryrow.unassign_qty) + parseFloat(row.canuse_qty)
}
if (this.queryrow.unassign_qty > this.goal_unassign_qty) {
this.queryrow.unassign_qty = JSON.parse(JSON.stringify(this.goal_unassign_qty))
}
this.queryrow.assign_qty = parseFloat(this.queryrow.assign_qty) - parseFloat(row.canuse_qty)
// 如果已分配汇总量 > 明细重量 则待分配重量为0
if (this.queryrow.assign_qty > this.goal_unassign_qty) {
this.queryrow.unassign_qty = parseFloat('0')
}
}
this.tableDtl.splice(index, 1, row) // 通过splice 替换数据 触发视图更新
},

View File

@@ -128,6 +128,23 @@
@keyup.enter.native="crud.toQuery"
/>
</el-form-item>
<el-form-item label="是否回传">
<el-select
v-model="query.is_upload"
clearable
size="mini"
placeholder="是否回传"
class="filter-item"
@change="crud.toQuery"
>
<el-option
v-for="item in dict.is_upload"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="创建时间">
<el-date-picker
v-model="query.createTime"
@@ -228,16 +245,17 @@
<el-link type="warning" @click="toView(scope.$index, scope.row)">{{ scope.row.bill_code }}</el-link>
</template>
</el-table-column>
<el-table-column show-overflow-tooltip :formatter="stateFormat" width="100" prop="bill_status" label="单据状态" />
<el-table-column prop="stor_name" label="仓库" width="100" />
<el-table-column show-overflow-tooltip :formatter="stateFormat" width="80" prop="bill_status" label="单据状态" />
<el-table-column show-overflow-tooltip prop="stor_name" label="仓库" width="80" />
<el-table-column show-overflow-tooltip prop="bill_type" :formatter="bill_typeFormat" label="业务类型" />
<el-table-column show-overflow-tooltip width="135" prop="biz_date" label="业务日期" />
<el-table-column show-overflow-tooltip :formatter="create_modeFormat" prop="create_mode" label="生成方式" width="100" />
<el-table-column label="明细数" align="center" prop="detail_count" width="100" />
<el-table-column label="总重量" align="center" prop="total_qty" width="100" />
<el-table-column show-overflow-tooltip width="100" prop="biz_date" label="业务日期" />
<el-table-column show-overflow-tooltip label="明细数" align="center" prop="detail_count" width="60" />
<el-table-column show-overflow-tooltip label="总重量" align="center" prop="total_qty" width="100" />
<el-table-column show-overflow-tooltip label="客户" align="center" prop="cust_simple_name" width="100" />
<el-table-column show-overflow-tooltip label="客户编码" align="center" prop="cust_code" width="100" />
<el-table-column show-overflow-tooltip label="交货单号" align="center" prop="vbeln" width="100" />
<el-table-column show-overflow-tooltip label="是否回传" align="center" prop="is_upload" width="80" :formatter="formatIsUpload"/>
<el-table-column show-overflow-tooltip :formatter="create_modeFormat" prop="create_mode" label="生成方式" width="100" />
<el-table-column show-overflow-tooltip label="备注" align="center" prop="remark" width="100" />
<el-table-column show-overflow-tooltip label="制单人" align="center" prop="input_optname" />
<el-table-column show-overflow-tooltip label="制单时间" align="center" prop="input_time" width="140" />
@@ -290,7 +308,7 @@ export default {
},
mixins: [presenter(), header(), crud()],
// 数据字典
dicts: ['io_bill_status', 'ST_CREATE_MODE', 'ST_INV_OUT_TYPE'],
dicts: ['io_bill_status', 'ST_CREATE_MODE', 'ST_INV_OUT_TYPE', 'is_upload'],
data() {
return {
height: document.documentElement.clientHeight - 180 + 'px;',
@@ -424,6 +442,13 @@ export default {
this.openParamMoney = row
this.openMoneyDialog = true
},
formatIsUpload(row) {
if (row.is_upload === '0') {
return '否'
} else if (row.is_upload === '1') {
return '是'
}
},
printExcel(jo) {
if (jo.shd_dtl_num === '') {
return this.crud.notify('客户为空!', CRUD.NOTIFICATION_TYPE.INFO)