数量盘点入库-优化
This commit is contained in:
parent
8592abb9b4
commit
46bf52d9e9
|
|
@ -278,9 +278,9 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="10">
|
||||
<el-form-item label="检验时间" label-width="130px" prop="thisCheckFixTime" v-if="!isNumCheck">
|
||||
<el-form-item label="检验时间" label-width="130px" prop="thisCheckTime" v-if="!isNumCheck">
|
||||
<el-date-picker
|
||||
v-model="codeForm.thisCheckFixTime"
|
||||
v-model="codeForm.thisCheckTime"
|
||||
type="date"
|
||||
placeholder="请输入检验时间"
|
||||
style="width: 400px"
|
||||
|
|
@ -288,9 +288,9 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="7">
|
||||
<el-form-item label="下次检验时间" label-width="130px" prop="nextCheckFixTime" v-if="!isNumCheck">
|
||||
<el-form-item label="下次检验时间" label-width="130px" prop="nextCheckTime" v-if="!isNumCheck">
|
||||
<el-date-picker
|
||||
v-model="codeForm.nextCheckFixTime"
|
||||
v-model="codeForm.nextCheckTime"
|
||||
type="date"
|
||||
placeholder="请输入检验时间"
|
||||
style="width: 13vw;"
|
||||
|
|
@ -383,20 +383,20 @@
|
|||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="检验日期" align="center" prop="thisCheckFixTime" :show-overflow-tooltip="true">
|
||||
<el-table-column label="检验日期" align="center" prop="thisCheckTime" :show-overflow-tooltip="true">
|
||||
<template v-slot:default="{ row }" v-if="!isNumCheck">
|
||||
<el-date-picker
|
||||
v-model="row.thisCheckFixTime"
|
||||
v-model="row.thisCheckTime"
|
||||
type="date"
|
||||
placeholder="请输入检验时间"
|
||||
style="width: 170px"
|
||||
></el-date-picker>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="下次检验日期" align="center" prop="nextCheckFixTime" :show-overflow-tooltip="true">
|
||||
<el-table-column label="下次检验日期" align="center" prop="nextCheckTime" :show-overflow-tooltip="true">
|
||||
<template v-slot:default="{ row }" v-if="!isNumCheck">
|
||||
<el-date-picker
|
||||
v-model="row.nextCheckFixTime"
|
||||
v-model="row.nextCheckTime"
|
||||
type="date"
|
||||
placeholder="请输入下次检验时间"
|
||||
style="width: 170px"
|
||||
|
|
@ -603,8 +603,8 @@ export default {
|
|||
codeSuffixEnd: undefined,
|
||||
buyPrice: undefined,
|
||||
codeFactory: undefined,
|
||||
thisCheckFixTime: undefined,
|
||||
nextCheckFixTime: undefined,
|
||||
thisCheckTime: undefined,
|
||||
nextCheckTime: undefined,
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
|
|
@ -676,6 +676,7 @@ export default {
|
|||
this.numTableList = []
|
||||
this.$refs['codeForm'].clearValidate()
|
||||
this.codeOpen = false;
|
||||
this.getList()
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
|
|
@ -701,8 +702,8 @@ export default {
|
|||
codeSuffixEnd: undefined,
|
||||
buyPrice: undefined,
|
||||
codeFactory: undefined,
|
||||
thisCheckFixTime: undefined,
|
||||
nextCheckFixTime: undefined,
|
||||
thisCheckTime: undefined,
|
||||
nextCheckTime: undefined,
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
}
|
||||
|
|
@ -741,20 +742,18 @@ export default {
|
|||
const outFacCode = ''
|
||||
// 生产厂家
|
||||
const maVender = this.supplierList.find(item => item.supplierId == this.codeForm.codeFactory)?.supplier || ''
|
||||
// 检验日期: codeForm.thisCheckFixTime, 时间格式为 yyyy-MM-dd
|
||||
let thisCheckFixTime = new Date(this.codeForm.thisCheckFixTime).toLocaleDateString('zh-CN', {year: 'numeric', month: '2-digit', day: '2-digit'}).replace(/\//g, '-')
|
||||
if (thisCheckFixTime == 'Invalid Date') thisCheckFixTime = ''
|
||||
// 下次检验日期: codeForm.nextCheckFixTime
|
||||
let nextCheckFixTime = new Date(this.codeForm.nextCheckFixTime).toLocaleDateString('zh-CN', {year: 'numeric', month: '2-digit', day: '2-digit'}).replace(/\//g, '-')
|
||||
if (nextCheckFixTime == 'Invalid Date') nextCheckFixTime = ''
|
||||
// 检验日期: codeForm.thisCheckTime
|
||||
const thisCheckTime = this.codeForm.nextCheckTime
|
||||
// 下次检验日期: codeForm.nextCheckTime
|
||||
const nextCheckTime = this.codeForm.nextCheckTime
|
||||
// 单价: codeForm.buyPrice
|
||||
const buyPrice = this.codeForm.buyPrice || 0
|
||||
this.codeTableList.push({
|
||||
maCode,
|
||||
outFacCode,
|
||||
maVender,
|
||||
thisCheckFixTime,
|
||||
nextCheckFixTime,
|
||||
thisCheckTime,
|
||||
nextCheckTime,
|
||||
buyPrice
|
||||
})
|
||||
}
|
||||
|
|
@ -774,8 +773,8 @@ export default {
|
|||
row.maCode = ''
|
||||
row.outFacCode = ''
|
||||
row.maVender = ''
|
||||
row.thisCheckFixTime = ''
|
||||
row.nextCheckFixTime = ''
|
||||
row.thisCheckTime = ''
|
||||
row.nextCheckTime = ''
|
||||
row.buyPrice = 0
|
||||
|
||||
},
|
||||
|
|
@ -792,6 +791,9 @@ export default {
|
|||
this.codeOpen = true;
|
||||
this.title = "数量盘点入库";
|
||||
this.resetCodeForm()
|
||||
this.$nextTick(() => {
|
||||
this.$refs['codeForm'].clearValidate()
|
||||
})
|
||||
},
|
||||
/** 新增编号盘点按钮操作 */
|
||||
handleCodeAdd() {
|
||||
|
|
@ -800,6 +802,9 @@ export default {
|
|||
this.codeOpen = true;
|
||||
this.title = "编码盘点入库";
|
||||
this.resetCodeForm()
|
||||
this.$nextTick(() => {
|
||||
this.$refs['codeForm'].clearValidate()
|
||||
})
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
|
|
@ -822,9 +827,9 @@ export default {
|
|||
this.$refs['codeForm'].validate(valid => {
|
||||
if (valid) {
|
||||
let SavePutInfoDto = {}
|
||||
console.log('🚀 ~ this.codeForm:', this.codeForm);
|
||||
console.log('🚀 ~ this.codeTableList:', this.codeTableList);
|
||||
console.log('🚀 ~ this.numTableList:', this.numTableList);
|
||||
// console.log('🚀 ~ this.codeForm:', this.codeForm);
|
||||
// console.log('🚀 ~ this.numTableList:', this.numTableList);
|
||||
// console.log('🚀 ~ this.codeTableList:', this.codeTableList);
|
||||
if (this.isNumCheck) {
|
||||
// 提交数据
|
||||
SavePutInfoDto = {
|
||||
|
|
@ -844,6 +849,11 @@ export default {
|
|||
this.getList()
|
||||
})
|
||||
} else {
|
||||
// 统一处理时间格式为 yyyy-MM-dd
|
||||
this.codeTableList.forEach(item => {
|
||||
item.thisCheckTime = new Date(item.thisCheckTime).toLocaleDateString('zh-CN', {year: 'numeric', month: '2-digit', day: '2-digit'}).replace(/\//g, '-')
|
||||
item.nextCheckTime = new Date(item.nextCheckTime).toLocaleDateString('zh-CN', {year: 'numeric', month: '2-digit', day: '2-digit'}).replace(/\//g, '-')
|
||||
})
|
||||
// 提交数据
|
||||
SavePutInfoDto = {
|
||||
isCode: true, // 是否编码盘点
|
||||
|
|
|
|||
Loading…
Reference in New Issue