| | |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="送样日期" prop="sampleDate"> |
| | | <el-date-picker v-model="addObj.sampleDate" type="date" value-format="YYYY-MM-DD" :disabled="active>1" |
| | | <el-date-picker v-model="addObj.sampleDate" type="date" value-format="YYYY-MM-DD" placeholder="请选择本次送样日期" :disabled="active>1" |
| | | size="small"/> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | } |
| | | }, |
| | | saveMethod(sampleList) { |
| | | if (!this.addObj.sampleDate && !this.isEdit) { |
| | | this.$refs.newJuOrder?.validateField('sampleDate') |
| | | this.$message.warning('请选择本次送样日期') |
| | | return |
| | | } |
| | | if (this.addObj.standardTreeId) { |
| | | this.saveData([]); |
| | | return; |
| | |
| | | } |
| | | }, |
| | | saveData(sampleList) { |
| | | if (!this.addObj.sampleDate && !this.isEdit) { |
| | | this.$refs.newJuOrder?.validateField('sampleDate') |
| | | this.$message.warning('请选择本次送样日期') |
| | | return |
| | | } |
| | | this.saveLoad = true |
| | | const insOrder = { |
| | | ...this.addObj, |
| | |
| | | }, |
| | | // 查询模板 |
| | | selectInsOrderTemplateById(e) { |
| | | const loadVersion = ++this.orderLoadVersion |
| | | selectInsOrderTemplateById({id: e}).then(res => { |
| | | if (loadVersion !== this.orderLoadVersion || this.template !== e) return |
| | | const detail = res.data || {} |
| | | let obj = JSON.parse(detail.thing) |
| | | //制单人设置为当前登录用户 |
| | | let user = this.nickName |
| | | obj.addObj.custom = user.name |
| | | obj.addObj.userId = user.userId |
| | | this.addObj = obj.addObj; |
| | | this.addObj = {...obj.addObj, sampleDate: null}; |
| | | this.$nextTick(() => this.$refs.newJuOrder?.clearValidate('sampleDate')) |
| | | this.sampleList = obj.sampleList; |
| | | this.selectTree = obj.selectTree |
| | | // backend already resolved the bound record templates by standard |