8/22 工位优化

20240912_adapter_z
wangwei 11 months ago
parent 4d7d7f06a7
commit bdd47dc070

@ -228,10 +228,10 @@ export default {
{ required: true, message: '请选择异常方式提醒', trigger: 'blur' } { required: true, message: '请选择异常方式提醒', trigger: 'blur' }
], ],
corpType: [ corpType: [
{ required: true, message: '请选择往来单位类型', trigger: 'blur' } // { required: true, message: '', trigger: 'blur' }
], ],
unitTittle: [ unitTittle: [
{ required: true, message: '请输入往来类型标题', trigger: 'blur' } // { required: true, message: '', trigger: 'blur' }
], ],
} }
} }
@ -311,8 +311,8 @@ export default {
} }
}) })
} else { } else {
this.$refs['dataForm'].validate((valid) => { this.$refs['dataForm'].validate((rules) => {
if (valid){ if (rules){
addBusType(this.formData).then(res => { addBusType(this.formData).then(res => {
if (res.code == 20000) { if (res.code == 20000) {
this.$message.success('新增成功') this.$message.success('新增成功')
@ -332,6 +332,25 @@ export default {
}, },
hideForm() { hideForm() {
this.closeDialog() this.closeDialog()
},
// scanType
updateFormRules() {
if (this.formData.scanType === 1) {
// scanType1corpTypeunitTittle
this.$set(this.formRules.corpType, 0, { required: false });
this.$set(this.formRules.unitTittle, 0, { required: false });
} else {
//
this.$set(this.formRules.corpType, 0, { required: true, message: '请选择往来单位类型', trigger: 'blur' });
this.$set(this.formRules.unitTittle, 0, { required: true, message: '请输入往来类型标题', trigger: 'blur' });
}
},
},
watch: {
// scanType
'formData.scanType': function(newVal, oldVal) {
this.updateFormRules();
} }
}, },
created() { created() {

@ -42,8 +42,16 @@
style="display: flex; margin: 0px 0 15px 0; float: right" style="display: flex; margin: 0px 0 15px 0; float: right"
> >
<!--<el-button size="mini" type="primary" @click.native="saveOrder()" :loading="saveLoading"--> <!--<el-button size="mini" type="primary" @click.native="saveOrder()" :loading="saveLoading"-->
<!-- >草稿保存--> <!--&gt;草稿保存-->
<!--</el-button>--> <!--</el-button>-->
<el-button size="mini" type="primary" @click.native="chooseDraftOrder()" :loading="submitLoading"
v-if="splitType=='out'"style="margin-right: 8px;border-radius: 5%;"
>选入草稿单据
</el-button>
<el-button size="mini" type="primary" @click.native="draftOrder()" :loading="submitLoading"
v-if="splitType=='out'"style="margin-right: 8px;border-radius: 5%;"
>草稿保存
</el-button>
<el-button size="mini" type="primary" @click.native="submit()" :loading="submitLoading" <el-button size="mini" type="primary" @click.native="submit()" :loading="submitLoading"
v-if="splitType=='out'" style="margin-right: 8px;border-radius: 5%;" v-if="splitType=='out'" style="margin-right: 8px;border-radius: 5%;"
>上货完成 >上货完成
@ -252,6 +260,23 @@
></codesPanel> ></codesPanel>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
<el-dialog
title="选入草稿单据"
:visible.sync="chooseDraftOrderVisible"
width="80%"
append-to-body
:close-on-click-modal="false"
:close-on-press-escape="false"
v-if="chooseDraftOrderVisible"
>
<chooseDraftOrderDialog
:rowData="rowData"
:closeChooseDialog="closeChooseDialog"
:handleChoose="handleChoose"
>
</chooseDraftOrderDialog>
</el-dialog>
</div> </div>
</template> </template>
@ -287,6 +312,7 @@ import dialogInvProduct from "@/views/inout/DialogSelectInvProduct";
import {listPage} from "@/api/basic/workPlace/sysWorkplaceManage"; import {listPage} from "@/api/basic/workPlace/sysWorkplaceManage";
import {printSplitLabel} from "@/api/collect/splitCreateOrder"; import {printSplitLabel} from "@/api/collect/splitCreateOrder";
import {findInvRemind} from "@/api/inout/splitCode"; import {findInvRemind} from "@/api/inout/splitCode";
import chooseDraftOrderDialog from "./chooseDraftOrderDialog"
export default { export default {
name: "ioCreateOrder", name: "ioCreateOrder",
@ -480,6 +506,7 @@ export default {
// //
selectInvProductVisible: false, selectInvProductVisible: false,
chooseDraftOrderVisible: false,
invQueryData: { invQueryData: {
invCode: null, invCode: null,
}, },
@ -490,6 +517,7 @@ export default {
scanResultType: "success", scanResultType: "success",
msgTip: "当前工位存量提醒:", msgTip: "当前工位存量提醒:",
splitType: null, splitType: null,
rowData: {}
}; };
}, },
components: { components: {
@ -497,7 +525,7 @@ export default {
codeDetailPanel, codeDetailPanel,
editCodeDialog, editCodeDialog,
DialogCreateOrderSelect, DialogCreateOrderSelect,
DialogSelectUnit, DialogSelectSpace, selectRlDialog, dialogInvProduct DialogSelectUnit, DialogSelectSpace, selectRlDialog, dialogInvProduct,chooseDraftOrderDialog
}, },
methods: { methods: {
changeInvRemind(val) { changeInvRemind(val) {
@ -1415,11 +1443,29 @@ export default {
}); });
} }
}, },
saveOrder() { //稿
chooseDraftOrder(){
if (this.$isBlank(this.orderFormData.workPlaceCode)) {
this.$message.warning("请选择工位!");
return;
}
this.rowData.workPlaceCode = this.orderFormData.workPlaceCode
this.rowData.fifoSplit = this.orderFormData.fifoSplit
this.chooseDraftOrderVisible = true
},
closeChooseDialog(){
this.chooseDraftOrderVisible = false
},
handleChoose(billNo){
this.orderFormData.billNo = billNo
this.refreshCodesPanel();
},
draftOrder() {
let tQuery = Object.assign( let tQuery = Object.assign(
JSON.parse(JSON.stringify(this.orderFormData)) JSON.parse(JSON.stringify(this.orderFormData))
); );
tQuery.billNo = this.orderFormData.billNo; tQuery.billNo = this.orderFormData.billNo;
tQuery.orderType = 2;
console.log("tQuery:"); console.log("tQuery:");
console.log(tQuery); console.log(tQuery);
if (this.orderFormData.billNo == null) { if (this.orderFormData.billNo == null) {
@ -1427,12 +1473,12 @@ export default {
return; return;
} }
this.saveLoading = true this.saveLoading = true
saveOrderWeb(tQuery).then((response) => { saveOrderWeb(tQuery).then((response) => {
this.saveLoading = false this.saveLoading = false
if (response.code === 20000) { if (response.code === 20000) {
if (this.closeDialog != undefined) { this.$message.success("保存成功")
this.closeDialog(); this.successCloseData()
}
} else { } else {
this.$message.error(response.message); this.$message.error(response.message);
} }
@ -1440,7 +1486,6 @@ export default {
this.saveLoading = false this.saveLoading = false
}); });
}, },
// //
resetForm() { resetForm() {
if (this.$refs["dataForm"]) { if (this.$refs["dataForm"]) {

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save