处理单据修改

yanshishuju
yewj 10 months ago
parent c140bdeadd
commit 93630730e1

@ -9,14 +9,17 @@
<el-form :model="formData" class="order-el-form" ref="formData" label-width="120px"> <el-form :model="formData" class="order-el-form" ref="formData" label-width="120px">
<el-col :span="18" style="margin-left: 0px"> <el-col :span="18" style="margin-left: 0px">
<span style="font-size: 14px;color: #909399">当前工位:&nbsp&nbsp&nbsp&nbsp<span style="font-size: 16px;color: #000000">{{this.formData.workplaceName}}</span> <span style="font-size: 14px;color: #909399">当前工位:&nbsp&nbsp&nbsp&nbsp<span
style="font-size: 16px;color: #000000">{{ this.formData.workplaceName }}</span>
&nbsp&nbsp&nbsp&nbsp &nbsp&nbsp&nbsp&nbsp
<!-- <span :style="{ color: formData.workplaceStatus === 0 ? 'green' : 'red' }"> ({{ formData.workplaceStatus === 0 ? '服务中' : '服务暂停' }} ) </span>--> <!-- <span :style="{ color: formData.workplaceStatus === 0 ? 'green' : 'red' }"> ({{ formData.workplaceStatus === 0 ? '服务中' : '服务暂停' }} ) </span>-->
<!-- <el-button type="primary" @click="toggleWorkplaceStatus" style="margin-left: 10px;" >切换状态</el-button>--> <!-- <el-button type="primary" @click="toggleWorkplaceStatus" style="margin-left: 10px;" >切换状态</el-button>-->
</span> </span>
<span style="font-size: 14px;color: #909399;margin-left: 20px">当前业务类型:&nbsp&nbsp&nbsp&nbsp<span style="font-size: 16px;color: #000000">{{this.formData.busName}}</span> <span style="font-size: 14px;color: #909399;margin-left: 20px">当前业务类型:&nbsp&nbsp&nbsp&nbsp<span
&nbsp&nbsp&nbsp&nbsp <el-button type="primary" icon="el-icon-sort" @click="toggleBusType" style="margin-left: 10px;" >切换业务</el-button> style="font-size: 16px;color: #000000">{{ this.formData.busName }}</span>
&nbsp&nbsp&nbsp&nbsp <el-button type="primary" icon="el-icon-sort" @click="toggleBusType"
style="margin-left: 10px;">切换业务</el-button>
<el-button type="danger" @click="closeAllTabs" style="margin-left: 10px;" v-if="this.showContextMenu"></el-button> <el-button type="danger" @click="closeAllTabs" style="margin-left: 10px;" v-if="this.showContextMenu"></el-button>
</span> </span>
@ -131,7 +134,8 @@
<!-- <li @click="closeAllTabs"></li>--> <!-- <li @click="closeAllTabs"></li>-->
<!-- </ul>--> <!-- </ul>-->
<div> <div>
<component v-if="showChild" :is="item.component" v-bind="item.componentProps" :reset-key="resetKeys[item.name]" @parent-method="parentMethod" <component v-if="showChild" :is="item.component" v-bind="item.componentProps"
:reset-key="resetKeys[item.name]" @parent-method="parentMethod"
style="margin-top: -14px"/> style="margin-top: -14px"/>
</div> </div>
</el-tab-pane> </el-tab-pane>
@ -605,6 +609,7 @@ export default {
vertical-align: middle; vertical-align: middle;
margin-left: 25px; margin-left: 25px;
} }
.context-menu { .context-menu {
zIndex: 100000; zIndex: 100000;
position: fixed; position: fixed;

@ -631,6 +631,7 @@ export default {
getInputFocus(event) { getInputFocus(event) {
event.currentTarget.select(); event.currentTarget.select();
``
}, },
//todo //todo
@ -640,8 +641,15 @@ export default {
this.enterBillNoKey() this.enterBillNoKey()
return; return;
} }
this.checkSuccess = true; this.checkSuccess = true;
this.filterQuery.code = this.scanCode; this.filterQuery.code = this.scanCode;
if (!this.parseString(this.filterQuery.code)) {
this.$refs.inputRef.focus();
this.$refs.inputRef.select();
this.$message.error("非法产品编码");
return;
}
let tQuery = { let tQuery = {
viewType: "tagCode", viewType: "tagCode",
workPlaceCode: this.workplaceId, workPlaceCode: this.workplaceId,
@ -658,7 +666,6 @@ export default {
this.filterQuery.code = response.data.code; this.filterQuery.code = response.data.code;
this.scanCode = "" this.scanCode = ""
this.originCode = "" this.originCode = ""
this.addCode(); this.addCode();
} else { } else {
if (response.code == 502) { if (response.code == 502) {
@ -1011,7 +1018,6 @@ export default {
}, },
startDeal() { startDeal() {
this.curRow = this.formData; this.curRow = this.formData;
this.dealSplitOrder() this.dealSplitOrder()
// //
@ -1021,6 +1027,7 @@ export default {
// this.refreshCodesPanel(this); // this.refreshCodesPanel(this);
this.$refs.inputRef.focus(); this.$refs.inputRef.focus();
}, },
selectTabsname(value) { selectTabsname(value) {
if (this.$isBlank(this.filterQuery.code) && this.busTypeList.length > 0) { if (this.$isBlank(this.filterQuery.code) && this.busTypeList.length > 0) {
let busType = this.busTypeList.find(item => item.documentTypeCode === value); let busType = this.busTypeList.find(item => item.documentTypeCode === value);
@ -1191,7 +1198,7 @@ export default {
this.$message.error(res.message) this.$message.error(res.message)
} }
}); });
this.scanCode = this.valiCodes.join(";"); // this.scanCode = this.valiCodes.join(";");
} }
} else { } else {
@ -1199,6 +1206,28 @@ export default {
} }
}); });
},
parseString(str) {
// 1. "MA"
if (str.startsWith("MA")) {
return true;
}
// 2. "01" 18
if (str.startsWith("01") && str.length >= 18) {
return true;
}
// 3. "#" "#" 4
if (str.startsWith("#") && (str.match(/#/g) || []).length >= 4) {
return true;
}
// 4. "8" 20
if (str.startsWith("8") && str.length === 20) {
return true;
}
// false
return false;
} }
}, },
mounted() { mounted() {

Loading…
Cancel
Save