|
@@ -3,9 +3,16 @@
|
|
|
<el-form :model="basicForm" :rules="basicRules" ref="basic" label-width="auto">
|
|
|
<el-row :gutter="10">
|
|
|
<el-col :span="1.5">
|
|
|
+ <el-form-item label="调出库存组织">
|
|
|
+ <el-select clearable size="small" v-model="basicForm.deliveryInventoryOrg" :disabled="sonDisable" @focus="chooseRefer('ORG_PARAM', true, '调出库存组织')" style="width: 200px">
|
|
|
+ <el-option v-for="item in chuOrgOptions" :key="item.id" :label="item.name" :value="item.id" />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="1.5">
|
|
|
<el-form-item label="订单类型">
|
|
|
<el-select v-model="basicForm.billType" size="small" style="width: 200px" clearable>
|
|
|
- <el-option v-for="dict in dict.type.sys_order_type" :key="dict.value" :label="dict.label" :value="dict.value">
|
|
|
+ <el-option v-for="dict in dict.type.sys_allot_billtype" :key="dict.value" :label="dict.label" :value="dict.value">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
@@ -67,57 +74,43 @@
|
|
|
</el-col>
|
|
|
<el-col :span="1.5">
|
|
|
<el-form-item label="调入库存组织">
|
|
|
- <el-input
|
|
|
- v-model="basicForm.storageInventoryOrg"
|
|
|
- size="small"
|
|
|
- placeholder=""
|
|
|
- clearable
|
|
|
- style="width: 200px"
|
|
|
- />
|
|
|
+ <el-select clearable size="small" v-model="basicForm.storageInventoryOrg" :disabled="sonDisable" @focus="chooseRefer('ORG_PARAM', true, '调入库存组织')" style="width: 200px">
|
|
|
+ <el-option v-for="item in ruOrgOptions" :key="item.id" :label="item.name" :value="item.id" />
|
|
|
+ </el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="1.5">
|
|
|
<el-form-item label="调出业务员">
|
|
|
- <el-input
|
|
|
- v-model="basicForm.businessPersonal"
|
|
|
- size="small"
|
|
|
- placeholder=""
|
|
|
- clearable
|
|
|
- style="width: 200px"
|
|
|
- />
|
|
|
+ <el-select clearable size="small" v-model="basicForm.businessPersonal" :disabled="sonDisable" @focus="chooseRefer('CONTACTS_PARAM', true, '调出业务员')" style="width: 200px">
|
|
|
+ <el-option v-for="item in manOptions" :key="item.id" :label="item.name" :value="item.code" />
|
|
|
+ </el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="1.5">
|
|
|
<el-form-item label="调出部门">
|
|
|
- <el-input
|
|
|
- v-model="basicForm.deliveryDept"
|
|
|
- size="small"
|
|
|
- placeholder=""
|
|
|
- clearable
|
|
|
- style="width: 200px"
|
|
|
- />
|
|
|
+ <el-select clearable size="small" v-model="basicForm.deliveryDept" :disabled="sonDisable" @focus="chooseRefer('DEPT_PARAM', true, '调出部门')" style="width: 200px">
|
|
|
+ <el-option v-for="item in deptOptions" :key="item.id" :label="item.name" :value="item.id" />
|
|
|
+ </el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="1.5">
|
|
|
<el-form-item label="币种">
|
|
|
- <el-input
|
|
|
- v-model="basicForm.currency"
|
|
|
- size="small"
|
|
|
- placeholder=""
|
|
|
- clearable
|
|
|
- style="width: 200px"
|
|
|
- />
|
|
|
+ <el-select clearable size="small" v-model="basicForm.currency" :disabled="sonDisable" @focus="chooseRefer('CURRENCY_PARAM', true, '币种')" style="width: 200px">
|
|
|
+ <el-option v-for="item in currencyOptions" :key="item.id" :label="item.name" :value="item.id" />
|
|
|
+ </el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="1.5">
|
|
|
<el-form-item label="折本汇率">
|
|
|
- <el-input
|
|
|
+ <el-input-number
|
|
|
v-model="basicForm.rate"
|
|
|
size="small"
|
|
|
- placeholder=""
|
|
|
- clearable
|
|
|
+ disabled
|
|
|
+ :precision="2"
|
|
|
+ :step="0.1"
|
|
|
+ :max="10"
|
|
|
style="width: 200px"
|
|
|
- />
|
|
|
+ ></el-input-number>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="1.5">
|
|
@@ -125,7 +118,6 @@
|
|
|
<el-input
|
|
|
v-model="basicForm.onRouteAffilliation"
|
|
|
size="small"
|
|
|
- placeholder=""
|
|
|
clearable
|
|
|
style="width: 200px"
|
|
|
/>
|
|
@@ -187,36 +179,25 @@
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="1.5">
|
|
|
- <el-form-item label="物料项目组">
|
|
|
- <el-input
|
|
|
- v-model="basicForm.materialProject"
|
|
|
- size="small"
|
|
|
- placeholder=""
|
|
|
- clearable
|
|
|
- style="width: 200px"
|
|
|
- />
|
|
|
+ <el-form-item label="物流项目组">
|
|
|
+ <el-select v-model="basicForm.materialProject" size="small" style="width: 200px" clearable>
|
|
|
+ <el-option v-for="dict in dict.type.sys_project_group" :key="dict.value" :label="dict.label" :value="dict.value">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="1.5">
|
|
|
<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-col>
|
|
|
<el-col :span="1.5">
|
|
|
<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-col>
|
|
|
<el-col :span="1.5">
|
|
@@ -232,13 +213,10 @@
|
|
|
</el-col>
|
|
|
<el-col :span="1.5">
|
|
|
<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-col>
|
|
|
</el-row>
|
|
@@ -254,20 +232,40 @@
|
|
|
max-height="480"
|
|
|
>
|
|
|
<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="code"/>
|
|
|
- <el-table-column label="调拨入库单号" align="center" prop="code"/>
|
|
|
- <el-table-column label="规格" align="center" prop="code"/>
|
|
|
+ <el-table-column label="调拨出库单号" align="center" prop="deliveryCode"/>
|
|
|
+ <el-table-column label="调拨入库单号" align="center" prop="storageCode"/>
|
|
|
+ <el-table-column label="规格" align="center" prop="specification"/>
|
|
|
<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="unit"/>
|
|
|
+ <el-table-column label="单位" align="center" prop="unitName"/>
|
|
|
<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="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="storageWarehouseName"/>
|
|
|
<el-table-column label="批次号" align="center" prop="patchNo"/>
|
|
@@ -287,6 +285,15 @@
|
|
|
<!-- <el-table-column label="备注" align="center" prop="code"/> -->
|
|
|
<el-table-column label="客户物料码" align="center" prop="customerLogistic"/>
|
|
|
<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-tab-pane>
|
|
|
|
|
@@ -504,31 +511,44 @@
|
|
|
<el-button size="small" plain @click="back">返回</el-button>
|
|
|
</el-col>
|
|
|
</div>
|
|
|
+
|
|
|
+ <Refers ref="refer" @doSubmit="selectionsToInput" :single="true"/>
|
|
|
+ <TreeRefers ref="tree" @doSubmit="selectionsToInput2" :single="true"/>
|
|
|
+ <popDialog ref="materialRefer" @doSubmit="selectMaterial" :single="true" />
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import {addOrder, getOrderDetail, editOrder} from '@/api/purchase/transferOrder.js'
|
|
|
+import Refers from '@/components/Refers/refers.vue'
|
|
|
+import TreeRefers from '@/components/Refers/treeRefer.vue'
|
|
|
+// 明细行选择物料参照
|
|
|
+import popDialog from '@/components/PopDialog/index.vue'
|
|
|
+
|
|
|
export default {
|
|
|
name: 'addOder',
|
|
|
- dicts: ['sys_order_type'],
|
|
|
+ dicts: ['sys_allot_billtype', 'sys_project_group', 'sys_status'],
|
|
|
props: ['pageStu','row', 'disable'],
|
|
|
+ components: {
|
|
|
+ Refers,
|
|
|
+ TreeRefers,
|
|
|
+ popDialog
|
|
|
+ },
|
|
|
model: {
|
|
|
prop: 'isList',
|
|
|
event: 'jugislist'
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- basicForm: {},
|
|
|
- options: [{
|
|
|
- value: '1', label: '是',
|
|
|
- }, {
|
|
|
- value: '0', label: '否'
|
|
|
- }],
|
|
|
- basicRules: {
|
|
|
+ // 不能直接改变props传来的值
|
|
|
+ sonPageStu: this.pageStu,
|
|
|
+ sonDisable: this.disable,
|
|
|
+ basicForm: {
|
|
|
+ deliveryInventoryOrg: '',
|
|
|
+ deliveryInventoryOrgName: '',
|
|
|
billType: '',
|
|
|
code: '',
|
|
|
- billDate : '',
|
|
|
+ billDate: '',
|
|
|
allotType: '',
|
|
|
deliveryCode: '',
|
|
|
storageCode: '',
|
|
@@ -540,7 +560,7 @@ export default {
|
|
|
deliveryDeptName: '',
|
|
|
currency: '',
|
|
|
currencyName: '',
|
|
|
- rate: '',
|
|
|
+ rate: 1,
|
|
|
onRouteAffilliation: '',
|
|
|
qty: '',
|
|
|
accountPath: '',
|
|
@@ -551,15 +571,35 @@ export default {
|
|
|
storageWarehouse: '',
|
|
|
storageWarehouseName: '',
|
|
|
materialProject: '',
|
|
|
+ liacenter: '',
|
|
|
+ liacenterName: '',
|
|
|
sourceIdentification: '',
|
|
|
isSendWms: '',
|
|
|
- status: '',
|
|
|
+ status: '0',
|
|
|
tenantId: '',
|
|
|
revision: '',
|
|
|
createByName: '',
|
|
|
updateByName: '',
|
|
|
delFlag: '',
|
|
|
},
|
|
|
+ referCondition: {
|
|
|
+ type: '',
|
|
|
+ isPage: true,
|
|
|
+ title: '',
|
|
|
+ },
|
|
|
+ options: [{
|
|
|
+ value: '0', label: '是',
|
|
|
+ }, {
|
|
|
+ value: '2', label: '否'
|
|
|
+ }],
|
|
|
+ tableIndex: null,
|
|
|
+ chuOrgOptions: [],
|
|
|
+ ruOrgOptions:[],
|
|
|
+ manOptions: [],
|
|
|
+ deptOptions: [],
|
|
|
+ currencyOptions: [],
|
|
|
+ liacenterOptions: [],
|
|
|
+ basicRules: {},
|
|
|
materialInfo: [],
|
|
|
receiveInfo: [],
|
|
|
priceList: [],
|
|
@@ -620,10 +660,116 @@ 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) {
|
|
|
- // console.log('删除行:', index)
|
|
|
- // this.basicForm.puDemandItemList.splice(index, 1)
|
|
|
+ console.log('删除行:', index)
|
|
|
+ this.materialInfo.splice(index, 1)
|
|
|
+ },
|
|
|
+ chooseRefer(type, isPage, title) {
|
|
|
+ this.referCondition.type = type
|
|
|
+ this.referCondition.isPage = isPage
|
|
|
+ this.referCondition.title = title
|
|
|
+ this.$refs.refer.init(this.referCondition)
|
|
|
+ },
|
|
|
+ selectionsToInput(selection) {
|
|
|
+ if (this.referCondition.title == '调出库存组织') {
|
|
|
+ this.chuOrgOptions = selection
|
|
|
+ this.basicForm.deliveryInventoryOrg = selection[0].id
|
|
|
+ this.basicForm.deliveryInventoryOrgName = selection[0].name
|
|
|
+ }
|
|
|
+ if (this.referCondition.title == '调入库存组织') {
|
|
|
+ this.ruOrgOptions = selection
|
|
|
+ this.basicForm.storageInventoryOrg = selection[0].id
|
|
|
+ this.basicForm.storageInventoryOrgName = selection[0].name
|
|
|
+ this.basicForm.onRouteAffilliation = selection[0].name
|
|
|
+ }
|
|
|
+ if (this.referCondition.title == '调出业务员') {
|
|
|
+ this.manOptions = selection
|
|
|
+ this.basicForm.businessPersonal = selection[0].code
|
|
|
+ this.basicForm.businessPersonalName = selection[0].name
|
|
|
+ }
|
|
|
+ if (this.referCondition.title == '调出部门') {
|
|
|
+ this.deptOptions = selection
|
|
|
+ this.basicForm.deliveryDept = selection[0].id
|
|
|
+ this.basicForm.deliveryDeptName = selection[0].name
|
|
|
+ }
|
|
|
+ if (this.referCondition.title == '币种') {
|
|
|
+ this.currencyOptions = selection
|
|
|
+ this.basicForm.currency = selection[0].id
|
|
|
+ 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
|
|
|
+ this.materialInfo[this.tableIndex].marketingApprovalPersonal = selection[0].registrant
|
|
|
+ this.materialInfo[this.tableIndex].production = selection[0].productionPermit
|
|
|
},
|
|
|
}
|
|
|
}
|
|
@@ -640,5 +786,11 @@ export default {
|
|
|
margin-bottom: 10px;
|
|
|
display: flex;
|
|
|
justify-content: flex-end;
|
|
|
-}
|
|
|
+}
|
|
|
+.hang {
|
|
|
+ margin: auto;
|
|
|
+}
|
|
|
+.hang ::v-deep .el-form-item__content{
|
|
|
+ margin-left: 0px !important;
|
|
|
+}
|
|
|
</style>
|