|
|
@ -25,7 +25,7 @@ |
|
|
|
> |
|
|
|
</tablePagination> |
|
|
|
<!-- 新增与编辑 --> |
|
|
|
<newAndEdiDialog |
|
|
|
<!-- <newAndEdiDialog |
|
|
|
:loading="Loading.newAndEdiLoading" |
|
|
|
:active="active" |
|
|
|
:pageStatus="pageStatus" |
|
|
@ -40,7 +40,7 @@ |
|
|
|
@FormSubmit="FormClick(arguments)" |
|
|
|
@close="FormClose" |
|
|
|
@goBack="goBack" |
|
|
|
></newAndEdiDialog> |
|
|
|
></newAndEdiDialog> --> |
|
|
|
<!-- 新导入 disabledMethod 导入方式禁用 disabledIsAllowPartImport 是否局部导入禁用--> |
|
|
|
<!-- methodValue 导入方式默认选项 是否局部导入 默认选项 --> |
|
|
|
<importFile |
|
|
@ -93,11 +93,11 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
//按钮显示 |
|
|
|
hideButton: function () { |
|
|
|
return function () { |
|
|
|
return this.propsData.isActive |
|
|
|
} |
|
|
|
}, |
|
|
|
// hideButton: function () { |
|
|
|
// return function () { |
|
|
|
// return this.propsData.isActive |
|
|
|
// } |
|
|
|
// }, |
|
|
|
}, |
|
|
|
data () { |
|
|
|
return { |
|
|
@ -111,136 +111,136 @@ export default { |
|
|
|
this.defaultFilterBtn(),//筛选 |
|
|
|
], |
|
|
|
DrawerButtonData: [ |
|
|
|
{ |
|
|
|
type: 'success', |
|
|
|
icon: 'el-icon-check', |
|
|
|
label: '启用', |
|
|
|
hide: () => { return this.hideButton() }, |
|
|
|
name: "active", |
|
|
|
size: 'mini' |
|
|
|
}, |
|
|
|
// { |
|
|
|
// type: 'success', |
|
|
|
// icon: 'el-icon-check', |
|
|
|
// label: '启用', |
|
|
|
// hide: () => { return this.hideButton() }, |
|
|
|
// name: "active", |
|
|
|
// size: 'mini' |
|
|
|
// }, |
|
|
|
], |
|
|
|
//编辑 |
|
|
|
editFormData: { |
|
|
|
id: null, |
|
|
|
itemCode: null, |
|
|
|
itemName: null, |
|
|
|
itemDesc1: null, |
|
|
|
itemDesc2: null, |
|
|
|
produceDate: null, |
|
|
|
expireDate: null, |
|
|
|
locationCode: null, |
|
|
|
status: 1, |
|
|
|
lot: true, |
|
|
|
packingCode: true, |
|
|
|
containerCode: null, |
|
|
|
qty: null, |
|
|
|
locationArea: null, |
|
|
|
locationGroup: null, |
|
|
|
locationErpCode: null, |
|
|
|
putInTime: null, |
|
|
|
}, |
|
|
|
editOptions: {}, |
|
|
|
CreateForm: [ |
|
|
|
{ type: "input", label: "箱标签", prop: 'packingCode', colSpan: 12 }, |
|
|
|
{ type: "input", label: "排序依次", prop: 'sortingBase', colSpan: 12 }, |
|
|
|
{ type: "input", label: "序号", prop: 'serialNumber', colSpan: 12 }, |
|
|
|
{ type: "input", label: "最后盘点计划", prop: 'lastCountPlanNumber', colSpan: 12 }, |
|
|
|
{ type: "input", label: "最后盘点标签", prop: 'lastCountLabel', colSpan: 12 }, |
|
|
|
{ type: "input", label: "物品代码", prop: 'itemCode', colSpan: 12 }, |
|
|
|
{ type: "input", label: "批次编号", prop: 'batchCode', colSpan: 12 }, |
|
|
|
{ type: "input", label: "备注", prop: 'remark', colSpan: 12 }, |
|
|
|
], |
|
|
|
editForm: [ |
|
|
|
{ type: "input", label: "物品代码", prop: "itemCode", disabled:true, colSpan: 12 }, |
|
|
|
{ type: "input", label: "物品名称", prop: "itemName", disabled:true, colSpan: 12 }, |
|
|
|
{ type: "input", label: "库位代码", prop: "locationCode", disabled:true, colSpan: 12 }, |
|
|
|
{ type: "input", label: "批次", prop: "lot", disabled:true, colSpan: 12 }, |
|
|
|
{ type: "input", label: "箱标签", prop: "packingCode", disabled:true, colSpan: 12 }, |
|
|
|
{ type: "input", label: "库区", prop: "locationArea", disabled:true, colSpan: 12 }, |
|
|
|
{ type: "input", label: "库位组", prop: "locationGroup", disabled:true, colSpan: 12 }, |
|
|
|
{ type: "dateTime", label: "入库时间", prop: "putInTime", disabled:true, colSpan: 12 }, |
|
|
|
{ type: "dateTime", label: "生产日期", prop: "produceDate", disabled:true, colSpan: 12 }, |
|
|
|
{ type: "dateTime", label: "过期日期", prop: "expireDate", colSpan: 12 }, |
|
|
|
], |
|
|
|
editRules: { |
|
|
|
expireDate: [{ required: true, trigger: "blur", message: "不可为空" }], |
|
|
|
}, |
|
|
|
// editFormData: { |
|
|
|
// id: null, |
|
|
|
// itemCode: null, |
|
|
|
// itemName: null, |
|
|
|
// itemDesc1: null, |
|
|
|
// itemDesc2: null, |
|
|
|
// produceDate: null, |
|
|
|
// expireDate: null, |
|
|
|
// locationCode: null, |
|
|
|
// status: 1, |
|
|
|
// lot: true, |
|
|
|
// packingCode: true, |
|
|
|
// containerCode: null, |
|
|
|
// qty: null, |
|
|
|
// locationArea: null, |
|
|
|
// locationGroup: null, |
|
|
|
// locationErpCode: null, |
|
|
|
// putInTime: null, |
|
|
|
// }, |
|
|
|
// editOptions: {}, |
|
|
|
// CreateForm: [ |
|
|
|
// { type: "input", label: "箱标签", prop: 'packingCode', colSpan: 12 }, |
|
|
|
// { type: "input", label: "排序依次", prop: 'sortingBase', colSpan: 12 }, |
|
|
|
// { type: "input", label: "序号", prop: 'serialNumber', colSpan: 12 }, |
|
|
|
// { type: "input", label: "最后盘点计划", prop: 'lastCountPlanNumber', colSpan: 12 }, |
|
|
|
// { type: "input", label: "最后盘点标签", prop: 'lastCountLabel', colSpan: 12 }, |
|
|
|
// { type: "input", label: "物品代码", prop: 'itemCode', colSpan: 12 }, |
|
|
|
// { type: "input", label: "批次编号", prop: 'batchCode', colSpan: 12 }, |
|
|
|
// { type: "input", label: "备注", prop: 'remark', colSpan: 12 }, |
|
|
|
// ], |
|
|
|
// editForm: [ |
|
|
|
// { type: "input", label: "物品代码", prop: "itemCode", disabled:true, colSpan: 12 }, |
|
|
|
// { type: "input", label: "物品名称", prop: "itemName", disabled:true, colSpan: 12 }, |
|
|
|
// { type: "input", label: "库位代码", prop: "locationCode", disabled:true, colSpan: 12 }, |
|
|
|
// { type: "input", label: "批次", prop: "lot", disabled:true, colSpan: 12 }, |
|
|
|
// { type: "input", label: "箱标签", prop: "packingCode", disabled:true, colSpan: 12 }, |
|
|
|
// { type: "input", label: "库区", prop: "locationArea", disabled:true, colSpan: 12 }, |
|
|
|
// { type: "input", label: "库位组", prop: "locationGroup", disabled:true, colSpan: 12 }, |
|
|
|
// { type: "dateTime", label: "入库时间", prop: "putInTime", disabled:true, colSpan: 12 }, |
|
|
|
// { type: "dateTime", label: "生产日期", prop: "produceDate", disabled:true, colSpan: 12 }, |
|
|
|
// { type: "dateTime", label: "过期日期", prop: "expireDate", colSpan: 12 }, |
|
|
|
// ], |
|
|
|
// editRules: { |
|
|
|
// expireDate: [{ required: true, trigger: "blur", message: "不可为空" }], |
|
|
|
// }, |
|
|
|
}; |
|
|
|
}, |
|
|
|
mounted () { |
|
|
|
this.paging(); |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
drawerbutton(val){ |
|
|
|
// 启用 |
|
|
|
if(val == "active"){ |
|
|
|
this.$confirm('此操作将启用该数据, 是否继续?', '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
this.Loading.appMainLoading = true |
|
|
|
inventoryBalanceActive(this.propsData.id).then(res => { |
|
|
|
this.$successMsg('启用成功!') |
|
|
|
this.Loading.appMainLoading = false |
|
|
|
this.displayDialog.detailsDialog = false |
|
|
|
this.paging() |
|
|
|
// getDetailed(this.propsData.id, this.URL).then(res => { |
|
|
|
// this.propsData = res |
|
|
|
// this.Loading.DrawerLoading = false |
|
|
|
// drawerbutton(val){ |
|
|
|
// // 启用 |
|
|
|
// if(val == "active"){ |
|
|
|
// this.$confirm('此操作将启用该数据, 是否继续?', '提示', { |
|
|
|
// confirmButtonText: '确定', |
|
|
|
// cancelButtonText: '取消', |
|
|
|
// type: 'warning' |
|
|
|
// }).then(() => { |
|
|
|
// this.Loading.appMainLoading = true |
|
|
|
// inventoryBalanceActive(this.propsData.id).then(res => { |
|
|
|
// this.$successMsg('启用成功!') |
|
|
|
// this.Loading.appMainLoading = false |
|
|
|
// this.displayDialog.detailsDialog = false |
|
|
|
// this.paging() |
|
|
|
// // getDetailed(this.propsData.id, this.URL).then(res => { |
|
|
|
// // this.propsData = res |
|
|
|
// // this.Loading.DrawerLoading = false |
|
|
|
// // }) |
|
|
|
// }).catch(err => { |
|
|
|
// this.Loading.appMainLoading = false |
|
|
|
// }) |
|
|
|
}).catch(err => { |
|
|
|
this.Loading.appMainLoading = false |
|
|
|
}) |
|
|
|
}).catch((err) => { |
|
|
|
console.log(err) |
|
|
|
}); |
|
|
|
} |
|
|
|
}, |
|
|
|
// }).catch((err) => { |
|
|
|
// console.log(err) |
|
|
|
// }); |
|
|
|
// } |
|
|
|
// }, |
|
|
|
//抽屉下拉按钮操作 库存余额删除 只能删除库存数量为0的记录 |
|
|
|
drawerHandle(val) { |
|
|
|
if (val == 'delete') { |
|
|
|
if (this.propsData.qty == '0') { |
|
|
|
this.$confirm('此操作将永久删除该消息, 是否继续?', '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
this.Loading.appMainLoading = true |
|
|
|
this.displayDialog.detailsDialog = false |
|
|
|
postDelete(this.propsData.id, this.URL).then(res => { |
|
|
|
this.$successMsg('删除成功!') |
|
|
|
this.Loading.appMainLoading = false |
|
|
|
this.paging() |
|
|
|
}).catch(err => { |
|
|
|
this.Loading.appMainLoading = false |
|
|
|
}) |
|
|
|
}).catch(() => { |
|
|
|
}); |
|
|
|
} else { |
|
|
|
this.$message({ |
|
|
|
message: "只能删除库存数量为 0 的记录!!", |
|
|
|
type: "warning", |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
// drawerHandle(val) { |
|
|
|
// if (val == 'delete') { |
|
|
|
// if (this.propsData.qty == '0') { |
|
|
|
// this.$confirm('此操作将永久删除该消息, 是否继续?', '提示', { |
|
|
|
// confirmButtonText: '确定', |
|
|
|
// cancelButtonText: '取消', |
|
|
|
// type: 'warning' |
|
|
|
// }).then(() => { |
|
|
|
// this.Loading.appMainLoading = true |
|
|
|
// this.displayDialog.detailsDialog = false |
|
|
|
// postDelete(this.propsData.id, this.URL).then(res => { |
|
|
|
// this.$successMsg('删除成功!') |
|
|
|
// this.Loading.appMainLoading = false |
|
|
|
// this.paging() |
|
|
|
// }).catch(err => { |
|
|
|
// this.Loading.appMainLoading = false |
|
|
|
// }) |
|
|
|
// }).catch(() => { |
|
|
|
// }); |
|
|
|
// } else { |
|
|
|
// this.$message({ |
|
|
|
// message: "只能删除库存数量为 0 的记录!!", |
|
|
|
// type: "warning", |
|
|
|
// }); |
|
|
|
// } |
|
|
|
// } |
|
|
|
// }, |
|
|
|
//点击表单提交(新增或编辑) |
|
|
|
FormClick (val) { |
|
|
|
let params = { |
|
|
|
id: this.editFormData.id, |
|
|
|
expireDate: this.editFormData.expireDate |
|
|
|
} |
|
|
|
updateExpireDate(params, this.URL).then( res => { |
|
|
|
this.displayDialog.editDialog = false |
|
|
|
this.$message.success("修改成功!"); |
|
|
|
this.paging(); |
|
|
|
}).catch( err => { |
|
|
|
this.$message.success("修改失败!"); |
|
|
|
console.log(err) |
|
|
|
}) |
|
|
|
} |
|
|
|
// FormClick (val) { |
|
|
|
// let params = { |
|
|
|
// id: this.editFormData.id, |
|
|
|
// expireDate: this.editFormData.expireDate |
|
|
|
// } |
|
|
|
// updateExpireDate(params, this.URL).then( res => { |
|
|
|
// this.displayDialog.editDialog = false |
|
|
|
// this.$message.success("修改成功!"); |
|
|
|
// this.paging(); |
|
|
|
// }).catch( err => { |
|
|
|
// this.$message.success("修改失败!"); |
|
|
|
// console.log(err) |
|
|
|
// }) |
|
|
|
// } |
|
|
|
}, |
|
|
|
}; |
|
|
|
</script> |
|
|
|