Merge branch 'master' of http://114.132.189.42:9002/r/mes-ocea-before
| | |
| | | :prelang="prelang" |
| | | :ajaxFun="ajaxFun" |
| | | :options="options" |
| | | @handleSelectionChange="handleCurrentChange" |
| | | @currentChange="handleCurrentChange" |
| | | ref="processconfiguration" |
| | | > |
| | | <template #toolbar></template> |
| | |
| | | :data="testStandardParams" |
| | | id="testStandardParamTable" |
| | | ref="testStandardParam" |
| | | :default-sort="{ prop: 'index' }" |
| | | |
| | | highlight-current-row |
| | | height="700" |
| | | style="width: 100%" |
| | |
| | | stripe |
| | | > |
| | | <el-table-column |
| | | prop="index" |
| | | type ="index" |
| | | label="序号" |
| | | align="center" |
| | | width="50" |
| | |
| | | </el-table-column> |
| | | <el-table-column |
| | | label="数量" |
| | | prop="parameterFormat" |
| | | prop="number" |
| | | align="center" |
| | | width="80" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.parameterFormat"></el-input> |
| | | <el-input v-model="scope.row.number"></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="单位" prop="unit" align="center" /> |
| | |
| | | export default { |
| | | data(){ |
| | | return { |
| | | dataway:{}, |
| | | goid:'', |
| | | testStandardParams: [], |
| | | packageBoxId:{}, |
| | |
| | | ], |
| | | operator: [ |
| | | { |
| | | text: '删除', |
| | | icon: 'el-icon-delete', |
| | | type: 'text', |
| | | size: 'small', |
| | | fun: this.deleteHandle |
| | | },{ |
| | | text: '检验', |
| | | icon: 'el-icon-delete', |
| | | type: 'text', |
| | | size: 'small', |
| | | fun: this.check |
| | | },{ |
| | | text: '删除', |
| | | icon: 'el-icon-delete', |
| | | type: 'text', |
| | | size: 'small', |
| | | fun: this.deleteHandle |
| | | } |
| | | ], |
| | | operatorConfig: { |
| | |
| | | getData() { |
| | | this.$refs.processconfiguration.refreshData() |
| | | }, |
| | | wayRenovate(){ |
| | | this.getData() |
| | | }, |
| | | //add |
| | | addOrUpdateHandle(){ |
| | | this.addOrUpdateVisible = true |
| | |
| | | deleteHandle(row){ |
| | | dropById({id:row.id}).then((res) =>{ |
| | | this.getData() |
| | | this.$message.error('删除成功') |
| | | this.$message.success('删除成功') |
| | | }) |
| | | }, |
| | | handleCurrentChange(row){ |
| | | console.log(row,"id"); |
| | | console.log(row,"一行"); |
| | | this.dataway = row |
| | | this.packageBoxId = { |
| | | packageBoxId:row[0].id |
| | | packageBoxId:row.id |
| | | } |
| | | this.goid = row[0].id |
| | | list({packageBoxId:row[0].id}).then((res) =>{ |
| | | this.goid = row.id |
| | | this.rightquery() |
| | | }, |
| | | rightquery(){ |
| | | list({packageBoxId:this.goid}).then((res) =>{ |
| | | console.log(res,"nihaoa"); |
| | | this.testStandardParams = res.data.data |
| | | }) |
| | | }, |
| | | //详情添加 |
| | | relateOperationParam(){ |
| | | |
| | | this.increase = true |
| | | |
| | | if (this.dataway.state == "未报检") { |
| | | this.increase = true |
| | | }else{ |
| | | this.$message.error('请先选择包装项目') |
| | | } |
| | | }, |
| | | preserve(datalist){ |
| | | console.log(datalist); |
| | | this.testStandardParams = datalist |
| | | |
| | | }, |
| | |
| | | this.testStandardParams.forEach(el => { |
| | | el.packageBoxId =this.goid |
| | | }); |
| | | console.log(this.testStandardParams,"niaho"); |
| | | saveList(this.testStandardParams).then((res) =>{ |
| | | console.log(res,"保存成功"); |
| | | this.$message.success('保存成功') |
| | | this.testStandardParams |
| | | this.rightquery() |
| | | }) |
| | | }, |
| | | //删除 |
| | |
| | | console.log(row,""); |
| | | deledata({id:row.id}).then((res)=>{ |
| | | this.$message.success('删除成功') |
| | | this.testStandardParams |
| | | this.rightquery() |
| | | }) |
| | | }, |
| | | //审核 |
| | |
| | | <template> |
| | | <el-dialog |
| | | width="60%" |
| | | title="参数" |
| | | title="新增" |
| | | top="5vh" |
| | | :visible.sync="innerVisible" |
| | | :show="currshowlist" |
| | |
| | | > |
| | | <ttable |
| | | :table="table" |
| | | @handleSelectionChange="handleSelectionChange" |
| | | @currentChange="Getdata" |
| | | :prelang="prelang" |
| | | :options="options" |
| | | :ajaxFun="ajaxFun" |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | datalistid:"", |
| | | datalistid:{}, |
| | | ajaxFun: customerpage, |
| | | currentRow: false, |
| | | typeOptions: [], |
| | |
| | | }, |
| | | methods: { |
| | | // 获取数据列表 |
| | | getData() { |
| | | this.$refs.paramTable.getDataList() |
| | | }, |
| | | handleSelectionChange(val){ |
| | | let data = val |
| | | data.forEach(el => { |
| | | this.datalistid = el |
| | | }); |
| | | console.log(this.datalistid); |
| | | // getData() { |
| | | // this.$refs.paramTable.getDataList() |
| | | // }, |
| | | Getdata(val){ |
| | | console.log(val); |
| | | this.datalistid = val |
| | | }, |
| | | saveSelectRow() { |
| | | pagedataadd ({customerId:this.datalistid.id,contractNo:this.datalistid.contractNo}).then((res =>{ |
| | | console.log(res); |
| | | let packageBox = { |
| | | customerId:this.datalistid.id, |
| | | contractNo:this.datalistid.contractNo |
| | | } |
| | | pagedataadd (packageBox).then((res =>{ |
| | | this.$emit('way',res ) |
| | | if (res.status === 200) { |
| | | this.$message.success('新增成功') |
| | | this.$emit('refreshDataList') |
| | |
| | | } |
| | | })) |
| | | this.innerVisible = false |
| | | this.$emit('handleSelectionChange',this.innerVisible ) |
| | | this.$emit('wayapi',this.innerVisible ) |
| | | }, |
| | | } |
| | | } |
| | |
| | | }, |
| | | saveSelectRow() { |
| | | console.log(this.packageBoxIddata,"123"); |
| | | saveList ({customerId:this.datalistid.id,contractNo:this.datalistid.contractNo}).then((res =>{ |
| | | console.log(res); |
| | | if (res.status === 200) { |
| | | this.$message.success('新增成功') |
| | | }else{ |
| | | this.$message.error('创建失败') |
| | | } |
| | | })) |
| | | // saveList ({customerId:this.datalistid.id,contractNo:this.datalistid.contractNo}).then((res =>{ |
| | | // console.log(res); |
| | | // if (res.status === 200) { |
| | | // this.$message.success('新增成功') |
| | | // }else{ |
| | | // this.$message.error('创建失败') |
| | | // } |
| | | // })) |
| | | this.innerVisible = false |
| | | // this.$emit('handleSelectionChange',this.innerVisible ) |
| | | }, |