|
|
@@ -416,18 +416,28 @@
|
|
|
<workOrder ref="workOrderRef" @choose="handleChoose" />
|
|
|
<!-- 生产工单 -->
|
|
|
<produceOrder ref="produceOrderRef" @choose="handleChoose" />
|
|
|
- <EquipmentDialog
|
|
|
+ <!-- <EquipmentDialog
|
|
|
ref="equipmentRefs"
|
|
|
@choose="handleMainChoose"
|
|
|
:type="2"
|
|
|
:treeIds="['9']"
|
|
|
- />
|
|
|
+ /> -->
|
|
|
<!-- 成品检验 -->
|
|
|
<stokledger ref="stokledgerRef" @choose="handleStokledgerChoose" />
|
|
|
<ProductionVersion ref="versionRefs" @changeProduct="changeProduct" />
|
|
|
+ <!-- 受托收货单 -->
|
|
|
+ <entrustedDialog
|
|
|
+ :type="2"
|
|
|
+ @choose="entrustedChoose"
|
|
|
+ @closeEntrusted="closeEntrusted"
|
|
|
+ v-if="entrustedVisible"
|
|
|
+ :entrustedVisible="entrustedVisible"
|
|
|
+ />
|
|
|
</el-form>
|
|
|
</template>
|
|
|
<script>
|
|
|
+ import { entrustedDetails } from '@/api/classifyManage';
|
|
|
+ import entrustedDialog from './entrustedDialog.vue';
|
|
|
import deptSelect from '@/components/CommomSelect/dept-select.vue';
|
|
|
import fileUpload from '@/components/addDoc/index.vue';
|
|
|
import ProductionVersion from '@/views/inspectionWork/components/ProductionVersion.vue';
|
|
|
@@ -435,7 +445,7 @@
|
|
|
import productionPlan from './productionPlan';
|
|
|
import workOrder from './workOrder';
|
|
|
import produceOrder from './produceOrder';
|
|
|
- import EquipmentDialog from './equipmentDialog';
|
|
|
+ // import EquipmentDialog from './equipmentDialog';
|
|
|
import stokledger from './stokledger';
|
|
|
|
|
|
//接口
|
|
|
@@ -449,7 +459,7 @@
|
|
|
import { getProduceTaskList } from '@/api/aps';
|
|
|
export default {
|
|
|
components: {
|
|
|
- EquipmentDialog,
|
|
|
+ // EquipmentDialog,
|
|
|
produceOrder,
|
|
|
workOrder,
|
|
|
productionPlan,
|
|
|
@@ -457,7 +467,8 @@
|
|
|
deptSelect,
|
|
|
fileUpload,
|
|
|
stokledger,
|
|
|
- ProductionVersion
|
|
|
+ ProductionVersion,
|
|
|
+ entrustedDialog
|
|
|
},
|
|
|
props: {
|
|
|
form: {
|
|
|
@@ -575,7 +586,8 @@
|
|
|
isInfoChangeModel: true,
|
|
|
isOnce: true,
|
|
|
isListData: [{}],
|
|
|
- produceTaskList: []
|
|
|
+ produceTaskList: [],
|
|
|
+ entrustedVisible: false
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
@@ -676,12 +688,14 @@
|
|
|
},
|
|
|
//计划来源选择
|
|
|
planSourceChange(val) {
|
|
|
+ console.log(val, 'val 333');
|
|
|
if (val) {
|
|
|
this.addProduct();
|
|
|
this.$emit('changeSource');
|
|
|
}
|
|
|
},
|
|
|
addProduct() {
|
|
|
+ console.log(this.form.planSource, '00000000000000');
|
|
|
if (this.form.planSource == 1) {
|
|
|
this.$refs.warehousingRef.open();
|
|
|
} else if (this.form.planSource == 2) {
|
|
|
@@ -691,15 +705,70 @@
|
|
|
} else if (this.form.planSource == 4) {
|
|
|
this.$refs.produceOrderRef.open();
|
|
|
} else if (this.form.planSource == 5) {
|
|
|
- //主数据
|
|
|
- this.$refs.equipmentRefs.open();
|
|
|
+ //受托收货单
|
|
|
+ // this.$refs.equipmentRefs.open();
|
|
|
+ // this.$refs.entrustedRef.open();
|
|
|
+ this.entrustedVisible = true;
|
|
|
+ console.log(this.entrustedVisible, '00000');
|
|
|
} else if (this.form.planSource == 6) {
|
|
|
//库存台账
|
|
|
this.$refs.stokledgerRef.open();
|
|
|
}
|
|
|
},
|
|
|
+ // 受托收货单选择
|
|
|
+ async entrustedChoose(val) {
|
|
|
+ this.fieldAssig(val);
|
|
|
+ const data = await getDetailInfo(val.productId);
|
|
|
+ this.categoryInfo = data.category;
|
|
|
+ // *** 新增 批次号,来源单据 字段传递
|
|
|
+ this.form.inspectionStandards = this.categoryInfo.measureType;
|
|
|
+ this.$emit('setSourceData', val);
|
|
|
+ let categoryQms = data.categoryQms;
|
|
|
+ if (!categoryQms || categoryQms.length == 0) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ let obj = categoryQms.find((el) => el.dataType == 3);
|
|
|
+ if (!obj) return;
|
|
|
+ if (obj.checkFormula == 0) {
|
|
|
+ this.changeQualityMode(0);
|
|
|
+ }
|
|
|
+ if (obj.checkFormula == 1) {
|
|
|
+ this.changeQualityMode(1);
|
|
|
+ }
|
|
|
+ console.log(val, 'val 3');
|
|
|
+ },
|
|
|
+ fieldAssig(val) {
|
|
|
+ this.form.planSourceCode = val.entrustedReceiveCode;
|
|
|
+ this.form.planSourceId = val.entrustedReceiveId;
|
|
|
+ this.form.supplierName = val.supplierName;
|
|
|
+ this.form.supplierMark = val.supplierMark;
|
|
|
+ this.form.productName = val.productName;
|
|
|
+ this.form.productCode = val.productCode;
|
|
|
+ this.form.batchNo = val.batchNo;
|
|
|
+ this.form.specification = val.specification;
|
|
|
+ this.form.modelType = val.modelType;
|
|
|
+ this.form.brandNo = val.productBrand;
|
|
|
+ this.form.productNumber = val.totalCount;
|
|
|
+ this.form.qualifiedNumber = val.qualifiedNumber;
|
|
|
+ this.form.unqualifiedNumber = val.unqualifiedNumber;
|
|
|
+ this.form.qualificationRate = val.qualificationRate;
|
|
|
+ this.form.totalWeight = val.totalWeight;
|
|
|
+ this.form.sampleNumber = val.sampleNumber;
|
|
|
+ this.form.inspectionStandards = val.inspectionStandards;
|
|
|
+ this.form.produceTaskName = val.taskName;
|
|
|
+ this.form.produceTaskId = val.taskId;
|
|
|
+ this.form.productId = val.productId;
|
|
|
+ },
|
|
|
+ closeEntrusted() {
|
|
|
+ this.entrustedVisible = false;
|
|
|
+ },
|
|
|
//根据类型获取计划来源下拉
|
|
|
typeChange(val, type) {
|
|
|
+ console.log(val, 'val 3456');
|
|
|
+ if (val == 5) {
|
|
|
+ this.sourceList = [{ label: '受托收货单', value: '5' }];
|
|
|
+ return;
|
|
|
+ }
|
|
|
if (val != 2) {
|
|
|
this.form.produceRoutingId = '';
|
|
|
this.form.produceRoutingName = '';
|
|
|
@@ -869,7 +938,7 @@
|
|
|
taskId = '',
|
|
|
source
|
|
|
) {
|
|
|
- console.log('执行了没 333');
|
|
|
+ console.log('执行了没 333', val);
|
|
|
const data = await getDetailInfo(val);
|
|
|
this.categoryInfo = data.category;
|
|
|
|