Commit b67249de authored by dragondean@qq.com's avatar dragondean@qq.com

箱明细数量必填

parent ef609ce6
<template>
<div style="display: inline-block">
<template v-if="text">
<el-button size="mini" type="text" style="margin-right: 10px" @click="handleOpen">{{ num }}混箱</el-button>
<el-button size="mini" type="text" style="margin-right: 10px" @click="handleOpen">{{ num }}{{$t('混箱')}}}</el-button>
</template>
<template v-else>
<el-button size="mini" type="primary" style="margin-right: 10px" @click="handleOpen">{{ title }}</el-button>
......@@ -12,13 +12,13 @@
:visible.sync="dialogVisible"
width="1024px"
:before-close="handleClose">
<template v-slot:title>
<div class="flex flex-items-center">
<div class="title flex-1 flex flex-items-center">{{$t('选择订单商品')}}</div>
<el-button v-if="showChooseOrderItem" type="primary" size="mini" @click="handleShowChooseDialog">选择订单商品</el-button>
<div style="width: 100px"><!--占位,防止被关闭按钮挡住--></div>
</div>
</template>
<template v-slot:title>
<div class="flex flex-items-center">
<div class="title flex-1 flex flex-items-center">{{title}}</div>
<el-button v-if="showChooseOrderItem" type="primary" size="mini" @click="handleShowChooseDialog">{{$t('选择订单商品')}}</el-button>
<div style="width: 100px"><!--占位,防止被关闭按钮挡住--></div>
</div>
</template>
<el-form v-if="dialogVisible">
<WarehouseRecordDetailItem
......@@ -30,11 +30,11 @@
/>
</el-form>
<el-button v-show="!readonly" type="primary" size="mini" @click="handleAddItem">添加一条明细</el-button>
<el-button v-show="!readonly" type="primary" size="mini" @click="handleAddItem">{{$t('添加一条明细')}}</el-button>
<span v-show="!readonly" slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">取 消</el-button>
<el-button type="primary" @click="handleSave">确 定</el-button>
<el-button @click="dialogVisible = false">{{$t('取消')}}</el-button>
<el-button type="primary" @click="handleSave">{{$t('确定')}}</el-button>
</span>
</el-dialog>
<choose-order-products
......@@ -165,16 +165,22 @@ export default {
for (let i = 0; i < this.dataList.length; i++) {
if (!this.dataList[i].prodId) {
return this.$notify({
title: '明细' + (i + 1) + ': ' + '请选择品名',
title: this.$t("填写第{n}条明细的品名", {n: i=1}),
type: "warning"
})
}
if (!this.dataList[i].brand) {
return this.$notify({
title: '明细' + (i + 1) + ': ' + '请选择品牌',
title: this.$t("填写第{n}条明细的品牌", {n: i=1}),
type: "warning"
})
}
if(!this.dataList[i].quantityAll){
return this.$notify({
title: this.$t("填写第{n}条明细的数量", {n: i=1}),
type: "warning"
})
}
}
this.$emit('input', this.dataList)
this.dialogVisible = false
......@@ -218,9 +224,9 @@ export default {
computed: {
title() {
if (this.readonly) {
return '查看箱明细'
return this.$t('查看箱明细')
}
return !this.value || this.value.length === 0 ? '添加箱明细' : '编辑箱明细'
return !this.value || this.value.length === 0 ? this.$t('添加箱明细') : this.$t('编辑箱明细')
}
}
}
......
......@@ -90,7 +90,7 @@
</el-form-item>
</el-col>-->
<el-col :span="4">
<el-form-item :label="$t('数量')">
<el-form-item :label="$t('数量')" required>
<el-input v-model="value.quantityAll" type="number" :disabled="readonly" />
</el-form-item>
</el-col>
......
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