diff --git a/src/views/modules/labelSetting/com_add_update_customer_label.vue b/src/views/modules/labelSetting/com_add_update_customer_label.vue
index b17683c..ec12a00 100644
--- a/src/views/modules/labelSetting/com_add_update_customer_label.vue
+++ b/src/views/modules/labelSetting/com_add_update_customer_label.vue
@@ -61,18 +61,16 @@
-
-
-
+
+
+
{{ $t('labelSetting.fields.standardOuterLabel') }}
-
-
-
+
-
+
@@ -173,6 +171,11 @@ export default {
},
}
},
+ computed: {
+ canPrintStandardOuterLabel() {
+ return (this.pageData.labelType || '').trim() === '外箱标签' && this.pageData.subLabelFlag === 'N';
+ },
+ },
methods: {
//初始化组件的参数
init(currentRow) {
@@ -180,7 +183,7 @@ export default {
this.pageData = Object.assign({ printStandardOuterLabel: false }, JSON.parse(JSON.stringify(currentRow)));
//统一子报表标识和值,避免页面展示为*
this.pageData.subLabelFlag = this.pageData.subLabelFlag === 'Y' ? 'Y' : 'N';
- this.pageData.printStandardOuterLabel = this.pageData.printStandardOuterLabel === true;
+ this.pageData.printStandardOuterLabel = this.canPrintStandardOuterLabel && this.pageData.printStandardOuterLabel === true;
this.pageData.parentLabelNo = this.getDisplayParentLabelNo(this.pageData.parentLabelNo, this.pageData.subLabelFlag);
//打开页面
this.visible = true;
@@ -262,7 +265,8 @@ export default {
submitData.labelName = (submitData.labelName || '').trim();
submitData.remark = (submitData.remark || '').trim();
submitData.subLabelFlag = submitData.subLabelFlag === 'Y' ? 'Y' : 'N';
- submitData.printStandardOuterLabel = submitData.printStandardOuterLabel === true;
+ submitData.printStandardOuterLabel = submitData.labelType === '外箱标签'
+ && submitData.subLabelFlag === 'N' && submitData.printStandardOuterLabel === true;
let parentLabelNo = (submitData.parentLabelNo || '').trim().toUpperCase();
submitData.parentLabelNo = submitData.subLabelFlag === 'Y' ? parentLabelNo : '*';
return submitData;
@@ -395,6 +399,9 @@ export default {
pageData: {
deep: true,
handler: function (newV, oldV) {
+ if (!this.canPrintStandardOuterLabel && this.pageData.printStandardOuterLabel) {
+ this.pageData.printStandardOuterLabel = false;
+ }
let labelNo = (this.pageData.labelNo || '').toUpperCase();
let parentLabelNo = (this.pageData.parentLabelNo || '').toUpperCase();
if(this.pageData.labelNo !== labelNo){
diff --git a/src/views/modules/labelSetting/customer_label_setting.vue b/src/views/modules/labelSetting/customer_label_setting.vue
index 01ff6db..77ac303 100644
--- a/src/views/modules/labelSetting/customer_label_setting.vue
+++ b/src/views/modules/labelSetting/customer_label_setting.vue
@@ -38,7 +38,7 @@
v-loading="dataListLoading"
style="width: 100%;">
- {{ scope.row[item.columnProp] }}
+
+
+ {{ $t(scope.row.printStandardOuterLabel === true ? 'labelSetting.common.yes' : 'labelSetting.common.no') }}
+
+ {{ scope.row[item.columnProp] }}
+
@@ -315,6 +320,29 @@ export default {
comAddUpdateLabel,/*标签新增或者修改的组件*/
},
+ computed: {
+ displayColumnList() {
+ // 已保存的用户/默认列配置可能没有新字段,显示时补齐且不重复添加。
+ if (this.columnList.some(item => item.columnProp === 'printStandardOuterLabel')) {
+ return this.columnList;
+ }
+ const columns = this.columnList.slice();
+ const subLabelIndex = columns.findIndex(item => item.columnProp === 'parentLabelNo');
+ columns.splice(subLabelIndex < 0 ? columns.length : subLabelIndex + 1, 0, {
+ columnProp: 'printStandardOuterLabel',
+ columnLabel: this.$t('labelSetting.fields.standardOuterLabel'),
+ columnWidth: 140,
+ headerAlign: 'center',
+ align: 'center',
+ columnHidden: false,
+ columnImage: false,
+ columnSortable: true,
+ fixed: ''
+ });
+ return columns;
+ },
+ },
+
mounted() {
this.$nextTick(() => {
this.height = window.innerHeight - 165;