|
@@ -5,79 +5,71 @@
|
|
|
<tr>
|
|
|
<td class="title" style="width: 100px">委托单位</td>
|
|
|
<td class="content" style="width: 360px">
|
|
|
- <table>
|
|
|
- <tr>
|
|
|
- <td>序号</td>
|
|
|
- <!-- <td>客户行业</td> -->
|
|
|
- <td>客户名称</td>
|
|
|
- </tr>
|
|
|
- <tr>
|
|
|
- <td style="min-width: 50px">1</td>
|
|
|
- <!-- <td style="max-width: 130px">
|
|
|
- <input v-model="tableData.kehuHangye" style="text-align: center; max-width: 130px" />
|
|
|
- </td> -->
|
|
|
- <td style="max-width: 130px">
|
|
|
- {{ tableData.weituoClient }}
|
|
|
- <!-- <input v-model="tableData.weituoClient" style="text-align: center; max-width: 130px" /> -->
|
|
|
- </td>
|
|
|
- </tr>
|
|
|
- </table>
|
|
|
+ {{ stepEdit.itdmWeituoInfo.weituoClient }}
|
|
|
</td>
|
|
|
<td class="title white" style="width: 100px">输入类型</td>
|
|
|
<td class="content" style="width: 450px">
|
|
|
- <input v-model="tableData.shuruLeixing" style="text-align: center" />
|
|
|
+ <input v-model="stepEdit.shuruLeixing" style="text-align: center" />
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr style="height: 150px">
|
|
|
<td class="title">实验信息</td>
|
|
|
- <td class="content"><input v-model="tableData.shiyanXinxi" style="text-align: center" /></td>
|
|
|
+ <td class="content">
|
|
|
+ <input v-model="stepEdit.shiyanXinxi" :disabled="step1Parameter.disabled" style="text-align: center" />
|
|
|
+ </td>
|
|
|
<td class="title">定制需求</td>
|
|
|
<td class="content">
|
|
|
<div style="display: flex; align-items: center; justify-content: center">
|
|
|
方案设计:
|
|
|
- <input type="radio" name="fangan" value="需要" v-model="tableData.fanganSheji" />需要 <input
|
|
|
+ <input type="radio" name="fangan" value="需要" v-model="stepEdit.fanganSheji" :disabled="step1Parameter.disabled" />需要 <input
|
|
|
type="radio"
|
|
|
name="fangan"
|
|
|
value="不需要"
|
|
|
- v-model="tableData.fanganSheji"
|
|
|
+ v-model="stepEdit.fanganSheji"
|
|
|
+ :disabled="step1Parameter.disabled"
|
|
|
/>不需要 工装设计:
|
|
|
- <input type="radio" name="gongzhuang" value="需要" v-model="tableData.gongzhuangSheji" />需要 <input
|
|
|
+ <input type="radio" name="gongzhuang" value="需要" v-model="stepEdit.gongzhuangSheji" :disabled="step1Parameter.disabled" />需要 <input
|
|
|
type="radio"
|
|
|
name="gongzhuang"
|
|
|
value="不需要"
|
|
|
- v-model="tableData.gongzhuangSheji"
|
|
|
+ v-model="stepEdit.gongzhuangSheji"
|
|
|
+ :disabled="step1Parameter.disabled"
|
|
|
/>不需要
|
|
|
</div>
|
|
|
|
|
|
<div style="display: flex; align-items: center; justify-content: center">
|
|
|
试验评审:
|
|
|
- <input type="radio" name="shiyan" value="需要" v-model="tableData.shiyanPingshen" />需要 <input
|
|
|
+ <input type="radio" name="shiyan" value="需要" v-model="stepEdit.shiyanPingshen" :disabled="step1Parameter.disabled"/>需要 <input
|
|
|
type="radio"
|
|
|
name="shiyan"
|
|
|
value="不需要"
|
|
|
- v-model="tableData.shiyanPingshen"
|
|
|
+ v-model="stepEdit.shiyanPingshen"
|
|
|
+ :disabled="step1Parameter.disabled"
|
|
|
/>不需要 用餐安排:
|
|
|
- <input type="radio" name="yongcan" value="需要" v-model="tableData.yongcanAnpai" />需要 <input
|
|
|
+ <input type="radio" name="yongcan" value="需要" v-model="stepEdit.yongcanAnpai" :disabled="step1Parameter.disabled"/>需要 <input
|
|
|
type="radio"
|
|
|
name="yongcan"
|
|
|
value="不需要"
|
|
|
- v-model="tableData.yongcanAnpai"
|
|
|
+ v-model="stepEdit.yongcanAnpai"
|
|
|
+ :disabled="step1Parameter.disabled"
|
|
|
/>不需要
|
|
|
</div>
|
|
|
|
|
|
<div style="display: flex; align-items: center; justify-content: center">
|
|
|
- 用车安排: <input type="radio" name="yongche" value="需要" v-model="tableData.yongcheAnpai" />需要
|
|
|
+ 用车安排: <input type="radio" name="yongche" value="需要" v-model="stepEdit.yongcheAnpai" :disabled="step1Parameter.disabled"/>需要
|
|
|
<input
|
|
|
type="radio"
|
|
|
name="yongche"
|
|
|
value="不需要"
|
|
|
- v-model="tableData.yongcheAnpai"
|
|
|
+ v-model="stepEdit.yongcheAnpai"
|
|
|
+ :disabled="step1Parameter.disabled"
|
|
|
/>不需要 住宿安排:
|
|
|
- <input type="radio" name="zhusu" value="需要" v-model="tableData.zhusuAnpai" />需要 <input
|
|
|
+ <input type="radio" name="zhusu" value="需要" v-model="stepEdit.zhusuAnpai" :disabled="step1Parameter.disabled"/>需要 <input
|
|
|
type="radio"
|
|
|
name="zhusu"
|
|
|
value="不需要"
|
|
|
- v-model="tableData.zhusuAnpai"
|
|
|
+ v-model="stepEdit.zhusuAnpai"
|
|
|
+ :disabled="step1Parameter.disabled"
|
|
|
/>不需要
|
|
|
</div>
|
|
|
</td>
|
|
@@ -85,52 +77,50 @@
|
|
|
<tr>
|
|
|
<td class="title">客户<br />联系信息</td>
|
|
|
<td class="content">
|
|
|
- <!-- 姓名:<input style="width: 110px" v-model="tableData.kehuName" /> 电话:<input
|
|
|
- style="width: 150px"
|
|
|
- v-model="tableData.kehuPhone"
|
|
|
- /> -->
|
|
|
- 姓名:{{ tableData.weituoLxr }} 电话:{{ tableData.weituoPhone }}
|
|
|
+ 姓名:{{ stepEdit.itdmWeituoInfo.weituoLxr }} 电话:{{ stepEdit.itdmWeituoInfo.weituoPhone }}
|
|
|
</td>
|
|
|
<td class="title">合同编号</td>
|
|
|
<td class="content">
|
|
|
- <input style="width: 100%; text-align: center" v-model="tableData.hetongBianhao" />
|
|
|
+ <input style="width: 100%; text-align: center" v-model="stepEdit.hetongBianhao" :disabled="step1Parameter.disabled"/>
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td class="title">试验要求</td>
|
|
|
<td class="content" colspan="3">
|
|
|
- <input style="width: 100%; text-align: center" v-model="tableData.shiyanYaoqiu" />
|
|
|
+ <input style="width: 100%; text-align: center" v-model="stepEdit.shiyanYaoqiu" :disabled="step1Parameter.disabled"/>
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td class="title">报告体系</td>
|
|
|
<td class="content" style="display: flex; align-items: center; justify-content: center">
|
|
|
- <input type="radio" name="baogao" value="海检版" v-model="tableData.baogaoTixi" /> 海检版
|
|
|
- <input type="radio" name="baogao" value="瑞莱版" v-model="tableData.baogaoTixi" /> 瑞莱版
|
|
|
- <input type="radio" name="baogao" value="瑞莱海检版" v-model="tableData.baogaoTixi" /> 瑞莱海检版
|
|
|
+ <input type="radio" name="baogao" value="海检版" v-model="stepEdit.baogaoTixi" :disabled="step1Parameter.disabled"/> 海检版
|
|
|
+ <input type="radio" name="baogao" value="瑞莱版" v-model="stepEdit.baogaoTixi" :disabled="step1Parameter.disabled"/> 瑞莱版
|
|
|
+ <input type="radio" name="baogao" value="瑞莱海检版" v-model="stepEdit.baogaoTixi" :disabled="step1Parameter.disabled"/> 瑞莱海检版
|
|
|
</td>
|
|
|
<td class="title">资质要求</td>
|
|
|
<td class="content" style="display: flex; align-items: center; justify-content: center">
|
|
|
- <input type="checkbox" v-model="tableData.zizhiYaoqiu_dictText1" /> CNAS <input
|
|
|
+ <input type="checkbox" v-model="stepEdit.zizhiYaoqiu_dictText1" :disabled="step1Parameter.disabled"/> CNAS <input
|
|
|
type="checkbox"
|
|
|
- v-model="tableData.zizhiYaoqiu_dictText2"
|
|
|
+ v-model="stepEdit.zizhiYaoqiu_dictText2"
|
|
|
+ :disabled="step1Parameter.disabled"
|
|
|
/>
|
|
|
- CMA <input type="checkbox" v-model="tableData.zizhiYaoqiu_dictText3" /> ISTA <input
|
|
|
+ CMA <input type="checkbox" v-model="stepEdit.zizhiYaoqiu_dictText3" :disabled="step1Parameter.disabled"/> ISTA <input
|
|
|
type="checkbox"
|
|
|
- v-model="tableData.zizhiYaoqiu_dictText4"
|
|
|
+ v-model="stepEdit.zizhiYaoqiu_dictText4"
|
|
|
+ :disabled="step1Parameter.disabled"
|
|
|
/>
|
|
|
- 船级社 <input type="checkbox" v-model="tableData.zizhiYaoqiu_dictText5" /> 无
|
|
|
+ 船级社 <input type="checkbox" v-model="stepEdit.zizhiYaoqiu_dictText5" :disabled="step1Parameter.disabled"/> 无
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td class="title">项目<br />虚拟结算额</td>
|
|
|
<td class="content" colspan="3">
|
|
|
<div style="display: flex;align-items: flex-end;">
|
|
|
- <el-table :data="tableData.xnJiesuanPrice" class="u-dynamic-table" stripe show-summary :summary-method="getSummaries" border ref="table" style="width: 740px;">
|
|
|
+ <el-table :data="stepEdit.xnJiesuanPrice" class="u-dynamic-table" show-summary :summary-method="getSummaries" border ref="table">
|
|
|
<el-table-column type="index" label="序号" align="center" width="60"></el-table-column>
|
|
|
- <el-table-column prop="eqName" label="试验设备" align="center" width="100">
|
|
|
+ <el-table-column prop="eqName" label="试验设备" align="center" min-width="100">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-select v-model="scope.row.eqName" placeholder="请选择" value-key="id" @change="chooseEquipment($event, scope.$index)" style="width: 100%;">
|
|
|
+ <el-select v-model="scope.row.eqName" placeholder="请选择" value-key="id" @change="chooseEquipment($event, scope.$index)" style="width: 100%;" :disabled="step1Parameter.disabled">
|
|
|
<el-option
|
|
|
v-for="item in equipmentOptions"
|
|
|
:key="item.id"
|
|
@@ -143,43 +133,38 @@
|
|
|
<el-table-column prop="typeName" label="试验类型" align="center" width="120"></el-table-column>
|
|
|
<el-table-column prop="time" label="试验时间(h)" align="center" width="120">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-input v-model="scope.row.time" placeholder="请输入" @input="handleCheng(scope.row, scope.$index)"/>
|
|
|
+ <el-input v-model="scope.row.time" placeholder="请输入" @input="handleCheng(scope.row, scope.$index)" :readonly="step1Parameter.disabled"/>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="unitPrice" label="试验单价(rmb/h)" align="center" width="140"></el-table-column>
|
|
|
<el-table-column prop="costPrice" label="试验费用" align="center" width="100"></el-table-column>
|
|
|
<el-table-column label="操作" width="100">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-button type="text" size="small" @click="handleDelete(scope.row, scope.$index)">删除</el-button>
|
|
|
+ <el-button type="text" size="small" @click="handleDelete(scope.row, scope.$index)" :style="{'pointer-events':step1Parameter.disabled?'none':'auto'}">删除</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
- <div class="addRow" @click="addRow">添加</div>
|
|
|
+ <div class="addRow" @click="addRow" :style="{'pointer-events':step1Parameter.disabled?'none':'auto'}">添加</div>
|
|
|
</div>
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td class="title">预计报价</td>
|
|
|
<td class="content" colspan="3">
|
|
|
- <input style="width: 100%; text-align: center" v-model="tableData.yujiBaojia" />
|
|
|
- <div class="btn" style="margin-top:1%" @click="addSubTable">提交</div>
|
|
|
+ <input style="width: 100%; text-align: center" v-model="stepEdit.yujiBaojia" :disabled="step1Parameter.disabled"/>
|
|
|
+ <div class="btn" style="margin-top:1%" @click="submitData" :style="{'pointer-events':step1Parameter.disabled?'none':'auto'}">保存</div>
|
|
|
</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td class="title">评审结论</td>
|
|
|
<td class="content">
|
|
|
- <input style="width: 100%; text-align: center" v-model="tableData.pingshenJielun" />
|
|
|
+ <input style="width: 100%; text-align: center" v-model="stepReview.reviewResult" :disabled="stepReview.disabled"/>
|
|
|
</td>
|
|
|
<td class="title">主审人</td>
|
|
|
- <!-- <td class="content">
|
|
|
- <input style="width: 100px; text-align: center; margin-right: 50px" v-model="tableData.zhushenRen" />
|
|
|
- 时间
|
|
|
- <input style="width: 100px; text-align: center" v-model="tableData.zhushenShijian" />
|
|
|
- </td> -->
|
|
|
<td class="content">
|
|
|
- {{ tableData.zhushenRen }}
|
|
|
- 时间{{tableData.zhushenShijian}}
|
|
|
- <div class="btn" @click="submit">提交</div>
|
|
|
+ {{ stepReview.fqUser }}
|
|
|
+ {{stepReview.shenheTime}}
|
|
|
+ <div class="btn" @click="submitReview" :style="{'pointer-events':stepReview.disabled?'none':'auto'}">保存</div>
|
|
|
</td>
|
|
|
</tr>
|
|
|
</table>
|
|
@@ -200,27 +185,35 @@ export default {
|
|
|
// json
|
|
|
tableData1: {
|
|
|
type: Array,
|
|
|
- default: false,
|
|
|
+ default: [],
|
|
|
required: false
|
|
|
}
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- tableData: {
|
|
|
- weituoClient: undefined,
|
|
|
- weituoLxr: undefined,
|
|
|
- weituoPhone: undefined,
|
|
|
+ // 获取的流程数据
|
|
|
+ step1Parameter: {
|
|
|
+ disabled: true
|
|
|
+ },
|
|
|
+ // 数据编辑信息
|
|
|
+ stepEdit: {
|
|
|
+ itdmWeituoInfo: {
|
|
|
+ weituoClient: undefined,
|
|
|
+ weituoLxr: undefined,
|
|
|
+ weituoPhone: undefined,
|
|
|
+ },
|
|
|
xnJiesuanPrice: [{}],
|
|
|
},
|
|
|
+ // 评审信息
|
|
|
+ stepReview: {
|
|
|
+ disabled: true,
|
|
|
+ reviewResult: null
|
|
|
+ },
|
|
|
+ // 试验设备数据
|
|
|
equipmentOptions: [],
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
- // console.log(11111,this.tableData1)
|
|
|
- // const a = JSON.parse(JSON.stringify(this.tableData1))
|
|
|
- // console.log(a)
|
|
|
- // this.tableData.weituoClient =JSON.parse(JSON.stringify(this.tableData1[0].itdmWeituoInfo.weituoClient))
|
|
|
- // this.tableData.weituoClient =this.tableData1[0].itdmWeituoInfo.weituoClient
|
|
|
this.getDevicePrice()
|
|
|
},
|
|
|
computed: {
|
|
@@ -231,36 +224,46 @@ export default {
|
|
|
watch: {
|
|
|
tableData1: {
|
|
|
handler(newV, oldV){
|
|
|
- if(newV){
|
|
|
- console.log(newV[0].itdmWeituoInfo, oldV)
|
|
|
- this.tableData.weituoClient =newV[0].itdmWeituoInfo.weituoClient
|
|
|
- this.tableData.weituoLxr =newV[0].itdmWeituoInfo.weituoLxr
|
|
|
- this.tableData.weituoPhone =newV[0].itdmWeituoInfo.weituoPhone
|
|
|
+ if(newV && newV[0]){
|
|
|
+ console.log(newV)
|
|
|
+ var arrData = newV
|
|
|
+ this.step1Parameter = arrData[0]
|
|
|
+ this.step1Parameter.disabled = !(arrData[0].dangqian && arrData[0].isUpdate)
|
|
|
+ this.stepEdit = arrData[0].saveData ? JSON.parse(arrData[0].saveData) : this.stepEdit
|
|
|
+ this.stepReview = arrData[1]
|
|
|
+ this.stepReview.disabled = !(arrData[1].dangqian && arrData[1].isUpdate)
|
|
|
+ this.stepReview.reviewResult = arrData[1].saveData ? JSON.parse(arrData[1].saveData).reviewResult : ''
|
|
|
+
|
|
|
+ if(!arrData[0].saveData){
|
|
|
+ this.stepEdit.itdmWeituoInfo = arrData[0].itdmWeituoInfo
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
- deep: true,
|
|
|
+ // deep: true,
|
|
|
immediate: true
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 获取试验设备列表
|
|
|
getDevicePrice(){
|
|
|
getDeviceList().then(response => {
|
|
|
- // console.log(response)
|
|
|
this.equipmentOptions = response
|
|
|
})
|
|
|
},
|
|
|
+ // 设备下拉选择改变时改变对应值
|
|
|
chooseEquipment(value, index){
|
|
|
- var row = this.tableData.xnJiesuanPrice[index]
|
|
|
- this.tableData.xnJiesuanPrice[index].type = value.zyxbz
|
|
|
- this.tableData.xnJiesuanPrice[index].typeName = value.zyxbzText
|
|
|
- this.tableData.xnJiesuanPrice[index].unitPrice = value.danjia
|
|
|
- this.tableData.xnJiesuanPrice[index].costPrice = row.unitPrice * row.time || 0
|
|
|
+ var row = this.stepEdit.xnJiesuanPrice[index]
|
|
|
+ this.stepEdit.xnJiesuanPrice[index].type = value.zyxbz
|
|
|
+ this.stepEdit.xnJiesuanPrice[index].typeName = value.zyxbzText
|
|
|
+ this.stepEdit.xnJiesuanPrice[index].unitPrice = value.danjia
|
|
|
+ this.stepEdit.xnJiesuanPrice[index].costPrice = row.unitPrice * row.time || 0
|
|
|
},
|
|
|
+ // input改变时计算相乘
|
|
|
handleCheng(value, index){
|
|
|
console.log(value)
|
|
|
- // console.log(this.$refs.table.summaryMethod())
|
|
|
- this.tableData.xnJiesuanPrice[index].costPrice = value.unitPrice * value.time || 0
|
|
|
+ this.stepEdit.xnJiesuanPrice[index].costPrice = value.unitPrice * value.time || 0
|
|
|
},
|
|
|
+ // 项目虚拟结算额求和
|
|
|
getSummaries(param){
|
|
|
const { columns, data } = param;
|
|
|
// console.log(columns, data)
|
|
@@ -295,45 +298,66 @@ export default {
|
|
|
});
|
|
|
return sums;
|
|
|
},
|
|
|
+ // 删除当前行
|
|
|
handleDelete(row, index){
|
|
|
- this.tableData.xnJiesuanPrice.splice(index, 1)
|
|
|
+ this.stepEdit.xnJiesuanPrice.splice(index, 1)
|
|
|
},
|
|
|
+ // 添加一行
|
|
|
addRow() {
|
|
|
- this.tableData.xnJiesuanPrice.push({})
|
|
|
+ this.stepEdit.xnJiesuanPrice.push({})
|
|
|
},
|
|
|
|
|
|
-
|
|
|
- submit() {
|
|
|
-
|
|
|
- let zizhiYaoqiu = []
|
|
|
- if (this.tableData.zizhiYaoqiu_dictText1) {
|
|
|
- zizhiYaoqiu.push('CNAS')
|
|
|
- }
|
|
|
- if (this.tableData.zizhiYaoqiu_dictText2) {
|
|
|
- zizhiYaoqiu.push('CMA')
|
|
|
- }
|
|
|
- if (this.tableData.zizhiYaoqiu_dictText3) {
|
|
|
- zizhiYaoqiu.push('ISTA')
|
|
|
- }
|
|
|
- if (this.tableData.zizhiYaoqiu_dictText4) {
|
|
|
- zizhiYaoqiu.push('船级社')
|
|
|
+ submitReview() {
|
|
|
+ var saveData = {
|
|
|
+ runFlowPathStep: this.stepReview.id,
|
|
|
+ saveData: JSON.stringify({reviewResult: this.stepReview.reviewResult}),
|
|
|
}
|
|
|
- if (this.tableData.zizhiYaoqiu_dictText5) {
|
|
|
- zizhiYaoqiu.push('无')
|
|
|
- }
|
|
|
- this.tableData.zizhiYaoqiu = zizhiYaoqiu.join(',')
|
|
|
- console.log(this.tableData)
|
|
|
+ console.log(saveData)
|
|
|
+ this.$emit('save', saveData)
|
|
|
},
|
|
|
- addSubTable() {
|
|
|
- console.log(this.tableData.cleanPrice)
|
|
|
- console.log(this.tableData)
|
|
|
+ submitData() {
|
|
|
+ var saveData = {
|
|
|
+ runFlowPathStep: this.step1Parameter.id,
|
|
|
+ saveData: JSON.stringify(this.stepEdit),
|
|
|
+ }
|
|
|
+ this.$emit('save', saveData)
|
|
|
},
|
|
|
},
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
-<style scoped>
|
|
|
+<style lang="less" scoped>
|
|
|
@import '~@assets/less/common.less';
|
|
|
+
|
|
|
+.el-input__inner{
|
|
|
+ background: transparent;
|
|
|
+}
|
|
|
+.el-select{
|
|
|
+ /deep/.el-input.is-disabled .el-input__inner{
|
|
|
+ color: #606266 !important;
|
|
|
+ background-color: transparent !important;
|
|
|
+ cursor: auto;
|
|
|
+ }
|
|
|
+}
|
|
|
+.el-table{
|
|
|
+ background-color: transparent;
|
|
|
+ border: solid 1px #808080;
|
|
|
+ /deep/ tr{
|
|
|
+ background-color: transparent !important;
|
|
|
+ }
|
|
|
+ /deep/ th.el-table__cell{
|
|
|
+ background-color: transparent !important;
|
|
|
+ border-color: #808080;
|
|
|
+ }
|
|
|
+ /deep/ td.el-table__cell{
|
|
|
+ border-color: #808080;
|
|
|
+ }
|
|
|
+ /deep/ .el-input__inner{
|
|
|
+ background: transparent;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
table * {
|
|
|
box-sizing: border-box;
|
|
|
font-size: 14px;
|