处理单据修改

yanshishuju
yewj 7 months ago
parent c140bdeadd
commit 93630730e1

@ -6,18 +6,21 @@
</el-col> </el-col>
<div> <div>
<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>
<el-button type="danger" @click="closeAllTabs" style="margin-left: 10px;" v-if="this.showContextMenu"></el-button> &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>
</span> </span>
</el-col> </el-col>
@ -56,22 +59,22 @@
<span>单据管理</span> <span>单据管理</span>
</template> </template>
<el-menu-item :index=0 @click="clickMenuItem(0)"> <el-menu-item :index=0 @click="clickMenuItem(0)">
<!-- <i class="el-icon-edit-outline"></i>--> <!-- <i class="el-icon-edit-outline"></i>-->
<span slot="title">处理单据</span> <span slot="title">处理单据</span>
</el-menu-item> </el-menu-item>
<el-menu-item :index=4 @click="clickMenuItem(4)"> <el-menu-item :index=4 @click="clickMenuItem(4)">
<!-- <i class="el-icon-s-order"></i>--> <!-- <i class="el-icon-s-order"></i>-->
<span slot="title">待处理单</span> <span slot="title">待处理单</span>
</el-menu-item> </el-menu-item>
<el-menu-item :index=5 @click="clickMenuItem(5)"> <el-menu-item :index=5 @click="clickMenuItem(5)">
<!-- <i class="el-icon-s-claim"></i>--> <!-- <i class="el-icon-s-claim"></i>-->
<span slot="title">已完成单</span> <span slot="title">已完成单</span>
</el-menu-item> </el-menu-item>
<el-menu-item :index=6 @click="clickMenuItem(6)"> <el-menu-item :index=6 @click="clickMenuItem(6)">
<!-- <i class="el-icon-upload"></i>--> <!-- <i class="el-icon-upload"></i>-->
<span slot="title">单据上传</span> <span slot="title">单据上传</span>
</el-menu-item> </el-menu-item>
</el-submenu> </el-submenu>
@ -81,18 +84,18 @@
<span>工位管理</span> <span>工位管理</span>
</template> </template>
<el-menu-item :index=1 @click="clickMenuItem(1)"> <el-menu-item :index=1 @click="clickMenuItem(1)">
<!-- <i class="el-icon-s-unfold"></i>--> <!-- <i class="el-icon-s-unfold"></i>-->
<span slot="title">工位上货</span> <span slot="title">工位上货</span>
</el-menu-item> </el-menu-item>
<el-menu-item :index=2 @click="clickMenuItem(2)"> <el-menu-item :index=2 @click="clickMenuItem(2)">
<!-- <i class="el-icon-s-fold"></i>--> <!-- <i class="el-icon-s-fold"></i>-->
<span slot="title">工位退货</span> <span slot="title">工位退货</span>
</el-menu-item> </el-menu-item>
<el-menu-item :index=3 @click="clickMenuItem(3)"> <el-menu-item :index=3 @click="clickMenuItem(3)">
<!-- <i class="el-icon-s-platform"></i>--> <!-- <i class="el-icon-s-platform"></i>-->
<span slot="title">工位库存</span> <span slot="title">工位库存</span>
</el-menu-item> </el-menu-item>
<el-menu-item :index=7 @click="clickMenuItem(7)"> <el-menu-item :index=7 @click="clickMenuItem(7)">
<!-- <i class="el-icon-s-help"></i>--> <!-- <i class="el-icon-s-help"></i>-->
<span slot="title">拆零管理</span> <span slot="title">拆零管理</span>
@ -118,7 +121,7 @@
<el-col :span="22"> <el-col :span="22">
<el-tabs v-model="editableTabsValue" type="card" closable @tab-remove="removeTab" <el-tabs v-model="editableTabsValue" type="card" closable @tab-remove="removeTab"
@tab-click="upodateMenuActive" @contextmenu.native.prevent="handleContextMenu"> @tab-click="upodateMenuActive" @contextmenu.native.prevent="handleContextMenu">
<el-tab-pane <el-tab-pane
v-for="(item, index) in editableTabs" v-for="(item, index) in editableTabs"
:key="item.name" :key="item.name"
@ -127,12 +130,13 @@
@contextmenu.stop.prevent="handleTabContextMenu($event, item)" @contextmenu.stop.prevent="handleTabContextMenu($event, item)"
style="background-color: white" style="background-color: white"
> >
<!-- <ul v-if="showContextMenu" class="context-menu" :style="contextMenuPosition">--> <!-- <ul v-if="showContextMenu" class="context-menu" :style="contextMenuPosition">-->
<!-- <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"
style="margin-top: -14px"/> :reset-key="resetKeys[item.name]" @parent-method="parentMethod"
style="margin-top: -14px"/>
</div> </div>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
@ -152,14 +156,14 @@
append-to-body append-to-body
> >
<el-row :gutter="24"> <el-row :gutter="24">
<el-col :span="24" style="display: flex; justify-content: flex-end;"> <el-col :span="24" style="display: flex; justify-content: flex-end;">
<el-button @click="toggleContent" type="primary" style="margin-right: 20px;"> <el-button @click="toggleContent" type="primary" style="margin-right: 20px;">
<span v-if="!isContentVisible"></span> <span v-if="!isContentVisible"></span>
<span v-if="isContentVisible"></span> <span v-if="isContentVisible"></span>
<i :class="{'el-icon-caret-right': !isContentVisible, 'el-icon-caret-bottom': isContentVisible}"> </i> <i :class="{'el-icon-caret-right': !isContentVisible, 'el-icon-caret-bottom': isContentVisible}"> </i>
<!-- 这里原本想用大括号图标但Font Awesome默认没有所以用了上下箭头代替 --> <!-- 这里原本想用大括号图标但Font Awesome默认没有所以用了上下箭头代替 -->
</el-button> </el-button>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
@ -216,7 +220,7 @@ import ioSplitFifoCode from '@/views/collect/ioSplitFifoCode.vue'
import CollectOrderUpload from '@/views/collect/CollectOrderUpload.vue' import CollectOrderUpload from '@/views/collect/CollectOrderUpload.vue'
import IoDestroyOrder from '@/views/collect/IoDestroyOrder.vue' import IoDestroyOrder from '@/views/collect/IoDestroyOrder.vue'
import IoSplitFifoRemind from '@/views/collect/IoSplitFifoRemind.vue' import IoSplitFifoRemind from '@/views/collect/IoSplitFifoRemind.vue'
import {listPage,switchWorkplaceStatus} from "@/api/basic/workPlace/sysWorkplaceManage"; import {listPage, switchWorkplaceStatus} from "@/api/basic/workPlace/sysWorkplaceManage";
import { import {
filterListByWorkplace, filterListByWorkplace,
getWorkBindBusTypes, getWorkBindBusTypes,
@ -239,7 +243,7 @@ export default {
return { return {
isContentVisible: false, // isContentVisible: false, //
showContextMenu: false, // showContextMenu: false, //
contextMenuPosition: { x: 0, y: 0 }, // contextMenuPosition: {x: 0, y: 0}, //
selectBusTypeDisabled: false, selectBusTypeDisabled: false,
selectBusTypeClosrrButDisabled: false, selectBusTypeClosrrButDisabled: false,
selectWorkplaceStatusDisabled: false, selectWorkplaceStatusDisabled: false,
@ -370,28 +374,28 @@ export default {
this.isContentVisible = !this.isContentVisible; this.isContentVisible = !this.isContentVisible;
// / // /
// todo 2024/09/09 // todo 2024/09/09
if (this.isContentVisible){ if (this.isContentVisible) {
this.busQuery.isPopular = 0 this.busQuery.isPopular = 0
}else { } else {
this.busQuery.isPopular = 1 this.busQuery.isPopular = 1
} }
this.getWorkBindBusTypes(this.formData.workplaceId) this.getWorkBindBusTypes(this.formData.workplaceId)
}, },
toggleWorkplaceStatus() { toggleWorkplaceStatus() {
if (this.formData.workplaceStatus == 0){ if (this.formData.workplaceStatus == 0) {
this.formData.workplaceStatus = 1 this.formData.workplaceStatus = 1
}else { } else {
this.formData.workplaceStatus = 0 this.formData.workplaceStatus = 0
} }
switchWorkplaceStatus(this.formData).then(resp => { switchWorkplaceStatus(this.formData).then(resp => {
if (resp.code == 20000){ if (resp.code == 20000) {
this.$message.success("切换成功!") this.$message.success("切换成功!")
}else { } else {
this.$message.error(resp.message) this.$message.error(resp.message)
if (this.formData.workplaceStatus == 0){ if (this.formData.workplaceStatus == 0) {
this.formData.workplaceStatus = 1 this.formData.workplaceStatus = 1
}else { } else {
this.formData.workplaceStatus = 0 this.formData.workplaceStatus = 0
} }
} }
@ -508,11 +512,11 @@ export default {
} }
listPage(query).then((res) => { listPage(query).then((res) => {
this.curWorkPlaces = res.data.list || []; this.curWorkPlaces = res.data.list || [];
if (this.$route.query.workplaceId != null){ if (this.$route.query.workplaceId != null) {
let item = this.curWorkPlaces.find(item => item.workplaceId == this.$route.query.workplaceId); let item = this.curWorkPlaces.find(item => item.workplaceId == this.$route.query.workplaceId);
this.formData.workplaceName = item.workplaceName this.formData.workplaceName = item.workplaceName
this.formData.workplaceStatus = item.workplaceStatus this.formData.workplaceStatus = item.workplaceStatus
} }
}) })
}, },
getWorkBindBusTypes(workplaceId) { getWorkBindBusTypes(workplaceId) {
@ -527,16 +531,16 @@ export default {
let busType = this.busTypeList.find(item => item.documentTypeCode == this.formData.busType) let busType = this.busTypeList.find(item => item.documentTypeCode == this.formData.busType)
this.formData.busName = busType.busName; this.formData.busName = busType.busName;
this.autoTag = busType.autoTag; this.autoTag = busType.autoTag;
}else if (this.busTypeList.length == 1) { } else if (this.busTypeList.length == 1) {
this.formData.busType = this.busTypeList[0].documentTypeCode this.formData.busType = this.busTypeList[0].documentTypeCode
this.autoTag = this.busTypeList[0].autoTag; this.autoTag = this.busTypeList[0].autoTag;
this.$router.push({query: {...this.$route.query, busType: this.formData.busType}, path: this.$route.path}) this.$router.push({query: {...this.$route.query, busType: this.formData.busType}, path: this.$route.path})
this.selectBusTypeDisabled = false this.selectBusTypeDisabled = false
this.formData.busName = this.busTypeList.find(item => item.documentTypeCode == this.formData.busType).busName; this.formData.busName = this.busTypeList.find(item => item.documentTypeCode == this.formData.busType).busName;
} else { } else {
this.selectBusTypeDisabled = true this.selectBusTypeDisabled = true
this.formData.busType = null this.formData.busType = null
} }
} }
return return
@ -605,9 +609,10 @@ 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;
list-style-type: none; list-style-type: none;
padding: 0; padding: 0;
margin: 0; margin: 0;

@ -354,7 +354,7 @@ import prescribeOriginPanel from "./PannelOrderBiz";
import prescribeCodePanel from "./PanelOrderTagCode"; import prescribeCodePanel from "./PanelOrderTagCode";
import PannelOrderBiz from "./PannelOrderBiz"; import PannelOrderBiz from "./PannelOrderBiz";
import {listPage} from "@/api/basic/workPlace/sysWorkplaceManage"; import {listPage} from "@/api/basic/workPlace/sysWorkplaceManage";
import {enterCodeWeb,batchVailCode,enterCodeBillNo} from "@/api/inout/order"; import {enterCodeWeb, batchVailCode, enterCodeBillNo} from "@/api/inout/order";
import {cancelOrder, draftOrder, finishOrder, startSplit, tagCode, updateOrder} from "@/api/collect/splitCreateOrder"; import {cancelOrder, draftOrder, finishOrder, startSplit, tagCode, updateOrder} from "@/api/collect/splitCreateOrder";
import {selectCorpList} from "@/api/basic/basicUnitMaintain"; import {selectCorpList} from "@/api/basic/basicUnitMaintain";
import {getCurOrder, getNextOrder, findByBill, findFromCorp} from "@/api/collect/collectOrder"; import {getCurOrder, getNextOrder, findByBill, findFromCorp} from "@/api/collect/collectOrder";
@ -631,17 +631,25 @@ export default {
getInputFocus(event) { getInputFocus(event) {
event.currentTarget.select(); event.currentTarget.select();
``
}, },
//todo //todo
enterKey() { enterKey() {
if (this.formData.billNo == null){ if (this.formData.billNo == null) {
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