工位上货相关调整

20240912_adapter
yewj 6 months ago
parent 364fec7ded
commit 46dd7ab5e4

@ -62,68 +62,6 @@
</el-button-group>
</el-row>
<el-row v-if="false">
<el-col :span="11">
<el-form-item prop="corpOrderId" class="query-form-item" label="单据号:">
<el-input
v-model="orderFormData.corpOrderId"
auto-complete="off"
style="width: 90%"
clearable
:disabled="true"
></el-input>
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item prop="createTime" class="query-form-item" label="单据时间:">
<el-date-picker
v-model="orderFormData.createTime"
type="datetime"
placeholder="日期"
clearable
value-format="yyyy-MM-dd HH:mm:ss"
:disabled="true"
style="width: 90%"
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item prop="invCode" class="query-form-item" label="当前仓库:">
<el-select
v-model="orderFormData.invCode"
placeholder="当前仓库"
style="width: 90%"
:disabled="corpOrderIdDisabled || viewTypeKsck"
@change="changeInv"
filterable
>
<el-option
v-for="item in curInvOptions"
:key="item.name"
:label="item.name"
:value="item.code"
>
<span style="float: left">{{ item.name }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{
item.warehouseName
}}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item prop="remark" class="query-form-item" label="单据备注:">
<el-input
v-model="orderFormData.remark"
auto-complete="off"
clearable
style="width: 90%"
placeholder="请输入备注信息"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="6" v-if="!isLinkDisabled">
<el-form-item prop="workPlaceCode" class="query-form-item" label="当前工位:">
@ -354,8 +292,15 @@ import {
submitOrderWeb,
saveOrderWeb,
deleteByOrderId,
enterCodeWeb, submitAllocateBiz, rollbackWaitcheck, submitCodeResult, submitCheckResult, delmitBiz,
batchVailCode, batchAddCode, batchAddCodeByOrderFinish, upProcessing, getProcessingOrder
enterCodeWeb,
submitAllocateBiz,
rollbackWaitcheck,
submitCodeResult,
submitCheckResult,
batchVailCode,
batchAddCode,
batchAddCodeByOrderFinish,
upProcessing
} from '@/api/inout/order'
import {filterSubAll, findByFrom, findInvByUser} from '@/api/system/invSubWarehouse'
import {parseTime} from '@/utils/coTools'
@ -384,6 +329,33 @@ import {getWorkBindBusTypes} from '@/api/basic/workPlace/sysWorkplaceDocuments'
import {filterWorkOptimize} from '@/api/basic/workPlace/sysWorkplaceManage'
import {getByCode} from "@/api/basic/workPlace/SysWorkplaceQueue";
//
const SCAN_TIMEOUT = 1000
const ACTION_TYPES = {
BIZ: 'biz',
CODES: 'codes'
}
//
const utils = {
isValidJson(str) {
try {
JSON.parse(str)
return true
} catch (e) {
return false
}
}
}
//
const errorHandler = {
handle(error) {
console.error(error)
this.$message.error(error.message)
}
}
export default {
name: 'ioCreateOrder',
props: {
@ -417,11 +389,6 @@ export default {
type: Object,
required: true
},
splitBusType: {//
type: Object,
default: null,
required: true
},
dialogTitle: {//
type: Object,
@ -450,8 +417,9 @@ export default {
},
data() {
return {
queueStatus: null, // 1: 0:
queueStatus: null,
busTypeList: [],
splitBusType: null,
busQuery: {
busKey: '',
workplaceCode: null,
@ -762,39 +730,11 @@ export default {
this.orderFormData.curSpaceCode = false
this.orderFormData.checkPreInSpaceCode = false
this.orderFormData.preCurSpaceCode = false
this.getBusTypeByInv()
this.findCurSpaceList(row)
this.orderFormData.workPlaceCode = null
this.findCurWorkPlaces()
},
//,
getBusTypeByInv() {
let query = {
code: this.orderFormData.invCode,
editType: 2 //
}
if (this.viewTypeKsck) {
query = {
code: this.orderFormData.invCode,
editType: 2, //
useDyCount: 2 //
}
}
findByInvUser(query)
.then((response) => {
this.busTypeOptions = response.data || []
if (this.splitBusType != null) {
this.orderFormData.action = this.splitBusType
} else if (this.busTypeOptions.length == 1) {
this.orderFormData.action = this.busTypeOptions[0].action
this.actionChange(this.orderFormData.action)
}
})
.catch(() => {
})
},
//
closeDialogtwo() {
this.selectorder = false
@ -923,85 +863,6 @@ export default {
})
},
//
actionChange(item) {
this.orderFormData.checkPreInOption = null
if (!this.viewTypeKsck) {
this.orderFormData.checkPreInOrders = null
this.checkPreInArray = []
}
this.curAction = this.getActionItem(item)
if ((this.curAction.checkEnable && this.curAction.checkWebNew != 0) || this.viewType == 1) {
// 1
this.bizShow = true
} else {
this.bizShow = false
}
if (
this.curAction.corpType == 0 ||
this.curAction.corpType == 2 ||
this.curAction.corpType == 4 ||
(this.curAction.corpType == 1 && !this.curAction.genUnit)
) {
//1.
this.orderFormData.fromCorp = null
this.delorderData()
this.findMethod()
} else if (this.curAction.corpType == 3) {
//2.
this.orderFormData.fromInvCode = null
this.findFromInvList()
}
if (this.curAction.scanPreIn && this.curAction.backPreinType == 1 && this.curAction.preInBack) {
this.documentShow = true
} else if (this.curAction.scanPreIn && this.curAction.backPreinType == 2 && this.curAction.preInBack) {
this.preInSpaceShow = true
this.findPreInInvList()
} else {
this.documentShow = false
this.preInSpaceShow = false
}
if (this.curAction.vailPrescribe != null && this.curAction.vailPrescribe) {
this.viewSickVisible = true
} else {
this.viewSickVisible = false
}
if (this.curAction.scanPreIn && this.curAction.spaceOut == 1) {
this.preInSpaceShow = true
this.curSpaceShow = false
this.preSpaceShow = false
this.orderFormData.curSpaceCode = null
this.orderFormData.checkPreInSpaceCode = null
this.orderFormData.preCurSpaceCode = null
this.findPreInSpaceList()
} else if (this.curAction.advancePreIn && this.curAction.spaceOut == 1) {
this.preInSpaceShow = false
this.curSpaceShow = false
this.preSpaceShow = true
this.orderFormData.curSpaceCode = null
this.orderFormData.checkPreInSpaceCode = null
this.orderFormData.preCurSpaceCode = null
this.findPreSpaceList()
} else if (this.curAction.spaceOut == 1) {
this.curSpaceShow = true
this.preInSpaceShow = false
this.preSpaceShow = false
this.orderFormData.curSpaceCode = null
this.orderFormData.checkPreInSpaceCode = null
this.orderFormData.preCurSpaceCode = null
} else {
this.curSpaceShow = false
this.preInSpaceShow = false
this.preSpaceShow = false
this.orderFormData.curSpaceCode = null
this.orderFormData.checkPreInSpaceCode = null
this.orderFormData.preCurSpaceCode = null
}
},
//
findFromInvList(val) {
@ -1165,6 +1026,8 @@ export default {
this.$message.warning('请选择单据类型!')
return
}
console.log(this.curAction)
console.log(this.splitBusType)
if (this.splitBusType != null) {
this.orderFormData.fromCorp = '72198012799726'
}
@ -2140,8 +2003,10 @@ export default {
if (this.splitType == 'search') {
} else if (this.splitType == 'out') {
this.orderFormData.action = 'SC72197936495755'
this.getBusType();
} else if (this.splitType == 'return') {
this.orderFormData.action = 'SC72249388338364'
this.getBusType();
}
this.orderFormData.fromCorp = '72198012799726'
@ -2159,7 +2024,7 @@ export default {
this.curAction = {}
this.refreshCodesPanel()
this.findInvListByUser()
this.initBusType()
// this.initBusType()
this.findFromInvList()
// this.getWorkBindBusTypes(null);
} else {
@ -2302,6 +2167,23 @@ export default {
}
})
},
getBusType() {
let query = {
action: this.orderFormData.action,
page: 1,
limit: 10
}
getBusTypeList(query)
.then((response) => {
this.busTypes = response.data.list || []
this.splitBusType = this.busTypes[0].busType
console.log('==busTypes==', this.busTypes)
})
.catch(() => {
})
},
handleScanComplete(fullScanData) {
if (this.queueStatus == "1" && !this.orderFormData.workPlaceQueueCode) {
if (fullScanData != null && fullScanData[0].includes("DMQ")) {

Loading…
Cancel
Save