| | |
| | | <div class="ins_order_add" style=" display: block; "> |
| | | <div v-show="!configShow&&!equipConfigShow&&!cableConfigShow"> |
| | | <el-row class="title"> |
| | | <el-col :span="6" style="padding-left: 20px;text-align: left;">委托单信息 单位成本总价:<span |
| | | <el-col :span="8" style="padding-left: 20px;text-align: left;">委托单信息 单位成本总价:<span |
| | | style="color: #3A7BFA">¥{{total.toFixed(2)}}</span></el-col> |
| | | <el-col :span="18" style="text-align: right;"> |
| | | <el-col :span="16" style="text-align: right;"> |
| | | <el-select v-model="template" size="medium" placeholder="下单模板" style="margin-right: 10px;" v-show="active==1" |
| | | @change="selectInsOrderTemplateById"> |
| | | <el-option v-for="(a, ai) in templates" :key="ai" :value="a.id" :label="a.name"> |
| | |
| | | <div class="search_label"><span class="required-span">* </span>样品数量:</div> |
| | | <div class="search_input"> |
| | | <el-input-number size="small" v-model="addObj.sampleNum" :min="1" :max="100" :precision="0" |
| | | style="width: 65%;" @change="addStandardTree" :disabled="active>1"></el-input-number> |
| | | style="width: 100%;" @change="addStandardTree" :disabled="active>1"></el-input-number> |
| | | </div> |
| | | </el-col> |
| | | <!-- <el-col class="search_thing" :span="6"> |
| | |
| | | :disabled="active>1" |
| | | type="date" |
| | | placeholder="选择日期" |
| | | size="small" format="yyyy-MM-dd" value-format="yyyy-MM-dd"> |
| | | size="small" format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 100%;"> |
| | | </el-date-picker> |
| | | </div> |
| | | </el-col> |
| | | <el-col class="search_thing" :span="6"> |
| | | <el-col class="search_thing" :span="6" v-if="addObj.formType!='其他成品'&&addObj.formType"> |
| | | <div class="search_label"><span class="required-span">* </span>样机完成时间:</div> |
| | | <div class="search_input"> |
| | | <el-date-picker |
| | |
| | | :disabled="active>1" |
| | | type="date" |
| | | placeholder="选择日期" |
| | | size="small" format="yyyy-MM-dd" value-format="yyyy-MM-dd"> |
| | | size="small" format="yyyy-MM-dd" value-format="yyyy-MM-dd" style="width: 100%;"> |
| | | </el-date-picker> |
| | | </div> |
| | | </el-col> |
| | |
| | | 'addObj.sampleNum'(val) { |
| | | this.model = null |
| | | this.standardMethodListId = [] |
| | | }, |
| | | active(val){ |
| | | this.saveLoad = false |
| | | } |
| | | }, |
| | | mounted() { |
| | |
| | | }) |
| | | }) |
| | | // 文件信息 |
| | | this.componentData0.entity.insOrderId = this.currentId |
| | | this.componentData0.entity.insOrderId = this.currentId; |
| | | this.$refs.fileList.selectList() |
| | | } |
| | | }, |
| | |
| | | this.$message.error('请输入样品型号') |
| | | }else if (!this.addObj.appointed) { |
| | | this.$message.error('请选择约定时间') |
| | | }else if (!this.addObj.issueTime) { |
| | | this.$message.error('请选择样机完成时间') |
| | | } else if (!this.sampleList.every(m => m.standardMethodListId&&m.standardMethodListId.length>0)) { |
| | | }else if (!this.sampleList.every(m => m.standardMethodListId&&m.standardMethodListId.length>0)) { |
| | | this.$message.error('请选择检验标准') |
| | | } else if(this.addObj.formType&&this.addObj.formType!='其他成品'&&!this.addObj.issueUser){ |
| | | this.$message.error('请选择通知至样机员') |
| | | }else if(this.addObj.formType&&this.addObj.formType!='其他成品'&&!this.addObj.issueTime){ |
| | | this.$message.error('请选择样机完成时间') |
| | | }else{ |
| | | //校验检验项的要求值和要求描述,仅委托要求 |
| | | // if(this.active==1&&this.isAskOnlyRead){ |
| | |
| | | // 保存模板 |
| | | addTemplateDia() { |
| | | if (this.templateName) { |
| | | this.templateLoading = true; |
| | | if(this.templates.find(m=>m.name==this.templateName)){ |
| | | this.$confirm('已存在同名模板,是否进行替换?', "提示", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | }).then(() => { |
| | | this.saveTemplateDia() |
| | | }).catch(() => {}) |
| | | }else{ |
| | | this.saveTemplateDia() |
| | | } |
| | | } else { |
| | | this.$message.error('请填写模板名称') |
| | | } |
| | | }, |
| | | saveTemplateDia(){ |
| | | this.templateLoading = true; |
| | | this.$axios.post(this.$api.insOrder.addInsOrderTemplate, { |
| | | name: this.templateName, |
| | | thing: JSON.stringify({ |
| | |
| | | this.selectInsOrderTemplate() |
| | | this.templateName = '' |
| | | }) |
| | | } else { |
| | | this.$message.error('请填写模板名称') |
| | | } |
| | | }, |
| | | // 查询模板 |
| | | selectInsOrderTemplateById(e) { |
| | |
| | | }).then(res => { |
| | | this.orderType = res.data |
| | | if (res.data.length > 0) { |
| | | this.addObj.orderType = res.data[0].value |
| | | this.addObj.orderType = 'C' |
| | | } |
| | | }) |
| | | }, |