add:新增出库任务
This commit is contained in:
@@ -247,11 +247,10 @@ export default {
|
||||
},
|
||||
|
||||
[CRUD.HOOK.beforeSubmit]() {
|
||||
debugger
|
||||
// 提交前校验
|
||||
if (this.tableData.length === 0) {
|
||||
this.crud.notify('请至少选择一条明细', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return true
|
||||
return false
|
||||
}
|
||||
this.form.item = this.tableData
|
||||
},
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
@change="crud.toQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.IOBILL_TYPE_IN"
|
||||
v-for="item in statusEnum.IOBILL_TYPE_IN"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
@@ -80,7 +80,7 @@
|
||||
@change="crud.toQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.FORM_STATUS"
|
||||
v-for="item in statusEnum.FORM_STATUS"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
@@ -144,12 +144,12 @@
|
||||
</el-table-column>
|
||||
<el-table-column prop="bill_type" label="业务类型">
|
||||
<template slot-scope="scope">
|
||||
{{ dict.label.IOBILL_TYPE_IN[scope.row.bill_type] }}
|
||||
{{ statusEnum.label.IOBILL_TYPE_IN[scope.row.bill_type] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="status" label="状态">
|
||||
<template slot-scope="scope">
|
||||
{{ dict.label.FORM_STATUS[scope.row.status] }}
|
||||
{{ statusEnum.label.FORM_STATUS[scope.row.status] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip prop="source_form_type" min-width="120" label="源单类型" />
|
||||
@@ -215,7 +215,7 @@ export default {
|
||||
},
|
||||
mixins: [presenter(), header(), crud()],
|
||||
// 数据字典
|
||||
dicts: [ 'FORM_STATUS','IOBILL_TYPE_IN' ],
|
||||
statusEnums: [ 'FORM_STATUS','IOBILL_TYPE_IN' ],
|
||||
data() {
|
||||
return {
|
||||
cols:[],
|
||||
@@ -280,7 +280,7 @@ export default {
|
||||
})
|
||||
},
|
||||
stateFormat(row, column) {
|
||||
return this.dict.label.IO_BILL_STATUS[row.bill_status]
|
||||
return this.statusEnum.label.IO_BILL_STATUS[row.bill_status]
|
||||
},
|
||||
divOpen() {
|
||||
crudProductIn.getIosInvDtl({ 'bill_code': this.currentRow.bill_code }).then(res => {
|
||||
@@ -347,7 +347,7 @@ export default {
|
||||
}
|
||||
},
|
||||
bill_typeFormat(row, column) {
|
||||
return this.dict.label.ST_INV_CP_IN_TYPE[row.bill_type]
|
||||
return this.statusEnum.label.ST_INV_CP_IN_TYPE[row.bill_type]
|
||||
},
|
||||
querytable() {
|
||||
this.onSelectAll()
|
||||
|
||||
@@ -232,7 +232,9 @@ export default {
|
||||
storlist: [],
|
||||
billtypelist: [],
|
||||
rules: {
|
||||
|
||||
bill_type: [
|
||||
{ required: true, message: '单据类型不能为空', trigger: 'blur' }
|
||||
],
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -276,11 +278,10 @@ export default {
|
||||
this.materShow = true
|
||||
},
|
||||
[CRUD.HOOK.beforeSubmit]() {
|
||||
debugger
|
||||
// 提交前校验
|
||||
if (this.tableData.length === 0) {
|
||||
this.crud.notify('请至少选择一条明细', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return true
|
||||
return false
|
||||
}
|
||||
this.form.item = this.tableData
|
||||
},
|
||||
|
||||
@@ -254,7 +254,7 @@ export default {
|
||||
this.tableData = res
|
||||
})
|
||||
})
|
||||
this.divdis(row)
|
||||
this.tabledis = []
|
||||
},
|
||||
divCancel() {
|
||||
if (!this.currentDtl) {
|
||||
@@ -266,7 +266,7 @@ export default {
|
||||
this.tableData = res
|
||||
})
|
||||
})
|
||||
this.divdis(row)
|
||||
this.tabledis = []
|
||||
},
|
||||
divdis(row){
|
||||
crudProductout.divDis(row).then(res => {
|
||||
|
||||
@@ -13,25 +13,6 @@
|
||||
<label slot="label">单 据 号:</label>
|
||||
<el-input v-model="form.code" disabled clearable style="width: 210px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="仓 库">
|
||||
<el-select
|
||||
style="width: 210px"
|
||||
v-model="form.product_code"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="全部"
|
||||
:disabled="true"
|
||||
class="filter-item"
|
||||
@change="crud.toQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.product_area"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="业务类型">
|
||||
<el-select
|
||||
v-model="form.bill_type"
|
||||
@@ -44,7 +25,7 @@
|
||||
class="filter-item"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.IOBILL_TYPE_OUT"
|
||||
v-for="item in statusEnum.IOBILL_TYPE_OUT"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
@@ -60,7 +41,7 @@
|
||||
disabled
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.FORM_STATUS"
|
||||
v-for="item in statusEnum.FORM_STATUS"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
@@ -138,19 +119,23 @@
|
||||
border
|
||||
:highlight-current-row="true"
|
||||
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||
@current-change="handleDisCurrentChange"
|
||||
>
|
||||
<el-table-column show-overflow-tooltip prop="vehicle_code" label="托盘号" align="center" />
|
||||
<el-table-column min-width="120" show-overflow-tooltip prop="material_code" label="物料编码" align="center" />
|
||||
<el-table-column min-width="120" show-overflow-tooltip prop="material_name" label="物料名称" align="center" />
|
||||
<el-table-column min-width="120" show-overflow-tooltip prop="material_spec" label="物料规格" align="center" />
|
||||
<el-table-column prop="pcsn" label="批次" align="center" width="150" />
|
||||
<el-table-column show-overflow-tooltip prop="vehicle_code" label="托盘号" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="bucketunique" label="箱号" align="center" />
|
||||
<el-table-column prop="plan_qty" :formatter="crud.formatNum3" label="数量" align="center" />
|
||||
<el-table-column prop="point_code1" label="起始位置" align="center" width="120"/>
|
||||
<el-table-column prop="point_code2" label="目的位置" align="center" width="120"/>
|
||||
<el-table-column prop="qty" :formatter="crud.formatNum3" label="数量" align="center" />
|
||||
<el-table-column min-width="120" show-overflow-tooltip prop="stor_code" label="仓库" align="center" />
|
||||
<el-table-column min-width="120" show-overflow-tooltip prop="struct_code" label="载具所在仓位" align="center" />
|
||||
<el-table-column prop="point_code1" label="任务起始位置" align="center" width="120"/>
|
||||
<el-table-column prop="point_code2" label="任务目的位置" align="center" width="120"/>
|
||||
<el-table-column prop="task_code" label="任务号" align="center" />
|
||||
<el-table-column prop="task_status" label="任务状态" align="center" :formatter="formatStatus"/>
|
||||
<el-table-column prop="task_status" label="任务状态">
|
||||
<template slot-scope="scope">
|
||||
{{ statusEnum.label.FORM_STATUS[scope.row.task_status] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="source_form_type" label="源单类型" align="center" width="150"/>
|
||||
<el-table-column show-overflow-tooltip prop="source_form_id" label="源单id" align="center" width="150"/>
|
||||
</el-table>
|
||||
@@ -168,7 +153,7 @@ export default {
|
||||
name: 'ViewDialog',
|
||||
components: { formstruc },
|
||||
mixins: [crud()],
|
||||
dicts: [ 'FORM_STATUS','IOBILL_TYPE_OUT' ],
|
||||
statusEnums: [ 'FORM_STATUS','IOBILL_TYPE_OUT' ],
|
||||
props: {
|
||||
dialogShow: {
|
||||
type: Boolean,
|
||||
@@ -221,15 +206,11 @@ export default {
|
||||
close() {
|
||||
this.dialogVisible = false
|
||||
},
|
||||
stateFormat(row, column) {
|
||||
return this.dict.label.FORM_STATUS[row.bill_status]
|
||||
},
|
||||
|
||||
handleDtlCurrentChange(current) {
|
||||
if (current !== null) {
|
||||
this.tabledis = []
|
||||
this.currentdtl = current
|
||||
this.queryTableDdis()
|
||||
this.divdis(this.currentdtl)
|
||||
} else {
|
||||
this.tabledis = []
|
||||
this.currentdtl = {}
|
||||
@@ -242,28 +223,15 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
handleDisCurrentChange(current) {
|
||||
this.currentDis = current
|
||||
},
|
||||
queryTableDtl(id) {
|
||||
crudProductIn.getIosInvDtl(id).then(res => {
|
||||
this.tableDtl = res
|
||||
})
|
||||
},
|
||||
queryTableDdis() {
|
||||
if (this.currentdtl !== null) {
|
||||
crudProductIn.getVehicleTask({ 'vehicle_code': this.currentdtl.vehicle_code }).then(res => {
|
||||
this.tabledis = res
|
||||
}).catch(() => {
|
||||
this.tabledis = []
|
||||
})
|
||||
}
|
||||
},
|
||||
formatStatus(row) {
|
||||
return this.dict.label.FORM_STATUS[row.task_status]
|
||||
},
|
||||
formatBaseType(row) {
|
||||
return this.dict.label.PCS_SAL_TYPE[row.base_bill_type]
|
||||
divdis(row){
|
||||
crudProductIn.divDis(row).then(res => {
|
||||
this.tabledis = res.content
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -154,8 +154,6 @@
|
||||
<udOperation
|
||||
:data="scope.row"
|
||||
:permission="permission"
|
||||
:disabled-edit="canUd(scope.row)"
|
||||
:disabled-dle="canUd(scope.row)"
|
||||
/>
|
||||
</template>-->
|
||||
</el-table-column>
|
||||
@@ -282,16 +280,22 @@ export default {
|
||||
},
|
||||
|
||||
taskOpen() {
|
||||
crudProductOut.getIosInvDtl({ 'bill_code': this.currentRow.bill_code }).then(res => {
|
||||
this.taskOpenParam = res
|
||||
if (!this.currentRow) {
|
||||
this.crud.notify('请选择一条单据', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
crudProductOut.taskOpen(this.currentRow ).then(res => {
|
||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
this.crud.toQuery()
|
||||
})
|
||||
this.taskShow = true
|
||||
},
|
||||
fun(val) {
|
||||
return Number(val).toFixed(3)
|
||||
},
|
||||
canUd(row) {
|
||||
return row.bill_status !== '10'
|
||||
handleCurrentChange(currentRow) {
|
||||
if (currentRow === null) {
|
||||
this.dis_flag = true
|
||||
this.confirm_flag = true
|
||||
this.task_flag = true
|
||||
this.currentRow = {}
|
||||
}
|
||||
},
|
||||
handleSelectionChange(val, row) {
|
||||
if (val.length > 1) {
|
||||
@@ -304,10 +308,6 @@ export default {
|
||||
this.handleCurrentChange(null)
|
||||
}
|
||||
},
|
||||
onSelectAll() {
|
||||
this.$refs.table.clearSelection()
|
||||
this.handleCurrentChange(null)
|
||||
},
|
||||
buttonChange(currentRow) {
|
||||
if (currentRow !== null) {
|
||||
this.currentRow = currentRow
|
||||
@@ -328,16 +328,9 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
handleCurrentChange(currentRow) {
|
||||
if (currentRow === null) {
|
||||
this.dis_flag = true
|
||||
this.confirm_flag = true
|
||||
this.task_flag = true
|
||||
this.currentRow = {}
|
||||
}
|
||||
},
|
||||
bill_typeFormat(row, column) {
|
||||
return this.dict.label.ST_outV_CP_out_TYPE[row.bill_type]
|
||||
onSelectAll() {
|
||||
this.$refs.table.clearSelection()
|
||||
this.handleCurrentChange(null)
|
||||
},
|
||||
querytable() {
|
||||
this.onSelectAll()
|
||||
|
||||
@@ -59,6 +59,13 @@ export function divDis(data) {
|
||||
data
|
||||
})
|
||||
}
|
||||
export function taskOpen(data) {
|
||||
return request({
|
||||
url: '/api/stIvtIostorinvOut/taskOpen',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
export default {
|
||||
add,
|
||||
edit,
|
||||
@@ -68,4 +75,5 @@ export default {
|
||||
outDecision,
|
||||
cancelDecision,
|
||||
divDis,
|
||||
taskOpen,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user