|
|
@@ -1,41 +1,62 @@
|
|
|
<template>
|
|
|
-
|
|
|
<el-form ref="form1" :model="form" :rules="rules" label-width="120px">
|
|
|
<el-row>
|
|
|
<el-col :span="6">
|
|
|
- <el-form-item label="类型:" prop="type">
|
|
|
- <DictSelection dictName="质检计划类型" v-model="form.type" clearable @change="typeChange"
|
|
|
- :disabled="btnType == 'detail' || btnType == 'issued'"></DictSelection>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col :span="6">
|
|
|
- <el-form-item label="计划来源:" prop="planSource">
|
|
|
- <el-select v-model="form.planSource" placeholder="请选择" style="width: 100%" clearable
|
|
|
- @change="planSourceChange" :disabled="btnType == 'detail' || btnType == 'issued'">
|
|
|
- <el-option :label="item.label" v-for="item in sourceList" :key="item.value" :value="item.value" />
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
+ <el-form-item label="类型:" prop="type">
|
|
|
+ <DictSelection
|
|
|
+ dictName="质检计划类型"
|
|
|
+ v-model="form.type"
|
|
|
+ clearable
|
|
|
+ @change="typeChange"
|
|
|
+ :disabled="btnType == 'detail' || btnType == 'issued'"
|
|
|
+ ></DictSelection>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="6">
|
|
|
+ <el-form-item label="计划来源:" prop="planSource">
|
|
|
+ <el-select
|
|
|
+ v-model="form.planSource"
|
|
|
+ placeholder="请选择"
|
|
|
+ style="width: 100%"
|
|
|
+ clearable
|
|
|
+ @change="planSourceChange"
|
|
|
+ :disabled="btnType == 'detail' || btnType == 'issued'"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ :label="item.label"
|
|
|
+ v-for="item in sourceList"
|
|
|
+ :key="item.value"
|
|
|
+ :value="item.value"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
<!-- <el-col :span="6">
|
|
|
<el-form-item label="名称:" prop="name">
|
|
|
<el-input clearable v-model="form.name" placeholder="请输入"
|
|
|
:disabled="btnType == 'detail' || btnType == 'issued'" />
|
|
|
</el-form-item>
|
|
|
- </el-col> -->
|
|
|
+ </el-col>-->
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label="检验方式:" prop="qualityMode">
|
|
|
- <DictSelection dictName="取样类型" v-model="form.qualityMode" clearable
|
|
|
- :disabled="btnType == 'detail' || btnType == 'issued'">
|
|
|
- </DictSelection>
|
|
|
+ <DictSelection
|
|
|
+ dictName="取样类型"
|
|
|
+ v-model="form.qualityMode"
|
|
|
+ clearable
|
|
|
+ :disabled="btnType == 'detail' || btnType == 'issued'"
|
|
|
+ ></DictSelection>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label="检验标准" prop="inspectionStandards">
|
|
|
<!-- 计量 计重 -->
|
|
|
<el-select style="width: 100%" v-model="form.inspectionStandards" placeholder="请选择">
|
|
|
- <el-option v-for="item in inspectionStandardsList" :label="item.label" :value="item.value"
|
|
|
- :key="item.value">
|
|
|
- </el-option>
|
|
|
+ <el-option
|
|
|
+ v-for="item in inspectionStandardsList"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"
|
|
|
+ :key="item.value"
|
|
|
+ ></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
@@ -48,8 +69,12 @@
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label="名称:" prop="name">
|
|
|
- <el-input clearable v-model="form.name" placeholder="请输入"
|
|
|
- :disabled="btnType == 'detail' || btnType == 'issued'" />
|
|
|
+ <el-input
|
|
|
+ clearable
|
|
|
+ v-model="form.name"
|
|
|
+ placeholder="请输入"
|
|
|
+ :disabled="btnType == 'detail' || btnType == 'issued'"
|
|
|
+ />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<!-- <el-col :span="6">
|
|
|
@@ -60,49 +85,83 @@
|
|
|
<el-option label="否" :value="0" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- </el-col> -->
|
|
|
+ </el-col>-->
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label="执行部门:" prop="groupId">
|
|
|
- <deptSelect :disabled="btnType == 'detail'" v-model="form.groupId" @changeGroup="searchDeptNodeClick" />
|
|
|
+ <deptSelect
|
|
|
+ :disabled="btnType == 'detail'"
|
|
|
+ v-model="form.groupId"
|
|
|
+ @changeGroup="searchDeptNodeClick"
|
|
|
+ />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label="执行人员:" prop="executeId">
|
|
|
- <el-select :disabled="btnType == 'detail'" v-model="form.executeId" @change="changeExecutor" filterable
|
|
|
- style="width: 100%">
|
|
|
- <el-option v-for="item in executorList" :key="item.id" :value="item.id" :label="item.name"></el-option>
|
|
|
+ <el-select
|
|
|
+ :disabled="btnType == 'detail'"
|
|
|
+ v-model="form.executeId"
|
|
|
+ @change="changeExecutor"
|
|
|
+ filterable
|
|
|
+ style="width: 100%"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in executorList"
|
|
|
+ :key="item.id"
|
|
|
+ :value="item.id"
|
|
|
+ :label="item.name"
|
|
|
+ ></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
-
|
|
|
</el-row>
|
|
|
<div style="text-align: right;margin-bottom: 22px;">
|
|
|
<div @click="toggleExpand">
|
|
|
- <div v-if="isExpanded"><i class="el-icon-arrow-up"></i>收起</div>
|
|
|
- <div v-if="!isExpanded"><i class="el-icon-arrow-down"></i>展开更多</div>
|
|
|
+ <div v-if="isExpanded">
|
|
|
+ <i class="el-icon-arrow-up"></i>收起
|
|
|
+ </div>
|
|
|
+ <div v-if="!isExpanded">
|
|
|
+ <i class="el-icon-arrow-down"></i>展开更多
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div v-if="isExpanded">
|
|
|
<el-row>
|
|
|
<el-col :span="6">
|
|
|
- <el-form-item label="自动派单:" prop="autoOrder">
|
|
|
- <el-select v-model="form.autoOrder" placeholder="请选择" style="width: 100%"
|
|
|
- :disabled="btnType == 'detail' || btnType == 'issued'" clearable>
|
|
|
- <el-option label="是" :value="1" />
|
|
|
- <el-option label="否" :value="0" />
|
|
|
- </el-select>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
+ <el-form-item label="自动派单:" prop="autoOrder">
|
|
|
+ <el-select
|
|
|
+ v-model="form.autoOrder"
|
|
|
+ placeholder="请选择"
|
|
|
+ style="width: 100%"
|
|
|
+ :disabled="btnType == 'detail' || btnType == 'issued'"
|
|
|
+ clearable
|
|
|
+ >
|
|
|
+ <el-option label="是" :value="1" />
|
|
|
+ <el-option label="否" :value="0" />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
<el-col :span="6">
|
|
|
- <el-form-item label="开始时间:" prop="planStartTime">
|
|
|
- <el-date-picker :disabled="btnType == 'detail'" class="w100" v-model="form.planStartTime" type="date"
|
|
|
- value-format="yyyy-MM-dd" placeholder="请输入"></el-date-picker>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
+ <el-form-item label="开始时间:" prop="planStartTime">
|
|
|
+ <el-date-picker
|
|
|
+ :disabled="btnType == 'detail'"
|
|
|
+ class="w100"
|
|
|
+ v-model="form.planStartTime"
|
|
|
+ type="date"
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
+ placeholder="请输入"
|
|
|
+ ></el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label="结束时间:" prop="planEndTime">
|
|
|
- <el-date-picker :disabled="btnType == 'detail'" class="w100" v-model="form.planEndTime" type="date"
|
|
|
- value-format="yyyy-MM-dd" placeholder="请输入"></el-date-picker>
|
|
|
+ <el-date-picker
|
|
|
+ :disabled="btnType == 'detail'"
|
|
|
+ class="w100"
|
|
|
+ v-model="form.planEndTime"
|
|
|
+ type="date"
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
+ placeholder="请输入"
|
|
|
+ ></el-date-picker>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<!-- <el-col :span="6">
|
|
|
@@ -110,7 +169,7 @@
|
|
|
<DictSelection dictName="质检计划类型" v-model="form.type" clearable @change="typeChange"
|
|
|
:disabled="btnType == 'detail' || btnType == 'issued'"></DictSelection>
|
|
|
</el-form-item>
|
|
|
- </el-col> -->
|
|
|
+ </el-col>-->
|
|
|
<!-- <el-col :span="6">
|
|
|
<el-form-item label="计划来源:" prop="planSource">
|
|
|
<el-select v-model="form.planSource" placeholder="请选择" style="width: 100%" clearable
|
|
|
@@ -118,7 +177,7 @@
|
|
|
<el-option :label="item.label" v-for="item in sourceList" :key="item.value" :value="item.value" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- </el-col> -->
|
|
|
+ </el-col>-->
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label="来源编码:" prop="planSourceCode">
|
|
|
<el-input v-model="form.planSourceCode" disabled />
|
|
|
@@ -160,8 +219,16 @@
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label="数量:" prop="productNumber">
|
|
|
- <el-input type="number" v-model="form.productNumber" :disabled="form.planSource == '5' ? false : true">
|
|
|
- <template #append>{{ form.dimension == 3 ? form.packingUnit : form.dimension == 2 ? form.measureUnit : categoryInfo.measuringUnit }}</template>
|
|
|
+ <el-input
|
|
|
+ type="number"
|
|
|
+ v-model="form.productNumber"
|
|
|
+ :disabled="quantityShow ? false : true"
|
|
|
+ >
|
|
|
+ <!-- *** 之前只有主数据的显示 现在主数据 + 生产检验类型的都显示-->
|
|
|
+ <!-- :disabled="form.planSource == '5' ? false : true" -->
|
|
|
+ <template
|
|
|
+ #append
|
|
|
+ >{{ form.dimension == 3 ? form.packingUnit : form.dimension == 2 ? form.measureUnit : categoryInfo.measuringUnit }}</template>
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
@@ -188,12 +255,19 @@
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label="合格率:" prop="qualificationRate">
|
|
|
- <el-input v-model="form.qualificationRate" :disabled="btnType == 'detail' || btnType == 'issued'" />
|
|
|
+ <el-input
|
|
|
+ v-model="form.qualificationRate"
|
|
|
+ :disabled="btnType == 'detail' || btnType == 'issued'"
|
|
|
+ />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label="总重量:" prop="totalWeight">
|
|
|
- <el-input type="number" v-model="form.totalWeight" :disabled="btnType == 'detail' || btnType == 'issued'">
|
|
|
+ <el-input
|
|
|
+ type="number"
|
|
|
+ v-model="form.totalWeight"
|
|
|
+ :disabled="btnType == 'detail' || btnType == 'issued'"
|
|
|
+ >
|
|
|
<template #append>{{ categoryInfo.weightUnit }}</template>
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
@@ -214,18 +288,25 @@
|
|
|
</DictSelection>
|
|
|
</div>
|
|
|
</el-form-item>
|
|
|
- </el-col> -->
|
|
|
+ </el-col>-->
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label="抽样比例:" prop="sampleProportion">
|
|
|
- <el-input v-model="form.sampleProportion" :disabled="btnType == 'detail' || btnType == 'issued'">
|
|
|
+ <el-input
|
|
|
+ v-model="form.sampleProportion"
|
|
|
+ :disabled="btnType == 'detail' || btnType == 'issued'"
|
|
|
+ >
|
|
|
<template #append>%</template>
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
|
<el-form-item label="备注:" prop="remark">
|
|
|
- <el-input type="textarea" v-model="form.remark" placeholder="请输入"
|
|
|
- :disabled="btnType == 'detail' || btnType == 'issued'" />
|
|
|
+ <el-input
|
|
|
+ type="textarea"
|
|
|
+ v-model="form.remark"
|
|
|
+ placeholder="请输入"
|
|
|
+ :disabled="btnType == 'detail' || btnType == 'issued'"
|
|
|
+ />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="6">
|
|
|
@@ -242,7 +323,6 @@
|
|
|
<produceOrder ref="produceOrderRef" @choose="handleChoose" />
|
|
|
<EquipmentDialog ref="equipmentRefs" @choose="handleMainChoose" :type="2" :treeIds="['9']" />
|
|
|
<stokledger ref="stokledgerRef" @choose="handleStokledgerChoose" />
|
|
|
-
|
|
|
</el-form>
|
|
|
</template>
|
|
|
<script>
|
|
|
@@ -277,7 +357,7 @@ export default {
|
|
|
props: {
|
|
|
form: {
|
|
|
type: Object,
|
|
|
- default: () => { }
|
|
|
+ default: () => {}
|
|
|
},
|
|
|
btnType: {
|
|
|
type: String,
|
|
|
@@ -286,12 +366,27 @@ export default {
|
|
|
packingLists: {
|
|
|
type: Array,
|
|
|
default: () => []
|
|
|
- },
|
|
|
+ }
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ quantityShow() {
|
|
|
+ if (this.btnType == 'detail') {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ let flag =
|
|
|
+ this.form.planSource == '5' ||
|
|
|
+ this.form.planSource == '2' ||
|
|
|
+ this.form.planSource == '3' ||
|
|
|
+ this.form.planSource == '4';
|
|
|
+ return flag;
|
|
|
+ }
|
|
|
},
|
|
|
watch: {
|
|
|
'form.productNumber': {
|
|
|
handler(newVal) {
|
|
|
- if (newVal && this.form.planSource == '5') { //主数据来源才生效
|
|
|
+ // 现在生产检验所有的类型也用这个
|
|
|
+ // if (newVal && this.form.planSource == '5') { //主数据来源才生效
|
|
|
+ if (newVal && this.quantityShow) {
|
|
|
this.$emit('changeProductNumberModel', newVal);
|
|
|
this.form.totalWeight = this.categoryInfo.netWeight * newVal || 0;
|
|
|
} else {
|
|
|
@@ -394,7 +489,7 @@ export default {
|
|
|
]
|
|
|
},
|
|
|
isExpanded: false, // 控制展开/收起状态
|
|
|
- categoryInfo: {},
|
|
|
+ categoryInfo: {}
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
@@ -447,7 +542,7 @@ export default {
|
|
|
}
|
|
|
const res = await getUserPage(data);
|
|
|
this.executorList = res.list;
|
|
|
- } catch (error) { }
|
|
|
+ } catch (error) {}
|
|
|
},
|
|
|
// 执行人选择
|
|
|
changeExecutor(val) {
|
|
|
@@ -473,11 +568,13 @@ export default {
|
|
|
this.$refs.workOrderRef.open();
|
|
|
} else if (this.form.planSource == 4) {
|
|
|
this.$refs.produceOrderRef.open();
|
|
|
- } else if (this.form.planSource == 5) { //主数据
|
|
|
+ } else if (this.form.planSource == 5) {
|
|
|
+ //主数据
|
|
|
this.$refs.equipmentRefs.open();
|
|
|
- } else if (this.form.planSource == 6) { //库存台账
|
|
|
+ } else if (this.form.planSource == 6) {
|
|
|
+ //库存台账
|
|
|
this.$refs.stokledgerRef.open();
|
|
|
- }
|
|
|
+ }
|
|
|
},
|
|
|
//根据类型获取计划来源下拉
|
|
|
typeChange(val) {
|
|
|
@@ -492,7 +589,7 @@ export default {
|
|
|
} else if (val == 3) {
|
|
|
this.sourceList = [
|
|
|
{ label: '主数据', value: '5' },
|
|
|
- { label: '库存台账', value: '6' },
|
|
|
+ { label: '库存台账', value: '6' }
|
|
|
];
|
|
|
}
|
|
|
},
|
|
|
@@ -501,21 +598,21 @@ export default {
|
|
|
handleMainChoose(val) {
|
|
|
console.log(val, '主数据根据来源得到产品');
|
|
|
if (!val) return;
|
|
|
- this.form.productName = val.name;//名称
|
|
|
- this.form.productCode = val.code;//编码
|
|
|
- this.form.specification = val.specification;//规格
|
|
|
+ this.form.productName = val.name; //名称
|
|
|
+ this.form.productCode = val.code; //编码
|
|
|
+ this.form.specification = val.specification; //规格
|
|
|
this.form.modelType = val.modelType; //型号
|
|
|
this.form.brandNo = val.brandNum; //牌号
|
|
|
this.form.totalWeight = val.totalWeight; //总重量
|
|
|
- this.form.inspectionStandards = val.inspectionStandards;//检验标准
|
|
|
+ this.form.inspectionStandards = val.inspectionStandards; //检验标准
|
|
|
this.form.isConsumable = val.isConsumable; //0 单件 1 批量
|
|
|
this.form.productId = val.id;
|
|
|
this.form.netWeight = val.netWeight; //净重
|
|
|
// console.log(this.form.type)
|
|
|
- this.getProductDetails(this.form.productId)
|
|
|
+ this.getProductDetails(this.form.productId);
|
|
|
this.$emit('changesMainNumberModal', this.form.productNumber);
|
|
|
- if(this.form.type!=3){
|
|
|
- this.$emit('getQualityTemplate', val.code)
|
|
|
+ if (this.form.type != 3) {
|
|
|
+ this.$emit('getQualityTemplate', val.code);
|
|
|
}
|
|
|
},
|
|
|
|
|
|
@@ -525,28 +622,30 @@ export default {
|
|
|
console.log(val, '库存台账根据来源得到产品');
|
|
|
if (!val) return;
|
|
|
if (dimension == 3) {
|
|
|
- this.form.productNumber = val.measureQuantity;//数量
|
|
|
- this.form.packingUnit = val.packingUnit//包装单位
|
|
|
+ this.form.productNumber = val.measureQuantity; //数量
|
|
|
+ this.form.packingUnit = val.packingUnit; //包装单位
|
|
|
} else {
|
|
|
- this.form.productNumber = val.outboundNum;//数量
|
|
|
- this.form.totalWeight = (val.weight / val.measureQuantity * val.outboundNum).toFixed(2); //总重量
|
|
|
-
|
|
|
+ this.form.productNumber = val.outboundNum; //数量
|
|
|
+ this.form.totalWeight = (
|
|
|
+ (val.weight / val.measureQuantity) *
|
|
|
+ val.outboundNum
|
|
|
+ ).toFixed(2); //总重量
|
|
|
}
|
|
|
this.form.dimension = dimension;
|
|
|
- this.form.measureUnit = val.measureUnit//计量单位
|
|
|
+ this.form.measureUnit = val.measureUnit; //计量单位
|
|
|
|
|
|
- this.form.productName = val.categoryName;//名称
|
|
|
- this.form.productCode = val.categoryCode;//编码
|
|
|
- this.form.specification = val.specification;//规格
|
|
|
- this.form.modelType = val.categoryModel ; //型号
|
|
|
+ this.form.productName = val.categoryName; //名称
|
|
|
+ this.form.productCode = val.categoryCode; //编码
|
|
|
+ this.form.specification = val.specification; //规格
|
|
|
+ this.form.modelType = val.categoryModel; //型号
|
|
|
this.form.brandNo = val.brandNum; //牌号
|
|
|
- this.form.inspectionStandards = val.inspectionStandards;//检验标准
|
|
|
+ this.form.inspectionStandards = val.inspectionStandards; //检验标准
|
|
|
this.form.productId = val.categoryId;
|
|
|
this.form.batchNo = val.batchNo; //批次号
|
|
|
this.getProductDetails(this.form.productId);
|
|
|
this.$emit('changesStokledgerNumberModal', list, dimension);
|
|
|
- if(this.form.type!=3){
|
|
|
- this.$emit('getQualityTemplate', val.categoryCode)
|
|
|
+ if (this.form.type != 3) {
|
|
|
+ this.$emit('getQualityTemplate', val.categoryCode);
|
|
|
}
|
|
|
},
|
|
|
|
|
|
@@ -554,8 +653,20 @@ export default {
|
|
|
handleChoose(val) {
|
|
|
console.log(val, '根据来源得到产品');
|
|
|
if (!val) return;
|
|
|
- this.form.planSourceId = val.id;
|
|
|
this.form.planSourceCode = val.receiveNo;
|
|
|
+ // *** 之前未对生产检验进行判断 当类型是生产检验的时候 productId 是 undefined
|
|
|
+ // 直接赋值 productId 不改变原来逻辑
|
|
|
+ // 这里的字段 receiveNo 从生产检验(生产计划,生产订单,生产工单)里面没有 ->对应的是code 字段 但是不能够进入 getList 方法
|
|
|
+ // 定义一个专门给 生产检验(生产计划,生产订单,生产工单) 的字段传递下去 productionCode
|
|
|
+ let productionCode = '';
|
|
|
+ if (this.form.type == 2) {
|
|
|
+ val.productId = val.categoryId;
|
|
|
+ productionCode = val.code;
|
|
|
+ this.form.planSourceCode = productionCode;
|
|
|
+ }
|
|
|
+ // ***
|
|
|
+ this.form.planSourceId = val.id;
|
|
|
+ // this.form.planSourceCode = val.receiveNo; // 放上去 方便判断
|
|
|
this.form.supplierName = val.supplierName;
|
|
|
this.form.supplierMark = val.supplierMark;
|
|
|
this.form.productName = val.productName;
|
|
|
@@ -580,22 +691,36 @@ export default {
|
|
|
let batchNo = val.batchNo;
|
|
|
let productCategoryId = val.productCategoryId;
|
|
|
let productCategoryName = val.productCategoryName;
|
|
|
-
|
|
|
+
|
|
|
if (receiveNo && categoryCode && categoryid) {
|
|
|
- this.$emit('getList', receiveNo, categoryCode, productCategoryId, productCategoryName, categoryid, batchNo, val.supplierName, val.supplierMark);
|
|
|
+ this.$emit(
|
|
|
+ 'getList',
|
|
|
+ receiveNo,
|
|
|
+ categoryCode,
|
|
|
+ productCategoryId,
|
|
|
+ productCategoryName,
|
|
|
+ categoryid,
|
|
|
+ batchNo,
|
|
|
+ val.supplierName,
|
|
|
+ val.supplierMark
|
|
|
+ );
|
|
|
}
|
|
|
- this.getProductDetails(this.form.productId)
|
|
|
+ this.getProductDetails(this.form.productId, batchNo, productionCode);
|
|
|
},
|
|
|
//获取产品详情信息-来自主数据
|
|
|
- async getProductDetails(val) {
|
|
|
- const data = await getDetailInfo(val)
|
|
|
- this.categoryInfo = data.category
|
|
|
- this.$emit('getCategoryInfo', data)
|
|
|
+ // *** 增加 batchNo productionCode 字段 给 生产检验类型用
|
|
|
+ async getProductDetails(val, batchNo = '', productionCode = '') {
|
|
|
+ const data = await getDetailInfo(val);
|
|
|
+ this.categoryInfo = data.category;
|
|
|
+ // *** 新增 批次号,来源单据 字段传递
|
|
|
+ data.category.batchNo = batchNo;
|
|
|
+ data.category.planSourceCode = productionCode;
|
|
|
+ // ***
|
|
|
+ this.$emit('getCategoryInfo', data);
|
|
|
},
|
|
|
getsampleMeasureUnit(val) {
|
|
|
this.$set(this.form, 'sampleMeasureUnit', val);
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
};
|
|
|
</script>
|