feat(wms-h):单据创建1.1
This commit is contained in:
parent
fdacfd0579
commit
1579cd59e3
@ -129,3 +129,11 @@ export function validateImport(obj) {
|
||||
data: obj
|
||||
})
|
||||
}
|
||||
|
||||
export function selectShopOrderInfo(obj) {
|
||||
return request({
|
||||
url: '/mom-wms/document/selectShopOrderInfo/page',
|
||||
method: 'get',
|
||||
data: obj
|
||||
})
|
||||
}
|
||||
|
||||
@ -94,13 +94,13 @@
|
||||
移除选定项
|
||||
</el-button>
|
||||
<el-button @click="doSave" v-if="wms_document_add"
|
||||
:disabled="documentType === 'STOR_REQUEST' || documentType === 'ME_RETURN_SLIP'">保存
|
||||
:disabled="isDisabled(documentType)">保存
|
||||
</el-button>
|
||||
<el-button @click="submit" v-if="wms_document_sub"
|
||||
:disabled="documentType === 'STOR_REQUEST' || documentType === 'ME_RETURN_SLIP'">提交
|
||||
:disabled="isDisabled(documentType)">提交
|
||||
</el-button>
|
||||
<el-button @click="cancel" v-if="wms_document_cel"
|
||||
:disabled="documentType === 'STOR_REQUEST' || documentType === 'ME_RETURN_SLIP'">取消
|
||||
:disabled="isDisabled(documentType)">取消
|
||||
</el-button>
|
||||
<el-button @click="reject" v-if="wms_document_rej">拒收</el-button>
|
||||
</el-col>
|
||||
@ -120,7 +120,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="单据号" align="center" prop="documentNo" :show-overflow-tooltip="true">
|
||||
</el-table-column>
|
||||
<el-table-column label="单据状态" align="center" prop="state" :show-overflow-tooltip="true" width="100">
|
||||
<el-table-column label="单据状态" align="center" prop="state" :show-overflow-tooltip="true" width="50">
|
||||
<template slot-scope="scope">
|
||||
<span>
|
||||
<span v-if="scope.row.state === 'SAVE'">保存</span>
|
||||
@ -134,7 +134,7 @@
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料编号" align="center" :show-overflow-tooltip="true" width="160">
|
||||
<el-table-column label="物料编号" align="center" :show-overflow-tooltip="true" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.item" style="width: 100%"
|
||||
v-if="!(scope.row.state === 'TO_BE_CONFIRMED' || scope.row.state === 'SUBMIT' || scope.row.state === 'CANCEL'|| scope.row.state === 'REJECT' || scope.row.state === 'CLOSE')"
|
||||
@ -160,7 +160,7 @@
|
||||
<el-table-column label="实际数量" align="center" prop="actualQuantity" width="70"
|
||||
:show-overflow-tooltip="true">
|
||||
</el-table-column>
|
||||
<el-table-column label="来源仓库" align="center" :show-overflow-tooltip="true">
|
||||
<el-table-column label="来源仓库" align="center" :show-overflow-tooltip="true" v-if="!isShow.sourceWarehouse.includes(documentType)">
|
||||
<template slot-scope="scope">
|
||||
<el-select v-model="scope.row.sourceWarehouse" placeholder="请选择" style="width: 100%"
|
||||
:disabled="scope.row.state === 'TO_BE_CONFIRMED' || scope.row.state === 'SUBMIT' || scope.row.state === 'CANCEL' || scope.row.state === 'REJECT'|| scope.row.state === 'CLOSE'">
|
||||
@ -169,7 +169,17 @@
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="目标仓库" align="center" :show-overflow-tooltip="true">
|
||||
<el-table-column label="内部订单" align="center" :show-overflow-tooltip="true" v-if="documentType === 'RANDD_RECEIVE'">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.targetWarehouse" style="width: 100%"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="内部订单" align="center" :show-overflow-tooltip="true" v-if="documentType === 'RAND_RETURNED'">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.sourceWarehouse" style="width: 100%"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="目标仓库" align="center" :show-overflow-tooltip="true" v-if="!isShow.targetWarehouse.includes(documentType)">
|
||||
<template slot-scope="scope">
|
||||
<el-select v-model="scope.row.targetWarehouse" placeholder="请选择" style="width: 100%"
|
||||
:disabled="scope.row.state === 'TO_BE_CONFIRMED' || scope.row.state === 'SUBMIT' || scope.row.state === 'CANCEL' || scope.row.state === 'REJECT'|| scope.row.state === 'CLOSE'">
|
||||
@ -181,36 +191,52 @@
|
||||
<el-table-column label="目标货格" align="center" :show-overflow-tooltip="true" width="120"
|
||||
v-if="documentType === 'STORES_REQUISITION'">
|
||||
<template slot-scope="scope">
|
||||
<el-input :value="formatWmsStorageBinBo(scope.row.wmsStorageBinBo)" style="width: 100%"
|
||||
<el-input :value="formatBo(scope.row.wmsStorageBinBo)" style="width: 100%"
|
||||
:disabled="(scope.row.state === 'SUBMIT' || scope.row.state === 'CANCEL' || scope.row.state === 'REJECT'|| scope.row.state === 'CLOSE')
|
||||
|| (!scope.row.targetWarehouse)"
|
||||
:readonly="true">
|
||||
<i slot="suffix" class="el-input__icon el-icon-search"
|
||||
@click.stop="inputShowDialogByStorageBin(storageBinDialog, scope.row, {handle:'wmsStorageBinBo',description:'description'})"></i>
|
||||
@click.stop="inputShowDialogNoParam(storageBinDialog, scope.row, {handle:'wmsStorageBinBo',description:'description'})"></i>
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="研发项目编号" align="center" :show-overflow-tooltip="true" width="160"
|
||||
v-if="documentType === 'COST_CENTER_RECEIVE' || documentType === 'ME_COST_CENTER_RECEIVE'">
|
||||
<el-table-column label="生产订单" align="center" :show-overflow-tooltip="true" width="120" v-if="!isShow.shopOrder.includes(documentType)">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.oaProjectCode" style="width: 100%"
|
||||
:disabled="(scope.row.state === 'SUBMIT' || scope.row.state === 'CANCEL' || scope.row.state === 'REJECT'|| scope.row.state === 'CLOSE')
|
||||
|| (!scope.row.targetWarehouse || scope.row.targetWarehouse.charAt(4) !== 'E' || scope.row.itemType === 'KMAT')"
|
||||
<el-input :value="formatBo(scope.row.shopOrderBo)" style="width: 100%"
|
||||
:readonly="true">
|
||||
<i slot="suffix" class="el-input__icon el-icon-search"
|
||||
@click.stop="inputShowDialog(oaProjectCodeDialog,scope.row,{dataValue:'oaProjectCode',dataTag:'oaProjectDesc'})"></i>
|
||||
@click.stop="inputShowDialogNoParam(shopOrderDialog, scope.row, {shopOrderBo:'shopOrderBo',salesOrder:'salesOrder',salesOrderSeq:'salesOrderSeq'})"></i>
|
||||
</el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="研发项目名称" align="center" :show-overflow-tooltip="true" width="160"
|
||||
v-if="documentType === 'COST_CENTER_RECEIVE' || documentType === 'ME_COST_CENTER_RECEIVE'">
|
||||
|
||||
|
||||
<el-table-column label="销售订单" align="center" :show-overflow-tooltip="true">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.oaProjectDesc" style="width: 100%" disabled></el-input>
|
||||
<el-input v-model="scope.row.salesOrder" style="width: 100%"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="销售订单行号" align="center" :show-overflow-tooltip="true">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.salesOrderSeq" style="width: 100%"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="(目标)销售订单行号" align="center" :show-overflow-tooltip="true" v-if="documentType === 'ATTRIBUTE_TRANSFER'">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.targetSalesOrderSeq" style="width: 100%"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="(目标)销售订单" align="center" :show-overflow-tooltip="true" v-if="documentType === 'ATTRIBUTE_TRANSFER'">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.targetSalesOrder" style="width: 100%"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="创建人" align="center" width="70" prop="createUser" :show-overflow-tooltip="true">
|
||||
</el-table-column>
|
||||
<el-table-column label="批次" align="center" :show-overflow-tooltip="true">
|
||||
<el-table-column label="批次" align="center" :show-overflow-tooltip="true" v-if="!(documentType === 'PROCUREMENT_STORAGE')">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-model="scope.row.batch" style="width: 100%"
|
||||
v-if="!(scope.row.state === 'TO_BE_CONFIRMED' || scope.row.state === 'SUBMIT' || scope.row.state === 'CANCEL'|| scope.row.state === 'REJECT' || scope.row.state === 'CLOSE') ? true : false">
|
||||
@ -252,6 +278,9 @@
|
||||
<input-select-dialog :modal-obj='storageBinDialog' :modal-fetch-fun='storageBinDialog.fetchFun'
|
||||
:modal-show.sync="storageBinDialog.visible"
|
||||
@inputDialogSelected="inputCallBack($event,storageBinDialog)"/>
|
||||
<input-select-dialog :modal-obj='shopOrderDialog' :modal-fetch-fun='shopOrderDialog.fetchFun'
|
||||
:modal-show.sync="shopOrderDialog.visible"
|
||||
@inputDialogSelected="inputCallBack($event,shopOrderDialog)"/>
|
||||
<el-dialog title="详细信息" :visible.sync="detailsMaintainListDialogVisible">
|
||||
<el-table border :data="detailsMaintainList" height="400">
|
||||
<el-table-column label="条码" align="center" prop="sfc" :show-overflow-tooltip="true"></el-table-column>
|
||||
@ -321,7 +350,7 @@ import {
|
||||
getRetrieve,
|
||||
getWarehouse,
|
||||
itemDialog,
|
||||
saveOrUpdate, userCheck, getDetails, submit, cancel, reject
|
||||
saveOrUpdate, selectShopOrderInfo, getDetails, submit, cancel, reject
|
||||
, getOaProjectCode, validateImport
|
||||
} from "@/api/wms/document-maintain";
|
||||
import {inputShowDialog, inputCallBack} from '@/util/inputSelectDialogUtil';
|
||||
@ -418,13 +447,36 @@ export default {
|
||||
keys: null,
|
||||
},
|
||||
},
|
||||
shopOrderDialog: {
|
||||
id: "shopOrderDialog",
|
||||
page: true,
|
||||
tableColumn: [
|
||||
{prop: "shopOrder", label: "生产订单"},
|
||||
{prop: "salesOrder", label: "销售订单"},
|
||||
{prop: "salesOrderSeq", label: "销售订单行号"},
|
||||
],
|
||||
visible: false,
|
||||
fetchFun: selectShopOrderInfo,
|
||||
callBack: {
|
||||
target: null,
|
||||
keys: null,
|
||||
},
|
||||
},
|
||||
documentListFun: documentDialog,
|
||||
carrierDialogType: '',
|
||||
carrierTableIndex: 0,
|
||||
detailsMaintainListDialogVisible: false,
|
||||
detailsMaintainList: [],
|
||||
isShowMeInventoryColumn: false,
|
||||
importDialogVisible: false
|
||||
importDialogVisible: false,
|
||||
isDisabledList:[], // 单据是否可手动创建
|
||||
isShow: {
|
||||
sourceWarehouse: ['COST_CENTER_RETURNED','ENGINEER_RETURNED','RAND_RETURNED','INTERCOMPANY_STORAGE', 'PROCUREMENT_STORAGE','SALES_RETURN','ATTRIBUTE_TRANSFER'],// 不显示
|
||||
targetWarehouse: ['COST_CENTER_RECEIVE','ENGINEER_RECEIVE','RANDD_RECEIVE','SCRAP_OUT', 'SECRECY_RECEIVE','SECRECY_RETURNED',
|
||||
'INTERCOMPANY_RETURN','SALES_OUT','PURCHASE_RETURN','ATTRIBUTE_TRANSFER'],// 不显示
|
||||
shopOrder: ['ATTRIBUTE_TRANSFER','INTERCOMPANY_STORAGE','INTERCOMPANY_RETURN','SALES_OUT', 'SALES_RETURN','PROCUREMENT_STORAGE',
|
||||
'PURCHASE_RETURN'],// 不显示
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -454,37 +506,49 @@ export default {
|
||||
},
|
||||
|
||||
methods: {
|
||||
formatWmsStorageBinBo(value) {
|
||||
// 格式化BO(1位)
|
||||
formatBo(value) {
|
||||
// 对输入值进行格式化
|
||||
return value.split(',')[1] || '';
|
||||
if (value) {
|
||||
return value.split(',')[1] || '';
|
||||
}
|
||||
},
|
||||
|
||||
// 根据字典的label值判断单据是否可手动创建
|
||||
isDisabled(documentType) {
|
||||
// 判断是否禁用输入框
|
||||
return (
|
||||
this.isDisabledList.includes(documentType)
|
||||
);
|
||||
},
|
||||
|
||||
// 获取单据类型字典列表
|
||||
getDocumentTypeDictItemList() {
|
||||
let param = Object.assign(
|
||||
{
|
||||
current: '1',
|
||||
size: '1000',
|
||||
},
|
||||
{dictType: 'DOCUMENT_TYPE'}
|
||||
)
|
||||
showLoading();
|
||||
fetchItemList(
|
||||
Object.assign(
|
||||
{
|
||||
current: '1',
|
||||
size: '1000',
|
||||
},
|
||||
{dictType: 'DOCUMENT_TYPE'}
|
||||
)
|
||||
).then((response) => {
|
||||
fetchItemList(param).then((response) => {
|
||||
hideLoading();
|
||||
let data = response.data.data.records;
|
||||
data.forEach(item => {
|
||||
if (item.label === 'N'){
|
||||
this.isDisabledList.push(item.value)
|
||||
}
|
||||
this.documentTypeList.push({
|
||||
documentType: item.value,
|
||||
documentTypeDescription: item.description,
|
||||
})
|
||||
})
|
||||
|
||||
}).catch((err) => {
|
||||
hideLoading();
|
||||
console.log(err)
|
||||
})
|
||||
},
|
||||
|
||||
//打开单据弹出框
|
||||
openDocumentDialog() {
|
||||
this.documentDialogObj.queryParam = {'status': this.state, 'documentType': this.documentType};
|
||||
@ -1291,7 +1355,7 @@ export default {
|
||||
});
|
||||
},
|
||||
|
||||
inputShowDialogByStorageBin(dialog, target, keys) {
|
||||
inputShowDialogNoParam(dialog, target, keys) {
|
||||
target = target ? target : this;
|
||||
debugger
|
||||
inputShowDialog.call(this, dialog, target, keys, null, () => {});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user