|
|
@@ -99,6 +99,16 @@
|
|
|
<DatePickerPop v-model="formData.outDate"
|
|
|
:short-cut-flag="true"/>
|
|
|
</DkFormItem>
|
|
|
+ <!--自动出库标识-->
|
|
|
+ <DkFormItem prop="autoOutFlag" v-show="showAutoFlag">
|
|
|
+ <template>
|
|
|
+ <i-switch v-model="formData.flgAutoHandle" @on-change="changeOutStatus"
|
|
|
+ :disabled="type === $config.formMode.handle">
|
|
|
+ <span slot="open"></span>
|
|
|
+ <span slot="close"></span>
|
|
|
+ </i-switch>
|
|
|
+ </template>
|
|
|
+ </DkFormItem>
|
|
|
<!--单据备注-->
|
|
|
<DkFormItem prop="remarks">
|
|
|
<InputPop ref="remarks" v-model="formData.remarks"
|
|
|
@@ -154,7 +164,8 @@ export default {
|
|
|
data() {
|
|
|
let self = this
|
|
|
return {
|
|
|
- allCanNoEdit: false, //是否所有的都不允许编辑
|
|
|
+ showAutoFlag: true, //是否显示自动办理出库标识
|
|
|
+ showOutDate: true, //是否显示自动办理出库标识
|
|
|
currentRow: null,// 表格中的当前行
|
|
|
// 画面表单数据
|
|
|
formData: {
|
|
|
@@ -555,15 +566,30 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
/**
|
|
|
+ * @desc : 自动出库标识变更
|
|
|
+ * @author : 付斌
|
|
|
+ * @date : 2024-04-11 14:47
|
|
|
+ */
|
|
|
+ changeOutStatus() {
|
|
|
+ if (this.type === this.$config.formMode.addTogether) {
|
|
|
+ if (this.formData.flgAutoHandle) {
|
|
|
+ this.formData.outDate = new Date().format("yyyy-MM-dd")
|
|
|
+ this.showOutDate = true
|
|
|
+ } else {
|
|
|
+ this.formData.outDate = null
|
|
|
+ this.showOutDate = false
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.formData.outDate = new Date().format("yyyy-MM-dd")
|
|
|
+ }
|
|
|
+ },
|
|
|
+ /**
|
|
|
* @desc : 通过id查询
|
|
|
* @author : 付斌
|
|
|
* @date : 2022/03/04 13:17
|
|
|
*/
|
|
|
detail(id) {
|
|
|
- //如果是新建用订单ID,编辑、办理用出库单ID
|
|
|
- if (this.type === this.$config.formMode.add) {
|
|
|
- return this.excuteNoParam(this.$service.orderService, this.$service.orderService.getOrderForOut, [id]);
|
|
|
- } else if (this.type === this.$config.formMode.edit) {
|
|
|
+ if (this.type === this.$config.formMode.edit) {
|
|
|
return this.excuteNoParam(this.$service.orderOutService, this.$service.orderOutService.getOutboundForUpdate, [id]);
|
|
|
}
|
|
|
},
|
|
|
@@ -577,9 +603,16 @@ export default {
|
|
|
this.formData = data["data"];
|
|
|
this.formData.itemList = data["dataItem"];
|
|
|
|
|
|
- if (this.type === this.$config.formMode.add) {
|
|
|
+ if (this.type === this.$config.formMode.addTogether) {
|
|
|
this.goodsFootFormData.sumOutingQty = this.formData.sumQuantity;
|
|
|
this.goodsFootFormData.sumOutingAmt = this.formData.sumAmount;
|
|
|
+
|
|
|
+ //系统自动办理出库
|
|
|
+ if (this.$store.state.user.setting[this.$config.settingCode.IVT001] == 1) {
|
|
|
+ this.formData.flgAutoHandle = true;
|
|
|
+ } else {
|
|
|
+ this.formData.flgAutoHandle = false;
|
|
|
+ }
|
|
|
} else if (this.type === this.$config.formMode.edit) {
|
|
|
this.goodsFootFormData.sumOutingQty = this.formData.outingQty;
|
|
|
this.goodsFootFormData.sumOutingAmt = this.formData.outingAmt;
|
|
|
@@ -624,10 +657,6 @@ export default {
|
|
|
* @date : 2023/6/25 14:31
|
|
|
*/
|
|
|
setParams(arg) {
|
|
|
- if (this.type === this.$config.formMode.add) {
|
|
|
- this.formData.fromId = this.formData.orderId;
|
|
|
- this.formData.fromNo = this.formData.orderNo;
|
|
|
- }
|
|
|
this.formData.outingQty = this.goodsFootFormData.sumOutingQty;
|
|
|
this.formData.outingAmt = this.goodsFootFormData.sumOutingAmt;
|
|
|
let itemTable = this.$refs['goodsTable'].getTableDataFilter();
|
|
|
@@ -646,7 +675,7 @@ export default {
|
|
|
* @date : 2023/6/25 14:31
|
|
|
*/
|
|
|
saveData() {
|
|
|
- if (this.type === this.$config.formMode.add || this.type === this.$config.formMode.addTogether) {
|
|
|
+ if (this.type === this.$config.formMode.addTogether) {
|
|
|
return this.excute(this.$service.orderOutService, this.$service.orderOutService.outboundInsert, this.params);
|
|
|
} else if (this.type === this.$config.formMode.edit) {
|
|
|
return this.excute(this.$service.orderOutService, this.$service.orderOutService.outboundUpdate, this.params);
|
|
|
@@ -672,6 +701,14 @@ export default {
|
|
|
created() {
|
|
|
this.focusItem = 'outId'; // 给第一个组件赋值,可以在混入中自动去聚焦
|
|
|
this.primaryKey = 'outId' // 设置主键Id
|
|
|
+
|
|
|
+ //设置默认值
|
|
|
+ if (this.$route.params.id) {
|
|
|
+ // 出库办理
|
|
|
+ if (this.type === this.$config.formMode.handle) {
|
|
|
+ this.showAutoFlag = false;
|
|
|
+ }
|
|
|
+ }
|
|
|
},
|
|
|
}
|
|
|
</script>
|