diff --git a/src/api/wmsManagement/wmOutOrder.js b/src/api/wmsManagement/wmOutOrder.js index 6ad6b24..28d84d7 100644 --- a/src/api/wmsManagement/wmOutOrder.js +++ b/src/api/wmsManagement/wmOutOrder.js @@ -68,9 +68,10 @@ export function getCustomList() { /** * 根据条件获取出库单物料列表信息 */ -export function getMaterialList() { +export function getMaterialList(params) { return request({ url: '/mes/wm/WmOutOrder/getmaterial_list', - method: 'get' + method: 'get', + params }) } \ No newline at end of file diff --git a/src/views/qualityManagement/FQC/thirtyFQC.vue b/src/views/qualityManagement/FQC/thirtyFQC.vue index ed82efc..8478081 100644 --- a/src/views/qualityManagement/FQC/thirtyFQC.vue +++ b/src/views/qualityManagement/FQC/thirtyFQC.vue @@ -552,7 +552,7 @@ created() { this.initMqtt(); this.getcurrentWorkorder() - this.startTimer() + // this.startTimer() }, mounted() {}, diff --git a/src/views/wmsManagement/WmOutOrder.vue b/src/views/wmsManagement/WmOutOrder.vue index 654f29b..d1d2dbd 100644 --- a/src/views/wmsManagement/WmOutOrder.vue +++ b/src/views/wmsManagement/WmOutOrder.vue @@ -84,14 +84,14 @@ - + - 出库中 - 出库完成 - 弃用 + 出库中 + 出库完成 + 弃用 - + 启用 停用 @@ -99,21 +99,29 @@ - {{ scope.row.year + '-' + scope.row.week + '-' + scope.row.date }} + {{ scope.row.year + '-' + scope.row.week + '-' + scope.row.date }} - + + @@ -144,17 +151,17 @@ - + - + - + @@ -162,7 +169,13 @@ - + - + - + - + @@ -193,12 +206,12 @@ - + - - + + - - + + {{ item.dictLabel }} @@ -222,14 +235,22 @@ - 添加物料 - 添加物料 + 批量删除 - + - + - + @@ -252,21 +273,22 @@ + >删除此物料 @@ -313,7 +335,7 @@ export default { form: { status: 1, type: 1, - materialDataList: [], + materialList: [], }, // 缓存记录数据 columns: [ @@ -422,8 +444,11 @@ export default { createdTime: undefined, updatedBy: undefined, updatedTime: undefined, - materialDataList: [], + materialList: [], } + // this.customOptions = [] + this.selectCustomInfo = null + this.materialIds = [] this.resetForm('form') }, // 重置查询操作 @@ -483,7 +508,7 @@ export default { const { code, data } = res if (code == 200) { this.open = true - this.title = '修改出库单数据' + this.title = '编辑出库单数据' this.opertype = 2 this.form = { @@ -511,24 +536,28 @@ export default { // 出库单物料表多选框选中数据 handleMaterialSelectionChange(selection) { this.materialIds = selection.map((item) => item.id) + console.log(this.materialIds) // this.single = selection.length != 1 // this.multiple = !selection.length }, // 删除某项 handlerDeleteMaterial(ids = null) { + let that = this const Ids = ids || this.materialIds + console.log(that.form, Ids) this.$confirm('是否确认移除数据项?') - .then(function () { - const list = JSON.parse(JSON.stringify(this.form.materialDataList)) + .then(() => { + const list = JSON.parse(JSON.stringify(that.form.materialList)) const len = list.length for (let index = 0; index < len; index++) { - if (Ids.includes(list[index])) { - this.form.materialDataList.splice(index, 1) + console.log(list[index].id, list, len) + if (Ids.includes(list[index].id)) { + that.form.materialList.splice(index, 1) } } }) .then(() => { - this.msgSuccess('删除成功') + that.msgSuccess('删除成功') }) }, // 打开物料选择弹窗 @@ -536,8 +565,19 @@ export default { this.TheChouseMaterialDialogVisible = true }, // 物料已选择 - handlerMaterialChoused(list){ - this.form.materialDataList = list; + handlerMaterialChoused(list) { + //TODO 需要筛选未选择的 + console.log('handlerMaterialChoused', list,this.form) + const _list = JSON.parse(JSON.stringify(list)) + for (let index = 0; index < _list.length; index++) { + console.log('push',_list[index],this.form); + this.form.materialList.push(_list[index]) + } + }, + // 打印出库单 + handlePrint(row) { + console.log(row) + this.$message('打印出库单功能待完善!') }, // ==================================================== /** 提交按钮 */ @@ -545,7 +585,7 @@ export default { this.$refs['form'].validate((valid) => { if (valid) { console.log(JSON.stringify(this.form)) - + console.log('add', this.form) if (this.form.shipmentNum != undefined && this.opertype === 2) { updateWmOutOrder(this.form) .then((res) => { @@ -557,14 +597,28 @@ export default { //TODO 错误逻辑 }) } else { + console.log('addWmOutOrder') + // const postData = { + // customNo: 'BBBB', + // customName: 'BBB', + // customAddress: 'BBB', + // remarks: '123', + // type: 1, + // status: 1, + // year: '123', + // week: '1231', + // date: '231123', + // } addWmOutOrder(this.form) .then((res) => { + console.log('addWmOutOrder', res) this.msgSuccess('新增成功') this.open = false this.getList() }) .catch((err) => { //TODO 错误逻辑 + console.log('addWmOutOrder', err) }) } } diff --git a/src/views/wmsManagement/components/TheChouseMaterial/TheChouseMaterial.vue b/src/views/wmsManagement/components/TheChouseMaterial/TheChouseMaterial.vue index 73ed575..8efaae7 100644 --- a/src/views/wmsManagement/components/TheChouseMaterial/TheChouseMaterial.vue +++ b/src/views/wmsManagement/components/TheChouseMaterial/TheChouseMaterial.vue @@ -16,7 +16,7 @@ 搜索 - 添加物料 + 添加物料 @@ -35,7 +35,7 @@ - + 取消 - 确定 @@ -105,8 +104,18 @@ export default { this.$emit('update:visible', false) }, handelConfirm() { - this.$emit('materialChoused', this.selectList) - this.close() + let that = this; + const list = JSON.parse(JSON.stringify(this.selectList)) + const len = list.length + this.$confirm('是否确认添加所选' + len + '项?') + .then(function () { + that.$emit('materialChoused', list) + that.msgSuccess('添加成功!') + }) + .then(() => { + that.close() + }) + // this.$refs['elForm'].validate((valid) => { // if (!valid) return // this.close() @@ -122,7 +131,8 @@ export default { const data = this.queryParams getMaterialList(data).then((res) => { if (res.code === 200) { - this.dataList = res.data + this.dataList = res.data.item1 + this.total = res.data.item2 this.loading = false } })