|
@@ -91,11 +91,11 @@
|
|
|
|
|
|
|
|
<view class="content_table2">
|
|
<view class="content_table2">
|
|
|
<view class="head row rx-sc">
|
|
<view class="head row rx-sc">
|
|
|
- <view class="item ww25">物料重量Kg</view>
|
|
|
|
|
|
|
+ <view class="item ww25">{{isFirstTask == 1 ? '物料重量' : '工序重量'}} {{it.extInfo.weightUnit}}</view>
|
|
|
<view class="item ww25">报工重量kg</view>
|
|
<view class="item ww25">报工重量kg</view>
|
|
|
- <view class="item ww25" v-if="['CVI', 'PIP' ].includes(taskTypeName)">质检结果
|
|
|
|
|
|
|
+ <view class="item ww25" v-if="isFirstTask == 1">质检结果
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="item ww25" :class="[ ['CVI', 'PIP' ].includes(taskTypeName) ? 'ww25' : 'ww50' ]">处置
|
|
|
|
|
|
|
+ <view class="item ww25" :class="[ isFirstTask == 1 ? 'ww25' : 'ww50' ]">处置
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
</view>
|
|
</view>
|
|
@@ -103,30 +103,28 @@
|
|
|
<view class="table">
|
|
<view class="table">
|
|
|
|
|
|
|
|
<view class="tr row rx-sc">
|
|
<view class="tr row rx-sc">
|
|
|
- <view class="item ww25">{{it.extInfo.weight}}</view>
|
|
|
|
|
|
|
+ <view class="item ww25">{{isFirstTask == 1 ? it.extInfo.weight : it.extInfo.newWeight }}
|
|
|
|
|
+ </view>
|
|
|
<view class="item ww25 content_num">
|
|
<view class="item ww25 content_num">
|
|
|
<view v-if='isDetails'>{{it.extInfo.reportWeight }}</view>
|
|
<view v-if='isDetails'>{{it.extInfo.reportWeight }}</view>
|
|
|
<input class="uni-input" v-else v-model="it.extInfo.reportWeight"></input>
|
|
<input class="uni-input" v-else v-model="it.extInfo.reportWeight"></input>
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="item ww25" @click="openNumerate(it, idx)"
|
|
|
|
|
- v-if="['CVI', 'PIP' ].includes(taskTypeName)">
|
|
|
|
|
|
|
+ <view class="item ww25" @click="openNumerate(it, idx)" v-if="isFirstTask == 1">
|
|
|
<view class="numerate">点击计算</view>
|
|
<view class="numerate">点击计算</view>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
|
|
|
|
|
- <!-- <view class="item ww25" v-if="['CVI', 'PIP' ].includes(taskTypeName)">
|
|
|
|
|
- {{it.extInfo.taskName }}
|
|
|
|
|
- </view> -->
|
|
|
|
|
-
|
|
|
|
|
- <view class="item" v-if='isDetails' :class="[ ['CVI', 'PIP' ].includes(taskTypeName) ? 'ww25' : 'ww50' ]">
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ <view class="item" v-if='isDetails' :class="[ isFirstTask == 1 ? 'ww25' : 'ww50' ]">
|
|
|
{{it.extInfo.taskName}}
|
|
{{it.extInfo.taskName}}
|
|
|
</view>
|
|
</view>
|
|
|
-
|
|
|
|
|
- <view class="item " v-else :class="[ ['CVI', 'PIP' ].includes(taskTypeName) ? 'ww25' : 'ww50' ]">
|
|
|
|
|
|
|
+
|
|
|
|
|
+ <view class="item " v-else :class="[ isFirstTask == 1 ? 'ww25' : 'ww50' ]">
|
|
|
<zxz-uni-data-select :localdata="stepsList" v-model="it.extInfo.taskId" dataValue='taskId'
|
|
<zxz-uni-data-select :localdata="stepsList" v-model="it.extInfo.taskId" dataValue='taskId'
|
|
|
format='{taskTypeName}' dataKey="taskId" filterable
|
|
format='{taskTypeName}' dataKey="taskId" filterable
|
|
|
:clear='false'></zxz-uni-data-select>
|
|
:clear='false'></zxz-uni-data-select>
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
|
|
|
|
@@ -157,16 +155,12 @@
|
|
|
|
|
|
|
|
<view class="content_table2">
|
|
<view class="content_table2">
|
|
|
<view class="head row rx-sc">
|
|
<view class="head row rx-sc">
|
|
|
- <view class="item ww20" :class="{'ww30' : taskTypeName == 'CVI' } ">工序名称</view>
|
|
|
|
|
- <view class="item ww20" v-if="taskTypeName == 'CVI'">坯体密度</view>
|
|
|
|
|
- <view class="item ww20" v-if="taskTypeName == 'CVI'">密度系数</view>
|
|
|
|
|
- <view class="item ww20" v-if="taskTypeName == 'CVI'">重量</view>
|
|
|
|
|
|
|
+ <view class="item ww30">工序名称</view>
|
|
|
|
|
+ <view class="item ww20">坯体密度</view>
|
|
|
|
|
+ <view class="item ww20">密度系数</view>
|
|
|
|
|
+ <view class="item ww20">重量</view>
|
|
|
|
|
|
|
|
|
|
|
|
|
- <view class="item ww20" v-if="taskTypeName == 'PIP'">坯体图体积</view>
|
|
|
|
|
- <view class="item ww20" v-if="taskTypeName == 'PIP'">要求密度</view>
|
|
|
|
|
- <view class="item ww15" v-if="taskTypeName == 'PIP'">系数</view>
|
|
|
|
|
- <view class="item ww15" v-if="taskTypeName == 'PIP'">重量</view>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<view class="item ww10">操作</view>
|
|
<view class="item ww10">操作</view>
|
|
@@ -176,98 +170,66 @@
|
|
|
<view class="table">
|
|
<view class="table">
|
|
|
|
|
|
|
|
<view class="tr row rx-sc" v-for="(it, idx) in paramList" :key='idx'>
|
|
<view class="tr row rx-sc" v-for="(it, idx) in paramList" :key='idx'>
|
|
|
- <view class="item rx-bc ww20" :class="{'ww30' : taskTypeName == 'CVI' } ">
|
|
|
|
|
|
|
+ <view class="item rx-bc ww30">
|
|
|
<zxz-uni-data-select :localdata="stepsList" v-model="it.taskId" dataValue='taskId'
|
|
<zxz-uni-data-select :localdata="stepsList" v-model="it.taskId" dataValue='taskId'
|
|
|
format='{taskTypeName}' dataKey="taskId" filterable
|
|
format='{taskTypeName}' dataKey="taskId" filterable
|
|
|
@change=" e => it.taskName = e.taskTypeName" :clear='false'></zxz-uni-data-select>
|
|
@change=" e => it.taskName = e.taskTypeName" :clear='false'></zxz-uni-data-select>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
|
|
|
|
|
- <view class="item ww20 content_num" v-if="taskTypeName == 'CVI'">
|
|
|
|
|
|
|
+ <view class="item ww20 content_num">
|
|
|
<input class="uni-input" v-model="it.billet" type="digit"
|
|
<input class="uni-input" v-model="it.billet" type="digit"
|
|
|
@input="changeInp(it, idx)"></input>
|
|
@input="changeInp(it, idx)"></input>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
|
|
|
|
|
- <view class="item ww20 content_num" v-if="taskTypeName == 'CVI'">
|
|
|
|
|
|
|
+ <view class="item ww20 content_num">
|
|
|
<input class="uni-input" v-model="it.density" type="digit"
|
|
<input class="uni-input" v-model="it.density" type="digit"
|
|
|
@input="changeInp(it, idx)"></input>
|
|
@input="changeInp(it, idx)"></input>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- <view class="item ww20"
|
|
|
|
|
- v-if="taskTypeName == 'CVI' && (idx == 0 || idx != paramList.length - 1)">
|
|
|
|
|
|
|
+ <view class="item ww20" v-if=" (idx == 0 || idx != paramList.length - 1)">
|
|
|
< {{it.CVIWeight}} </view>
|
|
< {{it.CVIWeight}} </view>
|
|
|
|
|
|
|
|
- <view class="item ww20"
|
|
|
|
|
- v-if="taskTypeName == 'CVI' && paramList.length > 1 && idx == paramList.length - 1">
|
|
|
|
|
|
|
+ <view class="item ww20" v-if=" paramList.length > 1 && idx == paramList.length - 1">
|
|
|
≥ {{it.CVIWeight }}
|
|
≥ {{it.CVIWeight }}
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
|
|
+ </view>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- <!-- -------------PIP ------------- -->
|
|
|
|
|
-
|
|
|
|
|
- <view class="item ww20 content_num" v-if="taskTypeName == 'PIP'">
|
|
|
|
|
- <input class="uni-input" v-model="it.volume" type="digit"
|
|
|
|
|
- @input="jsPIPWeight(it, idx)"></input>
|
|
|
|
|
- </view>
|
|
|
|
|
-
|
|
|
|
|
- <view class="item ww20 content_num" v-if="taskTypeName == 'PIP'">
|
|
|
|
|
- <input class="uni-input" v-model="it.PIPDensity" type="digit"
|
|
|
|
|
- @input="jsPIPWeight(it, idx)"></input>
|
|
|
|
|
- </view>
|
|
|
|
|
-
|
|
|
|
|
- <view class="item ww15 content_num" v-if="taskTypeName == 'PIP'">
|
|
|
|
|
- <input class="uni-input" v-model="it.coefficient" type="digit"
|
|
|
|
|
- @input="jsPIPWeight(it, idx)"></input>
|
|
|
|
|
- </view>
|
|
|
|
|
-
|
|
|
|
|
- <view class="item ww15 " v-if="taskTypeName == 'PIP'">
|
|
|
|
|
- < {{it.PIPWeight}} </view>
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- <view class="item ww10 rx-cc" @click="getDelete(idx)">
|
|
|
|
|
- <uni-icons custom-prefix="iconfont" type="icon-shanchu" size="20"
|
|
|
|
|
- color="#fa3534"></uni-icons>
|
|
|
|
|
- </view>
|
|
|
|
|
-
|
|
|
|
|
- </view>
|
|
|
|
|
-
|
|
|
|
|
|
|
|
|
|
- </view>
|
|
|
|
|
|
|
|
|
|
- <view class="formula_box" v-if="taskTypeName == 'CVI'">计算公式: 物料重量/坯体密度*密度系数 </view>
|
|
|
|
|
- <view class="formula_box" v-if="taskTypeName == 'PIP'">计算公式: 坯体图体积*要求密度*系数 </view>
|
|
|
|
|
|
|
|
|
|
- <view class="rx-cc">
|
|
|
|
|
- <u-button size="small" class="u-reset-button" style="width: 300rpx;margin: 20rpx;"
|
|
|
|
|
- type="success" @click="paramSave">工序列表保存</u-button>
|
|
|
|
|
- </view>
|
|
|
|
|
|
|
+ </view>
|
|
|
|
|
|
|
|
- <view class="reportWeight rx-sc">
|
|
|
|
|
- 物料重量: {{weight}} ;
|
|
|
|
|
- 报工重量: {{reportWeight}}
|
|
|
|
|
|
|
+ <view class="formula_box">计算公式: 物料重量/坯体密度*密度系数 </view>
|
|
|
|
|
|
|
|
|
|
|
|
|
- </view>
|
|
|
|
|
-
|
|
|
|
|
|
|
+ <view class="rx-cc">
|
|
|
|
|
+ <u-button size="small" class="u-reset-button" style="width: 300rpx;margin: 20rpx;"
|
|
|
|
|
+ type="success" @click="paramSave">工序列表保存</u-button>
|
|
|
|
|
+ </view>
|
|
|
|
|
|
|
|
|
|
+ <view class="reportWeight rx-sc">
|
|
|
|
|
+ 物料重量: {{weight}} ;
|
|
|
|
|
+ 报工重量: {{reportWeight}}
|
|
|
|
|
|
|
|
|
|
+ </view>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- </view>
|
|
|
|
|
|
|
+ </view>
|
|
|
|
|
|
|
|
|
|
|
|
|
- <view class="operate_box rx-sc">
|
|
|
|
|
- <u-button size="small" class="u-reset-button" @click="cancel">取消</u-button>
|
|
|
|
|
- <u-button size="small" class="u-reset-button" type="success" @click="save">确定</u-button>
|
|
|
|
|
- </view>
|
|
|
|
|
|
|
+ <view class="operate_box rx-sc">
|
|
|
|
|
+ <u-button size="small" class="u-reset-button" @click="cancel">取消</u-button>
|
|
|
|
|
+ <u-button size="small" class="u-reset-button" type="success" @click="save">确定</u-button>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
+ </view>
|
|
|
|
|
|
|
|
|
|
|
|
|
</u-popup>
|
|
</u-popup>
|
|
@@ -317,6 +279,7 @@
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
taskTypeName: null,
|
|
taskTypeName: null,
|
|
|
|
|
+ isFirstTask: null,
|
|
|
|
|
|
|
|
stepsList: [],
|
|
stepsList: [],
|
|
|
|
|
|
|
@@ -340,10 +303,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
created() {
|
|
created() {
|
|
|
this.taskTypeName = this.item.currentTaskDiagram.taskTypeName
|
|
this.taskTypeName = this.item.currentTaskDiagram.taskTypeName
|
|
|
|
|
+ this.isFirstTask = this.item.currentTaskDiagram.isFirstTask
|
|
|
this.getSteps()
|
|
this.getSteps()
|
|
|
this.getCompute()
|
|
this.getCompute()
|
|
|
|
|
|
|
@@ -354,7 +320,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
getSteps() {
|
|
getSteps() {
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
getTaskInstanceList(this.item.workOrderId).then(res => {
|
|
getTaskInstanceList(this.item.workOrderId).then(res => {
|
|
|
this.stepsList = res
|
|
this.stepsList = res
|
|
|
})
|
|
})
|
|
@@ -378,26 +344,12 @@
|
|
|
// volume: null,
|
|
// volume: null,
|
|
|
// coefficient: null
|
|
// coefficient: null
|
|
|
|
|
|
|
|
- if (this.taskTypeName == 'CVI') {
|
|
|
|
|
|
|
+ if (this.isFirstTask == 1) {
|
|
|
this.paramList.push({
|
|
this.paramList.push({
|
|
|
taskId: null,
|
|
taskId: null,
|
|
|
taskName: null,
|
|
taskName: null,
|
|
|
|
|
|
|
|
})
|
|
})
|
|
|
- } else if (this.taskTypeName == 'PIP') {
|
|
|
|
|
-
|
|
|
|
|
- if (this.paramList.length < 1) {
|
|
|
|
|
- this.paramList.push({
|
|
|
|
|
- taskId: null,
|
|
|
|
|
- taskName: null,
|
|
|
|
|
- })
|
|
|
|
|
- } else {
|
|
|
|
|
- uni.showToast({
|
|
|
|
|
- title: `PIP计算重量,只要一条数据`,
|
|
|
|
|
- icon: 'none'
|
|
|
|
|
- })
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@@ -415,15 +367,11 @@
|
|
|
|
|
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
- jsPIPWeight(item, index) {
|
|
|
|
|
- console.log(item)
|
|
|
|
|
- this.paramList[index].PIPWeight = Number(item.volume * item.PIPDensity * item.coefficient).toFixed(2)
|
|
|
|
|
- },
|
|
|
|
|
|
|
|
|
|
paramSave() {
|
|
paramSave() {
|
|
|
|
|
|
|
|
|
|
|
|
|
- if (this.taskTypeName == 'CVI' && this.paramList.length > 0) {
|
|
|
|
|
|
|
+ if (this.isFirstTask == 1 && this.paramList.length > 0) {
|
|
|
let bol
|
|
let bol
|
|
|
let _i
|
|
let _i
|
|
|
bol = this.paramList.every((e, i) => {
|
|
bol = this.paramList.every((e, i) => {
|
|
@@ -490,7 +438,7 @@
|
|
|
})
|
|
})
|
|
|
return false
|
|
return false
|
|
|
}
|
|
}
|
|
|
- this.weight = row.extInfo.weight || '20.2'
|
|
|
|
|
|
|
+ this.weight = row.extInfo.weight
|
|
|
this.reportWeight = row.extInfo.reportWeight
|
|
this.reportWeight = row.extInfo.reportWeight
|
|
|
this.resultIdx = idx
|
|
this.resultIdx = idx
|
|
|
|
|
|
|
@@ -514,7 +462,7 @@
|
|
|
save() {
|
|
save() {
|
|
|
|
|
|
|
|
|
|
|
|
|
- if (this.taskTypeName == 'CVI') {
|
|
|
|
|
|
|
+ if (this.isFirstTask == 1) {
|
|
|
|
|
|
|
|
this.resultObj = {}
|
|
this.resultObj = {}
|
|
|
|
|
|
|
@@ -545,32 +493,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- } else if (this.taskTypeName == 'PIP') {
|
|
|
|
|
-
|
|
|
|
|
- this.resultObj = {}
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- if (Number(this.reportWeight) < this.paramList[0].PIPWeight) {
|
|
|
|
|
- this.resultObj = this.paramList[0]
|
|
|
|
|
- this.setDataSave()
|
|
|
|
|
- return false
|
|
|
|
|
- } else {
|
|
|
|
|
- for (let i = 1; i < this.stepsList.length; i++) {
|
|
|
|
|
- if (this.paramList[0].taskId == this.stepsList[i].taskId) {
|
|
|
|
|
- this.resultObj.taskId = this.stepsList[i + 1].taskId
|
|
|
|
|
- this.resultObj.taskName = this.stepsList[i + 1].taskTypeName
|
|
|
|
|
- break;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- this.setDataSave()
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
},
|
|
},
|