| | |
| | | </el-form> |
| | | <el-form class="rightBtn"> |
| | | <el-form-item class="createBtn"> |
| | | <el-button size="small" type="primary" icon="el-icon-document-add" @click="checkTypeVisible = true" |
| | | <el-button size="small" type="primary" icon="el-icon-plus" @click="checkTypeVisible = true" |
| | | style="background-color: rgb(1, 102, 226);">新增检验单</el-button> |
| | | </el-form-item> |
| | | <el-form-item class="getDataBtn"> |
| | |
| | | <el-row :gutter="100"> |
| | | <el-col :span="10"> |
| | | <el-form-item label="来料日期:"> |
| | | <el-input style="width: 300px" type="text" disabled v-model="finishedTable.deliverydate" |
| | | <el-input style="width: 300px" type="text" v-model="finishedTable.deliverydate" |
| | | placeholder="请输入来料日期" autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="10"> |
| | | <el-form-item label="供应商名称:"> |
| | | <el-input style="width: 300px" type="text" disabled v-model="finishedTable.supplier" placeholder="请输入供应商名称" |
| | | <el-input style="width: 300px" type="text" v-model="finishedTable.supplier" placeholder="请输入供应商名称" |
| | | autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | <el-row :gutter="100"> |
| | | <el-col :span="10"> |
| | | <el-form-item label="成品编码:"> |
| | | <el-input style="width: 300px" type="text" disabled v-model="finishedTable.code" placeholder="请输入成品编码" |
| | | <el-input style="width: 300px" type="text" v-model="finishedTable.code" placeholder="请输入成品编码" |
| | | autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="10"> |
| | | <el-form-item label="成品名称:"> |
| | | <el-input style="width: 300px" type="text" disabled v-model="finishedTable.name" placeholder="请输入成品名称" |
| | | <el-input style="width: 300px" type="text" v-model="finishedTable.name" placeholder="请输入成品名称" |
| | | autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | <el-row :gutter="100"> |
| | | <el-col :span="10"> |
| | | <el-form-item label="规格型号:"> |
| | | <el-input style="width: 300px" type="text" disabled v-model="finishedTable.modelandspecification" |
| | | <el-input style="width: 300px" type="text" v-model="finishedTable.modelandspecification" |
| | | placeholder="请输入规格型号" autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="10"> |
| | | <el-form-item label="单位:"> |
| | | <el-input style="width: 300px" type="text" disabled v-model="finishedTable.unit" placeholder="请输入单位" |
| | | <el-input style="width: 300px" type="text" v-model="finishedTable.unit" placeholder="请输入单位" |
| | | autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | <el-row :gutter="100"> |
| | | <el-col :span="10"> |
| | | <el-form-item label="数量:"> |
| | | <el-input style="width: 300px" type="text" disabled v-model="finishedTable.amount" placeholder="请输入数量" |
| | | <el-input style="width: 300px" type="text" v-model="finishedTable.amount" placeholder="请输入数量" |
| | | autocomplete="off" /> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | }, |
| | | // 新增检验 |
| | | async addInspection() { |
| | | let obj = {}; |
| | | if (this.type === 0) { |
| | | addInspect({ |
| | | obj = { |
| | | endTime: this.infoForm.checkdate[1], |
| | | formTime: this.infoForm.formTime, |
| | | mcode: this.infoForm.mcode, |
| | |
| | | type: this.type, |
| | | unit: this.infoForm.unit, |
| | | version: this.version |
| | | }).then(res => { |
| | | this.$message({ |
| | | message: '添加成功!', |
| | | type: 'success' |
| | | }); |
| | | this.$router.push(`Viewdetails/${res.data}`) |
| | | }).catch(error=>{ |
| | | this.$message.error(error.message); |
| | | }) |
| | | } |
| | | } |
| | | if (this.type === 1) { |
| | | const res = await addInspect({ |
| | | obj = { |
| | | endTime: this.commisionSelection.checkdate[1], |
| | | formTime: this.commisionSelection.formTime, |
| | | mcode: this.commisionSelection.mcode, |
| | |
| | | type: this.type, |
| | | unit: this.commisionSelection.unit, |
| | | version: this.version |
| | | }) |
| | | } |
| | | } |
| | | if (this.type === 2) { |
| | | const res = await addInspect({ |
| | | endTime: '2023-08-15', |
| | | obj = { |
| | | endTime: this.finishedTable.checkdate[1], |
| | | formTime: this.finishedTable.deliverydate, |
| | | mcode: this.finishedTable.code, |
| | | name: this.finishedTable.name, |
| | | num: parseInt(this.finishedTable.amount), |
| | | specifications: this.finishedTable.modelandspecification, |
| | | startTime: '2023-08-14', |
| | | startTime: this.finishedTable.checkdate[1], |
| | | supplier: this.finishedTable.supplier, |
| | | type: this.type, |
| | | unit: this.finishedTable.unit, |
| | | version: this.version |
| | | }) |
| | | } |
| | | } |
| | | this.type = 0 |
| | | this.checkTypeVisible = false |
| | | // this.$message({ |
| | | // message: '添加成功!', |
| | | // type: 'success' |
| | | // }); |
| | | // this.$router.push({name: 'Viewdetails'}) |
| | | addInspect(obj).then(res => { |
| | | this.$message({ |
| | | message: '添加成功!', |
| | | type: 'success' |
| | | }); |
| | | this.type = 2 |
| | | this.checkTypeVisible = false |
| | | this.$router.push(`Viewdetails/${res.data}`) |
| | | }).catch(error=>{ |
| | | this.$message.error(error.message); |
| | | }) |
| | | }, |
| | | // 每页条数改变时触发 选择一页显示多少行 |
| | | handleSizeChange(val) { |