Commit 83c36943 authored by zhoutong's avatar zhoutong
parents 06c16144 49318ef3
...@@ -30,12 +30,12 @@ ...@@ -30,12 +30,12 @@
<div slot="header" class="card-title"> <div slot="header" class="card-title">
{{$t('打包前')}} {{$t('打包前')}}
</div> </div>
<el-table v-if="orderWarehouseInContent" :data="orderWarehouseInContent"> <el-table v-if="orderWarehouseInContent" :data="orderWarehouseInContent.orderWarehouseInItemDtoList">
<el-table-column type="index" :label="$t('序号')" /> <el-table-column type="index" :label="$t('序号')" />
<el-table-column :label="$t('箱数')" prop="cartonsNum"> <el-table-column :label="$t('箱数')" prop="cartonsNum">
<template slot-scope="{row}"> <template slot-scope="{row}">
<span>{{row.cartonsNum}}</span> <span>{{row.cartonsNum}}</span>
<!-- <el-button v-if="boxData.length>0" type="text" @click="seeBox">({{$t('混箱')}})</el-button> --> <el-button v-if="row.orderWarehouseInDetailsVOList&&row.orderWarehouseInDetailsVOList.length>0" type="text" @click="seeBox(row.orderWarehouseInDetailsVOList)">({{$t('混箱')}})</el-button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('入仓类型')" prop="cartonsNum"> <el-table-column :label="$t('入仓类型')" prop="cartonsNum">
...@@ -77,7 +77,7 @@ ...@@ -77,7 +77,7 @@
</el-table-column> </el-table-column>
<el-table-column :label="$t('入仓影像')" prop="orderLocationBackVOList" > <el-table-column :label="$t('入仓影像')" prop="orderLocationBackVOList" >
<template slot-scope="{row}"> <template slot-scope="{row}">
<el-button type="primary" @click="seeMv(row.pictureUrls)">{{$t('查看')}}</el-button> <el-button type="primary" @click="seeMv(orderWarehouseInContent.pictures)">{{$t('查看')}}</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
......
...@@ -70,10 +70,19 @@ ...@@ -70,10 +70,19 @@
</el-checkbox-group> </el-checkbox-group>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8">
<el-form-item :label="$t('入仓时间')" v-if="!edit">
<el-date-picker v-model="form.inTime" type="datetime" :placeholder="$t('请选择入仓时间')" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="16">
<el-form-item :label="$t('用途')">
<el-checkbox-group v-model="form.usageIds">
<el-checkbox v-for="item in getDictDatas(DICT_TYPE.WAREHOUSING_RECORD_DETAIL_USAGE)" :key="item.value" :label="item.value">{{ $l(item, 'label') }}</el-checkbox>
</el-checkbox-group>
</el-form-item>
</el-col>
</el-row> </el-row>
<el-form-item :label="$t('入仓时间')" v-if="!edit">
<el-date-picker v-model="form.inTime" type="datetime" :placeholder="$t('请选择入仓时间')" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-form-item>
</el-form> </el-form>
<el-card class="box-card"> <el-card class="box-card">
...@@ -289,10 +298,20 @@ ...@@ -289,10 +298,20 @@
</el-checkbox-group> </el-checkbox-group>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8">
<el-form-item :label="$t('入仓时间')">
<el-date-picker v-model="form1.inTime" type="datetime" :placeholder="$t('请选择入仓时间')" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="16">
<el-form-item :label="$t('用途')">
<el-checkbox-group v-model="form1.usageIds">
<el-checkbox v-for="item in getDictDatas(DICT_TYPE.WAREHOUSING_RECORD_DETAIL_USAGE)" :key="item.value" :label="item.value">{{ $l(item, 'label') }}</el-checkbox>
</el-checkbox-group>
</el-form-item>
</el-col>
</el-row> </el-row>
<el-form-item :label="$t('入仓时间')">
<el-date-picker v-model="form1.inTime" type="datetime" :placeholder="$t('请选择入仓时间')" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker>
</el-form-item>
</el-form> </el-form>
<el-card class="box-card"> <el-card class="box-card">
...@@ -418,6 +437,7 @@ ...@@ -418,6 +437,7 @@
</el-table-column> </el-table-column>
<el-table-column :label="$t('操作')"> <el-table-column :label="$t('操作')">
<template v-slot="{ row, column, $index}"> <template v-slot="{ row, column, $index}">
<WarehouseRecordDetail v-model="form1.table[$index].orderWarehouseInDetailsVOList" />
<el-popconfirm <el-popconfirm
title="确定要删除该行入仓记录吗?" title="确定要删除该行入仓记录吗?"
@confirm="handleDeleteRow($index, 1)" @confirm="handleDeleteRow($index, 1)"
...@@ -671,7 +691,8 @@ export default { ...@@ -671,7 +691,8 @@ export default {
type: undefined, type: undefined,
feeType: undefined, feeType: undefined,
recordMode: undefined, recordMode: undefined,
pictureUrls: [] pictureUrls: [],
usageIds: []
}, },
form1: { form1: {
table: [], table: [],
...@@ -690,7 +711,8 @@ export default { ...@@ -690,7 +711,8 @@ export default {
type: 1, type: 1,
feeType: undefined, feeType: undefined,
recordMode: undefined, recordMode: undefined,
pictureUrls: [] pictureUrls: [],
usageIds: []
}, },
brandList: [], brandList: [],
brandList1: [], brandList1: [],
...@@ -769,6 +791,7 @@ export default { ...@@ -769,6 +791,7 @@ export default {
this.form.type = this.warehousing.type this.form.type = this.warehousing.type
this.form.feeType = this.warehousing.feeType this.form.feeType = this.warehousing.feeType
this.form.pictureUrls = this.warehousing.pictureUrls this.form.pictureUrls = this.warehousing.pictureUrls
this.form.usageIds = this.warehousing.usageIds?.split(',') || []
this.warehousing.orderWarehouseInBackItemDoList.forEach(e => { this.warehousing.orderWarehouseInBackItemDoList.forEach(e => {
let bg = {} let bg = {}
...@@ -853,6 +876,7 @@ export default { ...@@ -853,6 +876,7 @@ export default {
orderItemId: undefined, orderItemId: undefined,
orderNo: this.warehousing.orderNo, orderNo: this.warehousing.orderNo,
warehouseInProdAttrIds: this.form1.warehouseInProdAttrIds.join(','), warehouseInProdAttrIds: this.form1.warehouseInProdAttrIds.join(','),
usageIds: this.form1.usageIds.join(','),
orderWarehouseInItemDoList: this.form1.table.map(e => { orderWarehouseInItemDoList: this.form1.table.map(e => {
return { return {
...e, ...e,
...@@ -900,6 +924,7 @@ export default { ...@@ -900,6 +924,7 @@ export default {
weight: (+this.warehousing.weight)?.toFixed(2) || '', weight: (+this.warehousing.weight)?.toFixed(2) || '',
prodId: this.form.prodId, prodId: this.form.prodId,
warehouseInProdAttrIds: this.form.warehouseInProdAttrIds.join(','), warehouseInProdAttrIds: this.form.warehouseInProdAttrIds.join(','),
usageIds: this.form.usageIds.join(','),
"orderWarehouseInUpdateItemDoList": this.form.table.map(e => { "orderWarehouseInUpdateItemDoList": this.form.table.map(e => {
return { return {
...e, ...e,
...@@ -930,6 +955,7 @@ export default { ...@@ -930,6 +955,7 @@ export default {
orderNo: this.warehousing.orderNo, orderNo: this.warehousing.orderNo,
isAppend: this.isAdd ? true : undefined, isAppend: this.isAdd ? true : undefined,
warehouseInProdAttrIds: this.form.warehouseInProdAttrIds.join(','), warehouseInProdAttrIds: this.form.warehouseInProdAttrIds.join(','),
usageIds: this.form.usageIds.join(','),
orderWarehouseInItemDoList: this.form.table.map(e => { orderWarehouseInItemDoList: this.form.table.map(e => {
return { return {
...e, ...e,
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<el-row :gutter="10"> <el-row :gutter="10">
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('中文品名')"> <el-form-item :label="$t('中文品名')">
<product-selector v-model="value.prodId" determined protect-once :disabled="readonly" /> <product-selector v-model="value.prodId" @change="onProductChange" determined protect-once :disabled="readonly" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
...@@ -43,40 +43,33 @@ ...@@ -43,40 +43,33 @@
<el-checkbox-group v-model="usageIds"> <el-checkbox-group v-model="usageIds">
<el-checkbox v-for="item in getDictDatas(DICT_TYPE.WAREHOUSING_RECORD_DETAIL_USAGE)" :key="item.value" :label="item.value" :disabled="readonly">{{ $l(item, 'label') }}</el-checkbox> <el-checkbox v-for="item in getDictDatas(DICT_TYPE.WAREHOUSING_RECORD_DETAIL_USAGE)" :key="item.value" :label="item.value" :disabled="readonly">{{ $l(item, 'label') }}</el-checkbox>
</el-checkbox-group> </el-checkbox-group>
<!-- <dict-selector
v-model="usageIds"
:type="DICT_TYPE.WAREHOUSING_RECORD_DETAIL_USAGE"
multiple
form-type="checkbox"
:disabled="readonly"
></dict-selector>-->
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="10"> <el-row :gutter="10">
<el-col :span="4"> <el-col :span="4">
<el-form-item :label="$t('长')"> <el-form-item :label="$t('长')">
<el-input v-model="boxGauge1" :disabled="readonly" /> <el-input v-model="boxGauge1" type="number" :disabled="readonly" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="4"> <el-col :span="4">
<el-form-item :label="$t('宽')"> <el-form-item :label="$t('宽')">
<el-input v-model="boxGauge2" :disabled="readonly" /> <el-input v-model="boxGauge2" type="number" :disabled="readonly" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="4"> <el-col :span="4">
<el-form-item :label="$t('高')"> <el-form-item :label="$t('高')">
<el-input v-model="boxGauge3" :disabled="readonly" /> <el-input v-model="boxGauge3" type="number" :disabled="readonly" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="4"> <el-col :span="4">
<el-form-item :label="$t('重量')"> <el-form-item :label="$t('重量')">
<el-input v-model="value.weight" :disabled="readonly" /> <el-input v-model="value.weight" type="number" :disabled="readonly" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="4"> <el-col :span="4">
<el-form-item :label="$t('体积')"> <el-form-item :label="$t('体积')">
<el-input v-model="value.volume" :disabled="readonly" /> <el-input v-model="value.volume" type="number" :disabled="readonly" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
...@@ -93,7 +86,7 @@ ...@@ -93,7 +86,7 @@
</el-col> </el-col>
<el-col :span="4"> <el-col :span="4">
<el-form-item :label="$t('数量')"> <el-form-item :label="$t('数量')">
<el-input v-model="value.quantityAll" :disabled="readonly" /> <el-input v-model="value.quantityAll" type="number" :disabled="readonly" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
...@@ -159,7 +152,6 @@ export default { ...@@ -159,7 +152,6 @@ export default {
} }
if (this.value.usageIds) { if (this.value.usageIds) {
console.log('this.value.usageIds',this.value.usageIds)
await this.$nextTick() await this.$nextTick()
this.usageIds = this.value.usageIds.split(',') || [] this.usageIds = this.value.usageIds.split(',') || []
} }
...@@ -188,6 +180,12 @@ export default { ...@@ -188,6 +180,12 @@ export default {
}, },
handleDelete() { handleDelete() {
this.$emit('handle-delete') this.$emit('handle-delete')
},
onProductChange(product){
if (!product) {
return
}
this.prodAttrIds = product.attrId ? product.attrId.split(',').map(e => +e) : []
} }
}, },
watch: { watch: {
...@@ -195,19 +193,46 @@ export default { ...@@ -195,19 +193,46 @@ export default {
this.value.prodAttrIds = val.join(',') this.value.prodAttrIds = val.join(',')
}, },
usageIds(val) { usageIds(val) {
console.log('val', val)
this.$nextTick(() => { this.$nextTick(() => {
this.value.usageIds = val.join(',') this.value.usageIds = val.join(',')
}) })
}, },
boxGauge1() { boxGauge1() {
if (this.boxGauge1 < 0 ) {
this.boxGauge1 = -this.boxGauge1
}
this.value.boxGauge = this.boxGauge1 + '*' + this.boxGauge2 + '*' + this.boxGauge3 this.value.boxGauge = this.boxGauge1 + '*' + this.boxGauge2 + '*' + this.boxGauge3
this.value.volume = (this.boxGauge1 * this.boxGauge2 * this.boxGauge3 / 1000000).toFixed(2)
}, },
boxGauge2() { boxGauge2() {
if (this.boxGauge2 < 0 ) {
this.boxGauge2 = -this.boxGauge2
}
this.value.boxGauge = this.boxGauge1 + '*' + this.boxGauge2 + '*' + this.boxGauge3 this.value.boxGauge = this.boxGauge1 + '*' + this.boxGauge2 + '*' + this.boxGauge3
this.value.volume = (this.boxGauge1 * this.boxGauge2 * this.boxGauge3 / 1000000).toFixed(2)
}, },
boxGauge3() { boxGauge3() {
if (this.boxGauge3 < 0 ) {
this.boxGauge3 = -this.boxGauge3
}
this.value.boxGauge = this.boxGauge1 + '*' + this.boxGauge2 + '*' + this.boxGauge3 this.value.boxGauge = this.boxGauge1 + '*' + this.boxGauge2 + '*' + this.boxGauge3
this.value.volume = (this.boxGauge1 * this.boxGauge2 * this.boxGauge3 / 1000000).toFixed(2)
},
'value.volume'() {
if (this.value.volume < 0) {
this.value.volume = -this.value.volume
}
},
'value.quantityAll'() {
if (this.value.quantityAll < 0) {
this.value.quantityAll = -this.value.quantityAll
}
},
'value.weight'() {
if (this.value.weight < 0) {
this.value.weight = -this.value.weight
}
} }
} }
} }
......
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