Commit 0ec66d57 authored by jingnan's avatar jingnan 👀

Merge branch 'rubberPaint-dev' of http://94.191.100.41/tfmom/tf-mom-web into rubberPaint-dev

parents b8d5d9d6 7ea9fcbc
......@@ -337,7 +337,7 @@ export default {
setMixEndTime() {
if (this.form.mixStartTime) {
let rawTime = Date.parse(this.form.mixStartTime)// 把时间转换成毫秒
const addTime = (!this.form.spec && this.form.spec === '/') ? 0 : Number(this.form.spec)
const addTime = (!this.form.spec || this.form.spec === '/') ? 0 : Number(this.form.spec)
rawTime = rawTime + (1000 * 60 * 60 * addTime)// 增加3小时。
const newsTime = new Date(rawTime)// 时间重新格式化时间。
const y = newsTime.getFullYear()
......
......@@ -129,12 +129,25 @@
<i class="el-icon-edit-outline" />
</template>
<template slot-scope="scope">
<el-input
<el-select
v-if="scope.row.needSpecSelect"
v-model="scope.row.spec"
@focus="tableInputFocus"
clearable
@change="deeTableBlur(scope.row, 'spec')"
>
<el-option
v-for="item in specOptions"
:key="item"
:label="item"
:value="item"
/>
</el-select>
<!-- <el-input
v-if="scope.row.needSpecSelect"
v-model="scope.row.spec"
@focus="tableInputFocus"
@change="deeTableBlur(scope.row, 'spec')"
/>-->
<span v-else>{{ scope.row[scope.column.property] }}</span>
<i v-if="scope.row.needSpecLoading" class="el-icon-loading" />
</template>
......@@ -185,7 +198,8 @@ export default {
needTimeRow: null,
needSpecRow: null,
rowData: {},
defultRow: null
defultRow: null,
specOptions: []
}
},
created() {},
......@@ -266,6 +280,13 @@ export default {
this.loading = false
})
},
getSpecOptions(row) {
post(`ShellacDeploy/executeModel?model=${row.extMaterial.modelNo}`).then(res => {
if (res.code === 0) {
this.specOptions = res.items
}
})
},
deeTableCellStyle({ row, column, rowIndex, columnIndex }) {
if (column.property === 'needTime' && row.needTimeSelect) {
return 'highlight'
......@@ -311,6 +332,10 @@ export default {
* 胶漆使用申请
*/
applyStorageReqItem(row) {
if (!row.spec) {
this.$utils.showMessageWarning('规格不能为空!')
return
}
var that = this
post(
`/ExtSupportingItem/deal/supportingItem?extSupportingItemVOId=${that.rowData.id}&applyState=true`,
......@@ -424,10 +449,9 @@ export default {
row.needTimeSelect = true
this.needTimeRow = row.needTime
} if (column.property === 'spec') {
if (row.applyStatus === 'applied') {
this.getSpecOptions(row)
row.needSpecSelect = true
this.needSpecRow = row.spec
}
} else {
return
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment