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