|
|
@@ -80,6 +80,7 @@
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label="入库类型" prop="bizType">
|
|
|
<el-select
|
|
|
+ @change="onClear"
|
|
|
filterable
|
|
|
placeholder="请选择"
|
|
|
v-model="formData.bizType"
|
|
|
@@ -104,9 +105,16 @@
|
|
|
>
|
|
|
<el-input
|
|
|
placeholder="请输入"
|
|
|
- clearable
|
|
|
v-model="formData.extInfo.documentSource"
|
|
|
- /></el-form-item>
|
|
|
+ @click.native="handlePicker()"
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ slot="append"
|
|
|
+ icon="el-icon-circle-close"
|
|
|
+ @click.stop="onClear"
|
|
|
+ ></el-button>
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
<el-form-item
|
|
|
v-if="formData.bizType == 1"
|
|
|
label="生产订单"
|
|
|
@@ -157,40 +165,50 @@
|
|
|
>
|
|
|
</el-date-picker></el-form-item
|
|
|
></el-col> -->
|
|
|
- <el-col :span="8" v-if="formData.bizType != 2">
|
|
|
- <el-form-item label="供应商" prop="supplierId">
|
|
|
- <DictSelection
|
|
|
+ <el-col :span="8" v-if="formData.bizType == 2">
|
|
|
+ <el-form-item label="供应商" prop="supplierName">
|
|
|
+ <!-- <DictSelection
|
|
|
dictName="经销商列表"
|
|
|
clearable
|
|
|
v-model="formData.extInfo.supplierId"
|
|
|
@itemChange="ChangeSupplier"
|
|
|
+ /> -->
|
|
|
+ <el-input
|
|
|
+ placeholder="请输入"
|
|
|
+ clearable
|
|
|
+ v-model="formData.extInfo.supplierName"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="8" v-if="formData.bizType != 2">
|
|
|
- <el-form-item label="供应商代号" prop="supplierCode">
|
|
|
+ <!-- <el-col :span="8" v-if="formData.bizType == 2">
|
|
|
+ <el-form-item label="物料代号" prop="supplierCode">
|
|
|
<el-input
|
|
|
placeholder="请输入"
|
|
|
v-model="formData.supplierCode"
|
|
|
clearable /></el-form-item
|
|
|
- ></el-col>
|
|
|
+ ></el-col> -->
|
|
|
<el-col :span="8" v-if="formData.bizType == 2">
|
|
|
<el-form-item label="客户" prop="clientName">
|
|
|
- <DictSelection
|
|
|
+ <!-- <DictSelection
|
|
|
dictName="经销商列表"
|
|
|
clearable
|
|
|
v-model="formData.clientName"
|
|
|
@itemChange="ChangeSuppliers"
|
|
|
+ /> -->
|
|
|
+ <el-input
|
|
|
+ placeholder="请输入"
|
|
|
+ clearable
|
|
|
+ v-model="formData.clientName"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="8" v-if="formData.bizType == 2">
|
|
|
+ <!-- <el-col :span="8" v-if="formData.bizType == 2">
|
|
|
<el-form-item label="客户代号" prop="clientCode">
|
|
|
<el-input
|
|
|
placeholder="请输入"
|
|
|
v-model="formData.clientCode"
|
|
|
clearable /></el-form-item
|
|
|
- ></el-col>
|
|
|
+ ></el-col> -->
|
|
|
|
|
|
<!-- <el-col :span="8">
|
|
|
<el-form-item label="送货人" prop="fromUser">
|
|
|
@@ -242,7 +260,7 @@
|
|
|
></el-option>
|
|
|
</el-select> </el-form-item
|
|
|
></el-col> -->
|
|
|
- <el-col :span="8">
|
|
|
+ <!-- <el-col :span="8">
|
|
|
<el-form-item label="审核人部门" prop="verifyDeptName">
|
|
|
<selectTree
|
|
|
ref="tree"
|
|
|
@@ -279,7 +297,7 @@
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- </el-col>
|
|
|
+ </el-col> -->
|
|
|
<!-- <el-col :span="24">
|
|
|
<el-form-item label="附件" prop="contentImage">
|
|
|
<selectUpload @getImgs="upload" :initData="uploadList" />
|
|
|
@@ -757,6 +775,29 @@
|
|
|
:label="`${title}编码`"
|
|
|
prop="onlyCode"
|
|
|
></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ v-if="title == '物料'"
|
|
|
+ label="物料代号"
|
|
|
+ prop="materielCode"
|
|
|
+ >
|
|
|
+ <template slot-scope="{ row }">
|
|
|
+ <el-input v-model="row.materielCode"></el-input>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ v-if="title == '物料'"
|
|
|
+ label="客户代号"
|
|
|
+ prop="clientCode"
|
|
|
+ >
|
|
|
+ <template slot-scope="{ row }">
|
|
|
+ <el-input v-model="row.clientCode"></el-input>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column v-if="title == '物料'" label="重量" prop="weight">
|
|
|
+ <template slot-scope="{ row }">
|
|
|
+ <el-input v-model="row.weight"></el-input>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column label="包装编码" prop="num"></el-table-column>
|
|
|
<el-table-column label="批次号" prop="batchNo"></el-table-column>
|
|
|
<el-table-column
|
|
|
@@ -869,10 +910,14 @@
|
|
|
>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
+
|
|
|
+ <!-- 销售订单 -->
|
|
|
+ <picker ref="pickerRef" @success="pickerSuccess" />
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+ import picker from './components/picker.vue';
|
|
|
import outin from '@/api/warehouseManagement/outin';
|
|
|
import { getTreeByPid, getTreeByGroup } from '@/api/classifyManage';
|
|
|
import warehouseDefinition from '@/api/warehouseManagement/warehouseDefinition';
|
|
|
@@ -895,6 +940,7 @@
|
|
|
import { tableHeader } from '../common';
|
|
|
import { getCode } from '@/api/codeManagement/index.js';
|
|
|
import { number } from 'echarts/core';
|
|
|
+ import { purchaseorderGetById } from '@/api/mes';
|
|
|
export default {
|
|
|
components: {
|
|
|
selectUpload,
|
|
|
@@ -902,10 +948,12 @@
|
|
|
selectType,
|
|
|
WareHouseDailog,
|
|
|
upload,
|
|
|
- ReturnSelect
|
|
|
+ ReturnSelect,
|
|
|
+ picker
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ pickerRow: {},
|
|
|
fromUserList: [],
|
|
|
codeList: [],
|
|
|
materialType,
|
|
|
@@ -993,6 +1041,39 @@
|
|
|
this.initData();
|
|
|
},
|
|
|
methods: {
|
|
|
+ async pickerSuccess(row) {
|
|
|
+ console.log('===row', row);
|
|
|
+ this.pickerRow = row;
|
|
|
+ this.formData.extInfo.documentSource = row.orderNo;
|
|
|
+ this.formData.clientName = row.partaName;
|
|
|
+ this.formData.clientCode = row.partaId;
|
|
|
+ this.formData.extInfo.supplierName = row.partbName;
|
|
|
+ this.formData.extInfo.supplierId = row.partbId;
|
|
|
+ const data = await purchaseorderGetById(row.id);
|
|
|
+ if (this.warehousingMaterialList.length == 0) {
|
|
|
+ let list = data.data.productList.map((item) => {
|
|
|
+ return {
|
|
|
+ ...item,
|
|
|
+ assetName: item.productName,
|
|
|
+ assetCode: item.productCode,
|
|
|
+ categoryId: item.productCategoryId
|
|
|
+ };
|
|
|
+ });
|
|
|
+ this.onSelectTableData(list);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ onClear() {
|
|
|
+ this.formData.extInfo.documentSource = '';
|
|
|
+ this.pickerRow = {};
|
|
|
+ this.formData.clientName = '';
|
|
|
+ this.formData.clientCode = '';
|
|
|
+ this.formData.extInfo.supplierName = '';
|
|
|
+ this.formData.extInfo.supplierId = '';
|
|
|
+ this.$forceUpdate();
|
|
|
+ },
|
|
|
+ handlePicker() {
|
|
|
+ this.$refs.pickerRef.open();
|
|
|
+ },
|
|
|
codeListValue(val) {
|
|
|
console.log(val);
|
|
|
this.formData.extInfo.assetType = val.id;
|
|
|
@@ -1458,7 +1539,8 @@
|
|
|
return {
|
|
|
num: item.num,
|
|
|
batchNo: item.batchNo,
|
|
|
- categoryId: item.id,
|
|
|
+ categoryId:
|
|
|
+ this.formData.bizType == 2 ? item.categoryId : item.id,
|
|
|
count: item.outInNum,
|
|
|
minPackingCount: item.minPackingCount,
|
|
|
packingCount: item.outInNum,
|
|
|
@@ -1488,7 +1570,10 @@
|
|
|
name: it.assetName,
|
|
|
pathIds: item.pathIds,
|
|
|
unit: it.unit,
|
|
|
- packageNo: it.num
|
|
|
+ packageNo: it.num,
|
|
|
+ clientCode: it.clientCode,
|
|
|
+ materielCode: it.materielCode,
|
|
|
+ weight: it.weight
|
|
|
};
|
|
|
});
|
|
|
item.outInDetailRecordAddPOList = list;
|
|
|
@@ -1518,6 +1603,7 @@
|
|
|
},
|
|
|
//添加明细
|
|
|
async onSelectTableData(val) {
|
|
|
+ console.log('qwfffffffffffff===', val);
|
|
|
const res = await getCode('lot_number_code');
|
|
|
|
|
|
this.warehousingMaterialList.push(
|