Commit 8e99a6d9 authored by Marcus's avatar Marcus

入仓时添加 入仓特性

parent 880b7402
...@@ -57,9 +57,20 @@ ...@@ -57,9 +57,20 @@
<span v-else>{{ warehousing.weight }}</span>Kg <span v-else>{{ warehousing.weight }}</span>Kg
</el-descriptions-item> </el-descriptions-item>
</el-descriptions> </el-descriptions>
<el-form-item :label="$t('材质')" style="margin-top: 20px"> <el-row>
<dict-selector :type="DICT_TYPE.ECW_PRODUCT_MATERIAL" v-model="form.material" clearable></dict-selector> <el-col :span="8">
</el-form-item> <el-form-item :label="$t('材质')" style="margin-top: 20px">
<dict-selector :type="DICT_TYPE.ECW_PRODUCT_MATERIAL" v-model="form.material" clearable></dict-selector>
</el-form-item>
</el-col>
<el-col :span="16">
<el-form-item :label="$t('入仓特性')" style="margin-top: 20px">
<el-checkbox-group v-model="form.prodAttrIds">
<el-checkbox v-for="item in attrList" :key="item.id" :label="item.id">{{ item.attrName }}</el-checkbox>
</el-checkbox-group>
</el-form-item>
</el-col>
</el-row>
<el-form-item :label="$t('入仓时间')" v-if="!edit"> <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-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-item>
...@@ -240,9 +251,20 @@ ...@@ -240,9 +251,20 @@
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item :label="$t('填单参数')">{{ $t('非填单货物') }}</el-descriptions-item> <el-descriptions-item :label="$t('填单参数')">{{ $t('非填单货物') }}</el-descriptions-item>
</el-descriptions> </el-descriptions>
<el-form-item :label="$t('材质')" style="margin-top: 20px"> <el-row>
<dict-selector :type="DICT_TYPE.ECW_PRODUCT_MATERIAL" v-model="form1.material"></dict-selector> <el-col :span="8">
</el-form-item> <el-form-item :label="$t('材质')" style="margin-top: 20px">
<dict-selector :type="DICT_TYPE.ECW_PRODUCT_MATERIAL" v-model="form1.material" clearable></dict-selector>
</el-form-item>
</el-col>
<el-col :span="16">
<el-form-item :label="$t('入仓特性')" style="margin-top: 20px">
<el-checkbox-group v-model="form1.prodAttrIds">
<el-checkbox v-for="item in attrList" :key="item.id" :label="item.id">{{ item.attrName }}</el-checkbox>
</el-checkbox-group>
</el-form-item>
</el-col>
</el-row>
<el-form-item :label="$t('入仓时间')"> <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-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-item>
...@@ -595,7 +617,7 @@ export default { ...@@ -595,7 +617,7 @@ export default {
inTime: undefined, inTime: undefined,
material: undefined, material: undefined,
orderItemId: undefined, orderItemId: undefined,
prodAttrIds: undefined, prodAttrIds: [],
prodId: undefined, prodId: undefined,
prodTitleEn: undefined, prodTitleEn: undefined,
prodTitleZh: undefined, prodTitleZh: undefined,
...@@ -613,7 +635,7 @@ export default { ...@@ -613,7 +635,7 @@ export default {
inTime: undefined, inTime: undefined,
material: undefined, material: undefined,
orderItemId: undefined, orderItemId: undefined,
prodAttrIds: undefined, prodAttrIds: [],
prodId: undefined, prodId: undefined,
prodTitleEn: undefined, prodTitleEn: undefined,
prodTitleZh: undefined, prodTitleZh: undefined,
...@@ -683,7 +705,7 @@ export default { ...@@ -683,7 +705,7 @@ export default {
this.form.orderId = this.warehousing.orderId this.form.orderId = this.warehousing.orderId
this.form.orderItemId = this.warehousing.orderItemId this.form.orderItemId = this.warehousing.orderItemId
this.form.orderNo = this.warehousing.orderNo this.form.orderNo = this.warehousing.orderNo
this.form.prodAttrIds = this.warehousing.prodAttrIds this.form.prodAttrIds = this.warehousing.prodAttrIds?.split(',').map(e => +e) || []
this.form.prodId = this.warehousing.prodId this.form.prodId = this.warehousing.prodId
this.form.prodTitleEn = this.warehousing.prodTitleEn this.form.prodTitleEn = this.warehousing.prodTitleEn
this.form.prodTitleZh = this.warehousing.prodTitleZh this.form.prodTitleZh = this.warehousing.prodTitleZh
...@@ -738,6 +760,13 @@ export default { ...@@ -738,6 +760,13 @@ export default {
handleSubmit() { handleSubmit() {
if (this.activeName !== "first"){ if (this.activeName !== "first"){
// 添加非填单货物 // 添加非填单货物
if (this.form1.prodAttrIds.indexOf(4) !== -1) {
return this.$notify({
title: this.$t('提示'),
message: this.$t("订单包含不接受货物,请检查"),
type: 'warning'
})
}
this.$refs['form1'].validate(valid => { this.$refs['form1'].validate(valid => {
this.$refs['tableForm1'].validate(valid1 => { this.$refs['tableForm1'].validate(valid1 => {
if (!valid || !valid1) { if (!valid || !valid1) {
...@@ -749,6 +778,7 @@ export default { ...@@ -749,6 +778,7 @@ export default {
orderId: this.warehousing.orderId, orderId: this.warehousing.orderId,
orderItemId: undefined, orderItemId: undefined,
orderNo: this.warehousing.orderNo, orderNo: this.warehousing.orderNo,
prodAttrIds: this.form.prodAttrIds.join(','),
orderWarehouseInItemDoList: this.form1.table.map(e => { orderWarehouseInItemDoList: this.form1.table.map(e => {
return { return {
...e, ...e,
...@@ -767,6 +797,13 @@ export default { ...@@ -767,6 +797,13 @@ export default {
}) })
}) })
} else { } else {
if (this.form.prodAttrIds.indexOf(4) !== -1) {
return this.$notify({
title: this.$t('提示'),
message: this.$t("订单包含不接受货物,请检查"),
type: 'warning'
})
}
this.$refs['form'].validate(valid => { this.$refs['form'].validate(valid => {
this.$refs['tableForm'].validate(valid1 => { this.$refs['tableForm'].validate(valid1 => {
if (!valid || !valid1) { if (!valid || !valid1) {
...@@ -784,6 +821,7 @@ export default { ...@@ -784,6 +821,7 @@ export default {
volume: (+this.warehousing.volume)?.toFixed(2) || '', volume: (+this.warehousing.volume)?.toFixed(2) || '',
weight: (+this.warehousing.weight)?.toFixed(2) || '', weight: (+this.warehousing.weight)?.toFixed(2) || '',
prodId: this.form.prodId, prodId: this.form.prodId,
prodAttrIds: this.form.prodAttrIds.join(','),
"orderWarehouseInUpdateItemDoList": this.form.table.map(e => { "orderWarehouseInUpdateItemDoList": this.form.table.map(e => {
return { return {
...e, ...e,
...@@ -809,6 +847,7 @@ export default { ...@@ -809,6 +847,7 @@ export default {
orderItemId: this.warehousing.orderItemId, orderItemId: this.warehousing.orderItemId,
orderNo: this.warehousing.orderNo, orderNo: this.warehousing.orderNo,
isAppend: this.isAdd ? true : undefined, isAppend: this.isAdd ? true : undefined,
prodAttrIds: this.form.prodAttrIds.join(','),
orderWarehouseInItemDoList: this.form.table.map(e => { orderWarehouseInItemDoList: this.form.table.map(e => {
return { return {
...e, ...e,
......
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