|
@@ -660,7 +660,10 @@
|
|
@close="closeCubeDialog"
|
|
@close="closeCubeDialog"
|
|
width="400px"
|
|
width="400px"
|
|
>
|
|
>
|
|
- <el-form>
|
|
|
|
|
|
+ <el-form
|
|
|
|
+ label-position="right"
|
|
|
|
+ label-width="95px"
|
|
|
|
+ >
|
|
<el-form-item label="length (m)">
|
|
<el-form-item label="length (m)">
|
|
<el-input v-model="cubeForm.l"></el-input>
|
|
<el-input v-model="cubeForm.l"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -670,6 +673,9 @@
|
|
<el-form-item label="height (m)">
|
|
<el-form-item label="height (m)">
|
|
<el-input v-model="cubeForm.h"></el-input>
|
|
<el-input v-model="cubeForm.h"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
+ <el-form-item label="箱数(整数)">
|
|
|
|
+ <el-input v-model="cubeForm.Carton"></el-input>
|
|
|
|
+ </el-form-item>
|
|
<el-form-item label="cube (m³)">
|
|
<el-form-item label="cube (m³)">
|
|
<el-input v-model="cubeForm2.c"></el-input>
|
|
<el-input v-model="cubeForm2.c"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -1573,9 +1579,10 @@ let cubeForm = ref({
|
|
l: '',
|
|
l: '',
|
|
w: '',
|
|
w: '',
|
|
h: '',
|
|
h: '',
|
|
|
|
+ Carton: '' as string | number, // 箱数
|
|
})
|
|
})
|
|
let cubeForm2 = ref({
|
|
let cubeForm2 = ref({
|
|
- c: '' as string | number,
|
|
|
|
|
|
+ c: '' as string | number, // 体积
|
|
})
|
|
})
|
|
watch(
|
|
watch(
|
|
cubeForm,
|
|
cubeForm,
|
|
@@ -1583,7 +1590,8 @@ watch(
|
|
cubeForm2.value.c =
|
|
cubeForm2.value.c =
|
|
Number(cubeForm.value.l) *
|
|
Number(cubeForm.value.l) *
|
|
Number(cubeForm.value.w) *
|
|
Number(cubeForm.value.w) *
|
|
- Number(cubeForm.value.h)
|
|
|
|
|
|
+ Number(cubeForm.value.h) *
|
|
|
|
+ Number(cubeForm.value.Carton)
|
|
},
|
|
},
|
|
{
|
|
{
|
|
immediate: true,
|
|
immediate: true,
|
|
@@ -1593,13 +1601,18 @@ watch(
|
|
let openCubeDialog = (obj: any) => {
|
|
let openCubeDialog = (obj: any) => {
|
|
let index = obj.$index
|
|
let index = obj.$index
|
|
if (index < 0 || index >= subList.value.length) return
|
|
if (index < 0 || index >= subList.value.length) return
|
|
|
|
+
|
|
const row = subList.value[index]
|
|
const row = subList.value[index]
|
|
- cubeForm2.value.c = row.Cube || ''
|
|
|
|
|
|
+ cubeForm.value.Carton = row.Carton || '1'
|
|
cubeDialogVisible.value = index
|
|
cubeDialogVisible.value = index
|
|
|
|
+ nextTick(() => {
|
|
|
|
+ cubeForm2.value.c = row.Cube || ''
|
|
|
|
+ })
|
|
}
|
|
}
|
|
let commitCube = () => {
|
|
let commitCube = () => {
|
|
const row = subList.value[cubeDialogVisible.value]
|
|
const row = subList.value[cubeDialogVisible.value]
|
|
row.Cube = Number(cubeForm2.value.c).toFixed(2) || ''
|
|
row.Cube = Number(cubeForm2.value.c).toFixed(2) || ''
|
|
|
|
+ row.Carton = Number(cubeForm.value.Carton) || '1'
|
|
row.editFlag = true
|
|
row.editFlag = true
|
|
closeCubeDialog()
|
|
closeCubeDialog()
|
|
}
|
|
}
|
|
@@ -1608,6 +1621,7 @@ let closeCubeDialog = () => {
|
|
cubeForm.value.l = ''
|
|
cubeForm.value.l = ''
|
|
cubeForm.value.w = ''
|
|
cubeForm.value.w = ''
|
|
cubeForm.value.h = ''
|
|
cubeForm.value.h = ''
|
|
|
|
+ cubeForm.value.Carton = '1'
|
|
cubeForm2.value.c = ''
|
|
cubeForm2.value.c = ''
|
|
}
|
|
}
|
|
let customSort1 = (a: any, b: any) => {
|
|
let customSort1 = (a: any, b: any) => {
|