|
@@ -188,24 +188,16 @@
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="1.5">
|
|
<el-col :span="1.5">
|
|
<el-form-item label="利润中心">
|
|
<el-form-item label="利润中心">
|
|
- <el-input
|
|
|
|
- v-model="basicForm.code"
|
|
|
|
- size="small"
|
|
|
|
- placeholder=""
|
|
|
|
- clearable
|
|
|
|
- style="width: 200px"
|
|
|
|
- />
|
|
|
|
|
|
+ <el-select clearable size="small" v-model="basicForm.liacenter" :disabled="sonDisable" @focus="chooseTreeRefer('LIACENTER_PARAM', false, '利润中心')" style="width: 200px">
|
|
|
|
+ <el-option v-for="item in liacenterOptions" :key="item.id" :label="item.name" :value="item.id" />
|
|
|
|
+ </el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="1.5">
|
|
<el-col :span="1.5">
|
|
<el-form-item label="是否已同步WMS">
|
|
<el-form-item label="是否已同步WMS">
|
|
- <el-input
|
|
|
|
- v-model="basicForm.isSendWms"
|
|
|
|
- size="small"
|
|
|
|
- placeholder=""
|
|
|
|
- clearable
|
|
|
|
- style="width: 200px"
|
|
|
|
- />
|
|
|
|
|
|
+ <el-select clearable size="small" v-model="basicForm.isSendWms" :disabled="sonDisable" style="width: 200px">
|
|
|
|
+ <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value" />
|
|
|
|
+ </el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="1.5">
|
|
<el-col :span="1.5">
|
|
@@ -221,13 +213,10 @@
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="1.5">
|
|
<el-col :span="1.5">
|
|
<el-form-item label="单据状态">
|
|
<el-form-item label="单据状态">
|
|
- <el-input
|
|
|
|
- v-model="basicForm.code"
|
|
|
|
- size="small"
|
|
|
|
- placeholder=""
|
|
|
|
- clearable
|
|
|
|
- style="width: 200px"
|
|
|
|
- />
|
|
|
|
|
|
+ <el-select disabled v-model="basicForm.status" size="small" style="width: 200px" clearable>
|
|
|
|
+ <el-option v-for="dict in dict.type.sys_status" :key="dict.value" :label="dict.label" :value="dict.value">
|
|
|
|
+ </el-option>
|
|
|
|
+ </el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
@@ -243,20 +232,40 @@
|
|
max-height="480"
|
|
max-height="480"
|
|
>
|
|
>
|
|
<el-table-column label="行号" align="center" prop="rowno"/>
|
|
<el-table-column label="行号" align="center" prop="rowno"/>
|
|
- <el-table-column label="物料编码" align="center" prop="material"/>
|
|
|
|
|
|
+ <el-table-column label="物料编码" align="center" prop="material" width="230px">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <el-form-item class="hang">
|
|
|
|
+ <el-input readonly size="small" v-model="scope.row.material">
|
|
|
|
+ <el-button size="small" :disabled="sonDisable" slot="append" icon="el-icon-more" @click="chooseMaterial(scope.$index)"></el-button>
|
|
|
|
+ </el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
<el-table-column label="物料名称" align="center" prop="materialName"/>
|
|
<el-table-column label="物料名称" align="center" prop="materialName"/>
|
|
<el-table-column label="调拨出库单号" align="center" prop="deliveryCode"/>
|
|
<el-table-column label="调拨出库单号" align="center" prop="deliveryCode"/>
|
|
<el-table-column label="调拨入库单号" align="center" prop="storageCode"/>
|
|
<el-table-column label="调拨入库单号" align="center" prop="storageCode"/>
|
|
<el-table-column label="规格" align="center" prop="specification"/>
|
|
<el-table-column label="规格" align="center" prop="specification"/>
|
|
<el-table-column label="生产厂家/代理人" align="center" prop="manufacturer"/>
|
|
<el-table-column label="生产厂家/代理人" align="center" prop="manufacturer"/>
|
|
- <el-table-column label="产地" align="center" prop="originPlace"/>
|
|
|
|
|
|
+ <el-table-column label="产地" align="center" prop="originPlaceName"/>
|
|
<el-table-column label="型号" align="center" prop="model"/>
|
|
<el-table-column label="型号" align="center" prop="model"/>
|
|
- <el-table-column label="单位" align="center" prop="unit"/>
|
|
|
|
|
|
+ <el-table-column label="单位" align="center" prop="unitName"/>
|
|
<el-table-column label="调出仓库" align="center" prop="deliveryWarehouseName"/>
|
|
<el-table-column label="调出仓库" align="center" prop="deliveryWarehouseName"/>
|
|
- <el-table-column label="数量" align="center" prop="qty"/>
|
|
|
|
- <el-table-column label="主单位" align="center" prop="mainUnit"/>
|
|
|
|
|
|
+ <el-table-column label="数量" align="center" prop="qty" width="150px">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <el-form-item class="hang">
|
|
|
|
+ <el-input :readonly="sonDisable" size="small" v-model="scope.row.qty"/>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="主单位" align="center" prop="mainUnitName"/>
|
|
<el-table-column label="换算率" align="center" prop="equation"/>
|
|
<el-table-column label="换算率" align="center" prop="equation"/>
|
|
- <el-table-column label="主数量" align="center" prop="mainQty"/>
|
|
|
|
|
|
+ <el-table-column label="主数量" align="center" prop="mainQty" width="150px">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <el-form-item class="hang">
|
|
|
|
+ <el-input :readonly="sonDisable" size="small" v-model="scope.row.mainQty"/>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
<el-table-column label="税率" align="center" prop="rate"/>
|
|
<el-table-column label="税率" align="center" prop="rate"/>
|
|
<el-table-column label="调入仓库" align="center" prop="storageWarehouseName"/>
|
|
<el-table-column label="调入仓库" align="center" prop="storageWarehouseName"/>
|
|
<el-table-column label="批次号" align="center" prop="patchNo"/>
|
|
<el-table-column label="批次号" align="center" prop="patchNo"/>
|
|
@@ -276,6 +285,15 @@
|
|
<!-- <el-table-column label="备注" align="center" prop="code"/> -->
|
|
<!-- <el-table-column label="备注" align="center" prop="code"/> -->
|
|
<el-table-column label="客户物料码" align="center" prop="customerLogistic"/>
|
|
<el-table-column label="客户物料码" align="center" prop="customerLogistic"/>
|
|
<el-table-column label="客户物料名称" align="center" prop="customerLogisticName"/>
|
|
<el-table-column label="客户物料名称" align="center" prop="customerLogisticName"/>
|
|
|
|
+ <el-table-column
|
|
|
|
+ fixed="right"
|
|
|
|
+ label="操作"
|
|
|
|
+ align="center"
|
|
|
|
+ >
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <el-button type="text" size="small" :disabled="sonDisable" @click="delLine(scope.$index, scope.row)">删除</el-button>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
</el-tab-pane>
|
|
</el-tab-pane>
|
|
|
|
|
|
@@ -495,18 +513,26 @@
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<Refers ref="refer" @doSubmit="selectionsToInput" :single="true"/>
|
|
<Refers ref="refer" @doSubmit="selectionsToInput" :single="true"/>
|
|
|
|
+ <TreeRefers ref="tree" @doSubmit="selectionsToInput2" :single="true"/>
|
|
|
|
+ <popDialog ref="materialRefer" @doSubmit="selectMaterial" :single="true" />
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
import {addOrder, getOrderDetail, editOrder} from '@/api/purchase/transferOrder.js'
|
|
import {addOrder, getOrderDetail, editOrder} from '@/api/purchase/transferOrder.js'
|
|
import Refers from '@/components/Refers/refers.vue'
|
|
import Refers from '@/components/Refers/refers.vue'
|
|
|
|
+import TreeRefers from '@/components/Refers/treeRefer.vue'
|
|
|
|
+// 明细行选择物料参照
|
|
|
|
+import popDialog from '@/components/PopDialog/index.vue'
|
|
|
|
+
|
|
export default {
|
|
export default {
|
|
name: 'addOder',
|
|
name: 'addOder',
|
|
- dicts: ['sys_allot_billtype', 'sys_project_group'],
|
|
|
|
|
|
+ dicts: ['sys_allot_billtype', 'sys_project_group', 'sys_status'],
|
|
props: ['pageStu','row', 'disable'],
|
|
props: ['pageStu','row', 'disable'],
|
|
components: {
|
|
components: {
|
|
- Refers
|
|
|
|
|
|
+ Refers,
|
|
|
|
+ TreeRefers,
|
|
|
|
+ popDialog
|
|
},
|
|
},
|
|
model: {
|
|
model: {
|
|
prop: 'isList',
|
|
prop: 'isList',
|
|
@@ -545,9 +571,11 @@ export default {
|
|
storageWarehouse: '',
|
|
storageWarehouse: '',
|
|
storageWarehouseName: '',
|
|
storageWarehouseName: '',
|
|
materialProject: '',
|
|
materialProject: '',
|
|
|
|
+ liacenter: '',
|
|
|
|
+ liacenterName: '',
|
|
sourceIdentification: '',
|
|
sourceIdentification: '',
|
|
isSendWms: '',
|
|
isSendWms: '',
|
|
- status: '',
|
|
|
|
|
|
+ status: '0',
|
|
tenantId: '',
|
|
tenantId: '',
|
|
revision: '',
|
|
revision: '',
|
|
createByName: '',
|
|
createByName: '',
|
|
@@ -560,15 +588,17 @@ export default {
|
|
title: '',
|
|
title: '',
|
|
},
|
|
},
|
|
options: [{
|
|
options: [{
|
|
- value: '1', label: '是',
|
|
|
|
|
|
+ value: '0', label: '是',
|
|
}, {
|
|
}, {
|
|
- value: '0', label: '否'
|
|
|
|
|
|
+ value: '2', label: '否'
|
|
}],
|
|
}],
|
|
|
|
+ tableIndex: null,
|
|
chuOrgOptions: [],
|
|
chuOrgOptions: [],
|
|
ruOrgOptions:[],
|
|
ruOrgOptions:[],
|
|
manOptions: [],
|
|
manOptions: [],
|
|
deptOptions: [],
|
|
deptOptions: [],
|
|
currencyOptions: [],
|
|
currencyOptions: [],
|
|
|
|
+ liacenterOptions: [],
|
|
basicRules: {},
|
|
basicRules: {},
|
|
materialInfo: [],
|
|
materialInfo: [],
|
|
receiveInfo: [],
|
|
receiveInfo: [],
|
|
@@ -630,10 +660,49 @@ export default {
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- addLine() {},
|
|
|
|
|
|
+ addLine() {
|
|
|
|
+ const newLine = {
|
|
|
|
+ rowno: null,
|
|
|
|
+ material: null,
|
|
|
|
+ materialName: null,
|
|
|
|
+ deliveryCode: null,
|
|
|
|
+ storageCode: null,
|
|
|
|
+ specification: null,
|
|
|
|
+ manufacturer: null,
|
|
|
|
+ originPlace: null,
|
|
|
|
+ originPlaceName: null,
|
|
|
|
+ model: null,
|
|
|
|
+ unit: null,
|
|
|
|
+ unitName: null,
|
|
|
|
+ deliveryWarehouseName: null,
|
|
|
|
+ qty: null,
|
|
|
|
+ mainUnit: null,
|
|
|
|
+ mainUnitName: null,
|
|
|
|
+ equation: null,
|
|
|
|
+ mainQty: null,
|
|
|
|
+ rate: null,
|
|
|
|
+ storageWarehouseName: null,
|
|
|
|
+ patchNo: null,
|
|
|
|
+ producBatch: null,
|
|
|
|
+ manufactureDate: null,
|
|
|
|
+ periodEndDate: null,
|
|
|
|
+ ratifyCode: null,
|
|
|
|
+ registration: null,
|
|
|
|
+ productCode: null,
|
|
|
|
+ commonCode: null,
|
|
|
|
+ drug: null,
|
|
|
|
+ ruleDetail: null,
|
|
|
|
+ marketingApprovalPersonal: null,
|
|
|
|
+ production: null,
|
|
|
|
+ pi: null,
|
|
|
|
+ customerLogistic: null,
|
|
|
|
+ customerLogisticName: null
|
|
|
|
+ }
|
|
|
|
+ this.materialInfo.push(newLine)
|
|
|
|
+ },
|
|
delLine(index) {
|
|
delLine(index) {
|
|
- // console.log('删除行:', index)
|
|
|
|
- // this.basicForm.puDemandItemList.splice(index, 1)
|
|
|
|
|
|
+ console.log('删除行:', index)
|
|
|
|
+ this.materialInfo.splice(index, 1)
|
|
},
|
|
},
|
|
chooseRefer(type, isPage, title) {
|
|
chooseRefer(type, isPage, title) {
|
|
this.referCondition.type = type
|
|
this.referCondition.type = type
|
|
@@ -651,6 +720,7 @@ export default {
|
|
this.ruOrgOptions = selection
|
|
this.ruOrgOptions = selection
|
|
this.basicForm.storageInventoryOrg = selection[0].id
|
|
this.basicForm.storageInventoryOrg = selection[0].id
|
|
this.basicForm.storageInventoryOrgName = selection[0].name
|
|
this.basicForm.storageInventoryOrgName = selection[0].name
|
|
|
|
+ this.basicForm.onRouteAffilliation = selection[0].name
|
|
}
|
|
}
|
|
if (this.referCondition.title == '调出业务员') {
|
|
if (this.referCondition.title == '调出业务员') {
|
|
this.manOptions = selection
|
|
this.manOptions = selection
|
|
@@ -668,6 +738,37 @@ export default {
|
|
this.basicForm.currencyName = selection[0].name
|
|
this.basicForm.currencyName = selection[0].name
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ chooseTreeRefer(type, isPage, title) {
|
|
|
|
+ this.referCondition.type = type
|
|
|
|
+ this.referCondition.isPage = isPage
|
|
|
|
+ this.referCondition.title = title
|
|
|
|
+ this.$refs.tree.init(this.referCondition)
|
|
|
|
+ },
|
|
|
|
+ selectionsToInput2(selection) {
|
|
|
|
+ this.liacenterOptions.push(selection)
|
|
|
|
+ this.basicForm.liacenter = selection.id
|
|
|
|
+ this.basicForm.liacenterName = selection.name
|
|
|
|
+ },
|
|
|
|
+ // 明细行选择物料编码带出数据
|
|
|
|
+ chooseMaterial(index) {
|
|
|
|
+ console.log("🚀 ~ file: add.vue:790 ~ chooseMaterial ~ index:", index)
|
|
|
|
+ this.tableIndex = index
|
|
|
|
+ this.$refs.materialRefer.init()
|
|
|
|
+ },
|
|
|
|
+ selectMaterial(selection) {
|
|
|
|
+ console.log('选中的物料', selection)
|
|
|
|
+ this.materialInfo[this.tableIndex].material = selection[0].code
|
|
|
|
+ this.materialInfo[this.tableIndex].materialName = selection[0].name
|
|
|
|
+ this.materialInfo[this.tableIndex].specification = selection[0].specification
|
|
|
|
+ this.materialInfo[this.tableIndex].model = selection[0].model
|
|
|
|
+ this.materialInfo[this.tableIndex].originPlace = selection[0].originPlace
|
|
|
|
+ this.materialInfo[this.tableIndex].originPlaceName = selection[0].originPlaceName
|
|
|
|
+ this.materialInfo[this.tableIndex].unit = selection[0].unitId
|
|
|
|
+ this.materialInfo[this.tableIndex].mainUnit = selection[0].unitId
|
|
|
|
+ this.materialInfo[this.tableIndex].unitName = selection[0].unitIdName
|
|
|
|
+ this.materialInfo[this.tableIndex].mainUnitName = selection[0].unitIdName
|
|
|
|
+ this.materialInfo[this.tableIndex].manufacturer = selection[0].manufacturerIdName
|
|
|
|
+ },
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|
|
@@ -683,5 +784,11 @@ export default {
|
|
margin-bottom: 10px;
|
|
margin-bottom: 10px;
|
|
display: flex;
|
|
display: flex;
|
|
justify-content: flex-end;
|
|
justify-content: flex-end;
|
|
-}
|
|
|
|
|
|
+}
|
|
|
|
+.hang {
|
|
|
|
+ margin: auto;
|
|
|
|
+}
|
|
|
|
+.hang ::v-deep .el-form-item__content{
|
|
|
|
+ margin-left: 0px !important;
|
|
|
|
+}
|
|
</style>
|
|
</style>
|