This commit is contained in:
2022-08-04 19:47:16 +08:00
parent f0fbf69345
commit 7cb9051a20
18 changed files with 228 additions and 104 deletions

View File

@@ -119,6 +119,16 @@
/>
</template>
</el-table-column>
<el-table-column prop="planproduceend_date" label="计划结束时间" align="center" width="250px">
<template slot-scope="scope">
<el-date-picker
v-model="scope.row.planproduceend_date"
value-format="yyyy-MM-dd HH:mm:ss"
type="datetime"
style="width: 200px;"
/>
</template>
</el-table-column>
<el-table-column prop="sale_id" label="销售单标识" align="center" width="150px">
<template scope="scope">
<el-input v-model="scope.row.sale_id"/>
@@ -146,9 +156,14 @@
</el-radio>
</template>
</el-table-column>
<el-table-column prop="orderNum" label="订单数量" align="center" width="150px">
<template scope="scope">
<el-input v-model="scope.row.orderNum" type="number" :min="1" oninput="value = value.replace(/[^\d]/g, '')" style="width: 200px;"/>
</template>
</el-table-column>
</el-table>
<div slot="footer" class="dialog-footer">
<el-button type="text" @click="crud.cancelCU">取消</el-button>
<el-button type="text" @click="cancle">取消</el-button>
<el-button :loading="crud.cu === 2" type="primary" @click="submit">确认</el-button>
</div>
<MaterDtl
@@ -197,8 +212,12 @@ export default {
}
},
methods: {
cancle() {
this.$emit('update:dialogShow', false)
},
insertDtl() {
const date = this.dateFormatter(new Date())
const formatter1 = this.dateFormatter1(new Date())
this.tableData.push({
produceorder_id: '',
produceorder_code: '',
@@ -213,7 +232,7 @@ export default {
material_code: '',
material_weight: '',
planproducestart_date: date,
planproduceend_date: '',
planproduceend_date: formatter1,
realproducestart_date: '',
realproduceend_date: '',
order_status: '00',
@@ -223,7 +242,8 @@ export default {
device_id: '',
is_canupdate_update: '1',
material_spec: '',
sale_id: ''
sale_id: '',
orderNum: 1
})
},
open() {
@@ -256,12 +276,14 @@ export default {
const year = d.getFullYear()
const month = (d.getMonth() + 1) < 10 ? '0' + (d.getMonth() + 1) : (d.getMonth() + 1)
const day = d.getDate() < 10 ? '0' + d.getDate() : d.getDate()
debugger
if (val === '02') {
row.planproducestart_date = [year, month, day].join('-') + ' ' + ['18', '30', '00'].join(':')
const day1 = d.getDate() < 10 ? '0' + (d.getDate() + 1) : d.getDate() + 1
row.planproduceend_date = [year, month, day1].join('-') + ' ' + ['07', '30', '00'].join(':')
}
if (val === '01') {
row.planproducestart_date = [year, month, day].join('-') + ' ' + ['07', '30', '00'].join(':')
row.planproduceend_date = [year, month, day].join('-') + ' ' + ['18', '30', '00'].join(':')
}
this.tableData.splice(index, 1, row)
},
@@ -283,6 +305,13 @@ export default {
const day = d.getDate() < 10 ? '0' + d.getDate() : d.getDate()
return [year, month, day].join('-') + ' ' + ['07', '30', '00'].join(':')
},
dateFormatter1(str) {
const d = new Date(str)
const year = d.getFullYear()
const month = (d.getMonth() + 1) < 10 ? '0' + (d.getMonth() + 1) : (d.getMonth() + 1)
const day = d.getDate() < 10 ? '0' + d.getDate() : d.getDate()
return [year, month, day].join('-') + ' ' + ['18', '30', '00'].join(':')
},
deleteRow(index, rows) {
rows.splice(index, 1)
},
@@ -312,6 +341,7 @@ export default {
}
crudProduceshiftorder.addRows(this.tableData)
this.$emit('update:dialogShow', false)
this.$emit('AddChanged')
}
}
}