| | |
| | | font-size: 18px; |
| | | } |
| | | |
| | | .el-select-dropdown__item { |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | </style> |
| | | <style> |
| | | .ins_order_add .el-input-group__append, |
| | |
| | | <el-row class="title"> |
| | | <el-col :span="6" style="padding-left: 20px;">委托单信息</el-col> |
| | | <el-col :span="18" style="text-align: right;"> |
| | | <el-select v-model="template" size="medium" placeholder="下单模板" style="margin-right: 10px;" v-show="active<2"> |
| | | <el-option v-for="(a, ai) in templates" :key="ai" :value="a.value" :label="a.label"></el-option> |
| | | <el-select v-model="template" size="medium" placeholder="下单模板" style="margin-right: 10px;" v-show="active==1"> |
| | | <el-option v-for="(a, ai) in templates" :key="ai" :value="a.value" :label="a.label"> |
| | | <span style="float: left">{{ a.label }}</span> |
| | | <i class="el-icon-delete" style="float: right; color: #66b1ff; font-size: 16px" @click.stop="handleDelete"></i> |
| | | </el-option> |
| | | </el-select> |
| | | <el-button size="medium" @click="" v-show="active<2"> |
| | | <el-button size="medium" @click="templateDia=true" v-show="active==1"> |
| | | <span style="color: #3A7BFA;">保存模板</span> |
| | | </el-button> |
| | | <el-button size="medium" type="primary" @click="save" :loading="saveLoad" v-show="active<2">提交</el-button> |
| | | <el-button size="medium" type="primary" @click="save" :loading="saveLoad" v-show="active==1">提交</el-button> |
| | | <el-button size="medium" @click="upInsOrderOfState(2)" :loading="saveLoad" v-show="active==3">审核不通过</el-button> |
| | | <el-button size="medium" type="primary" @click="upInsOrderOfState(1)" :loading="saveLoad" v-show="active==3">审核通过</el-button> |
| | | <el-button size="medium" @click="$parent.playOrder(0)"> |
| | |
| | | </el-row> |
| | | </div> |
| | | <div> |
| | | <div style="text-align: right;line-height: 45px;"> |
| | | <el-button type="primary" size="small" @click="addSampleDia = true" v-show="active<2">添加样品</el-button> |
| | | <div style="text-align: right;line-height: 45px;" v-if="active<2"> |
| | | <el-button type="primary" size="small" @click="addSampleDia = true" >添加样品</el-button> |
| | | <el-button size="small" @click="delSample"> |
| | | <span style="color: #3A7BFA;" v-show="active<2">删除样品</span> |
| | | <span style="color: #3A7BFA;">删除样品</span> |
| | | </el-button> |
| | | </div> |
| | | <el-table class="el-table" ref="sampleTable" :data="sampleList" height="250px" tooltip-effect="dark" border |
| | | @selection-change="selectSample" highlight-current-row @row-click="rowClick"> |
| | | <el-table class="el-table sampleTable" ref="sampleTable" :data="sampleList" height="250px" tooltip-effect="dark" border |
| | | @selection-change="selectSample" highlight-current-row @row-click="rowClick" style="margin-top: 10px;"> |
| | | <el-table-column type="selection" width="60"></el-table-column> |
| | | <el-table-column type="index" label="序号" width="65" align="center"></el-table-column> |
| | | <el-table-column prop="sample" label="样品名称" align="center" show-overflow-tooltip |
| | |
| | | <el-button type="primary" @click="onSample()" :loading="getProductLoad">确 定</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <el-dialog title="保存模板" :visible.sync="templateDia" width="30%"> |
| | | <div class="body" style="height: 10vh;display: flex;align-items: center;" v-if="templateDia"> |
| | | <div class="search_label"><span class="required-span">* </span>模板名称:</div> |
| | | <div class="search_input"> |
| | | <el-input size="small" clearable v-model="templateName"></el-input> |
| | | </div> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="templateDia = false">取 消</el-button> |
| | | <el-button type="primary" @click="addTemplateDia" :loading="templateLoading">确 定</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | data() { |
| | | return { |
| | | template: null, |
| | | templates: [], |
| | | templates: [ |
| | | { |
| | | label:'0000', |
| | | value:1 |
| | | } |
| | | ], |
| | | addObj: { |
| | | entrustCode: null, |
| | | custom: null, |
| | |
| | | productList: [], |
| | | productIds: [], |
| | | getProductLoad: false, |
| | | saveLoad: false |
| | | saveLoad: false, |
| | | templateDia:false, |
| | | templateLoading:false, |
| | | templateName:'' |
| | | } |
| | | }, |
| | | mounted() { |
| | |
| | | }).then(res => { |
| | | this.addObj = {...res.data.insOrder}; |
| | | this.addObj.type = String(this.addObj.type) |
| | | this.sampleList = res.data.sampleProduct |
| | | this.sampleList = this.HaveJson(res.data.sampleProduct); |
| | | this.$nextTick(()=>{ |
| | | this.$refs.sampleTable.doLayout() |
| | | }) |
| | | }) |
| | | } |
| | | }, |
| | |
| | | return 'warning-row'; |
| | | } |
| | | return ''; |
| | | } |
| | | }, |
| | | // 删除模板--调用接口 |
| | | handleDelete(){ |
| | | this.$confirm('是否删除当前数据?', "警告", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | }).then(() => { |
| | | // this.$axios.post(this.delUrl, { |
| | | // id: row.id |
| | | // }).then(res => { |
| | | // if (res.code === 201) { |
| | | // return |
| | | // } |
| | | // this.$message.success('删除成功') |
| | | // this.selectList() |
| | | // }).catch(e => { |
| | | // this.$message.error('删除失败') |
| | | // }) |
| | | }).catch(() => {}) |
| | | }, |
| | | // 保存模板 |
| | | addTemplateDia(){ |
| | | if(this.templateName){ |
| | | this.templateLoading = true; |
| | | }else{ |
| | | this.$message.error('请填写模板名称') |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |