| | |
| | | <el-row :gutter="100"> |
| | | <el-col :span="10"> |
| | | <el-form-item label="委托编号"> |
| | | <el-input style="width: 300px" type="text" disabled :value="commisionSelection.entrust_coding" |
| | | <el-input style="width: 300px" type="text" disabled :value="commisionSelection.entrustCoding" |
| | | placeholder="请输入来料日期" autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | <el-col :span="10"> |
| | | <el-form-item label="规格型号:"> |
| | | <el-input style="width: 300px" type="text" disabled :value="commisionSelection.specifications" |
| | | placeholder="请输入型号规格" autocomplete="off" /> |
| | | placeholder="请输入规格型号" autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="10"> |
| | | <el-form-item label="送达时间"> |
| | | <el-input style="width: 300px" type="text" disabled :value="commisionSelection.supplier" |
| | | placeholder="请输入单位" autocomplete="off" /> |
| | | <el-input style="width: 300px" type="text" disabled :value="commisionSelection.formTime" |
| | | placeholder="请输入送达时间" autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="100"> |
| | | <el-col :span="10"> |
| | | <el-form-item label="完成期限"> |
| | | <el-input style="width: 300px" type="text" disabled :value="commisionSelection.completionDeadline" |
| | | <el-input style="width: 300px" type="text" disabled :value="commisionSelection.endTime" |
| | | placeholder="请输入完成期限" autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | <el-col :span="10"> |
| | | <el-form-item label="规格型号:"> |
| | | <el-cascader style="width: 300px" v-model="finishedTable.modelandspecification" |
| | | :options="specificationList" :show-all-levels="false" @change="changeSpe" |
| | | :options="specificationList" @change="changeSpe" |
| | | :props="{label:'name',value:'id',children:'children'}"></el-cascader> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="操作" min-width="8%"> |
| | | <template slot-scope="scope"> |
| | | <el-button type="text" size="small">删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="commisionVisible = false">取 消</el-button> |
| | |
| | | selectedValue: null, |
| | | infoForm: {}, |
| | | commisionSelection: { |
| | | entrust_coding: '', |
| | | entrustCoding: '', |
| | | entrusted: '', |
| | | samples_number: '', |
| | | sample_name: '', |
| | |
| | | }; |
| | | this.infoForm = {}; |
| | | this.commisionSelection = { |
| | | entrust_coding: '', |
| | | entrustCoding: '', |
| | | entrusted: '', |
| | | samples_number: '', |
| | | sample_name: '', |
| | |
| | | }, |
| | | methods: { |
| | | changeSpe(val){ |
| | | console.log(val); |
| | | this.tmp.specificationsId = val[val.length-1]; |
| | | let arr1 = this.specificationList[0].children.filter(item=>{ |
| | | return item.id==val[1] |
| | | let arr1 = this.specificationList.filter(item=>{ |
| | | return item.id==val[0] |
| | | }); |
| | | let arr2 = arr1[0].children.filter(item=>{ |
| | | return item.id = val[2] |
| | | return item.id = val[1] |
| | | }) |
| | | let speName = arr1[0].name + "-" + arr2[0].name; |
| | | this.speName = speName; |
| | | console.log(arr1); |
| | | console.log(arr2); |
| | | |
| | | }, |
| | | getSpecifications(val){ |
| | |
| | | }, |
| | | async selectSpecificationByMaterielId(mId){ |
| | | await getSpecificationByMaterielId({id : mId}).then(res=>{ |
| | | this.specificationList = new Array(res.data); |
| | | this.specificationList = res.data.children; |
| | | }).catch(error => { |
| | | this.$message.error(error.message); |
| | | }); |
| | |
| | | }) |
| | | } |
| | | } |
| | | this.total = this.inspectionTable.length |
| | | this.total = this.res.data.total; |
| | | }, |
| | | reset() { |
| | | this.countSize = 1; |
| | |
| | | }, |
| | | handleCommisionSelection() { |
| | | this.commisionSelection = this.tmp |
| | | this.commisionSelection.checkdate = [] |
| | | this.commisionVisible = false |
| | | }, |
| | | handleRawMaterialSelection() { |
| | | this.infoForm = this.tmp |
| | | console.log(this.infoForm); |
| | | this.rawmaterialVisible = false |
| | | }, |
| | | handleRadioChange() { |
| | |
| | | checkdate.push(item['updateTime']) |
| | | item['checkdate'] = checkdate // 检验日期 |
| | | }) |
| | | |
| | | this.commisionTable = res.data |
| | | }) |
| | | } |
| | |
| | | // 新增检验 |
| | | async addInspection() { |
| | | let obj = {}; |
| | | //原材料 |
| | | if (this.type === 0) { |
| | | obj = { |
| | | endTime: this.infoForm.checkdate[1], |
| | |
| | | version: this.version |
| | | } |
| | | } |
| | | //委托 |
| | | if (this.type === 2) { |
| | | obj = { |
| | | endTime: this.commisionSelection.checkdate[1], |
| | |
| | | version: this.version |
| | | } |
| | | } |
| | | //成品 |
| | | if (this.type === 1) { |
| | | obj = { |
| | | supplier:"supplier", |
| | | formTime: "2023-09-09", |
| | | endTime: this.finishedTable.checkdate[1], |
| | | mcode: this.finishedTable.code, |
| | | name: this.tmp.name, |
| | | num: parseInt(this.finishedTable.amount), |
| | | specifications: this.speName, |
| | | specificationId: this.finishedTable.modelandspecification[2], |
| | | specificationId: this.finishedTable.modelandspecification[1], |
| | | startTime: this.finishedTable.checkdate[0], |
| | | type: this.type, |
| | | unit: this.finishedTable.unit, |
| | |
| | | this.currentPage = val |
| | | this.selectInspectsList() |
| | | }, |
| | | // //表单校验 |
| | | // validateForm(infoForm){ |
| | | // console.log(this.infoForm); |
| | | |
| | | // if (infoForm.checkdate == undefined) { |
| | | // alert('请输入检验时间'); |
| | | // return false; |
| | | // } |
| | | // // 校验通过 |
| | | // return true; |
| | | // }, |
| | | //确定跳转 |
| | | QUEding() { |
| | | console.log(this.infoForm); |
| | | if (this.type==0 &&(this.infoForm.checkdate[0] == undefined || this.infoForm.checkdate[1] == undefined)) { |
| | | this.$message({ |
| | | message: '请选择检验时间', |