Browse Source

Merge branch 'master' into 测试

lxf 1 year ago
parent
commit
be67de7a95

+ 38 - 4
src/views/group/product/associated-configuration/index.vue

@@ -7,10 +7,10 @@
       :loading="loading"
       highlight-current-row
       :action-list="[
-        // {
-        //   text: '新增',
-        //   action: () => clickModal(),
-        // },
+        {
+          text: '新增',
+          action: () => clickModal(),
+        },
         {
           text: '应用包材配置',
           action: () => clickUse(),
@@ -69,6 +69,22 @@
             </div>
           </div>
         </template>
+        <template #paperBoxId>
+          <div style="width: 100%">
+            <el-button
+              v-if="!formData.data.paperBoxId || formData.data.paperBoxId === '0'"
+              type="primary"
+              size="small"
+              @click="handleOpen('paperBox', '1682221409847304194')"
+              style="margin: 5px 0; background-color: #43b214; border-color: #43b214">
+              选择BOM
+            </el-button>
+            <div style="width: 100%; display: flex; align-items: center" v-else>
+              <el-icon style="font-size: 16px; cursor: pointer" @click="clickRemove('paperBox')"><Remove /></el-icon>
+              <span>{{ formData.data.paperBoxCode }}</span>
+            </div>
+          </div>
+        </template>
         <template #bubblePackId>
           <div style="width: 100%">
             <el-button
@@ -260,6 +276,19 @@ const config = computed(() => {
     },
     {
       attrs: {
+        label: "纸箱",
+        prop: "paperBoxCode",
+        align: "center",
+      },
+      render(val) {
+        if (val) {
+          return val;
+        }
+        return "-";
+      },
+    },
+    {
+      attrs: {
         label: "气泡袋",
         prop: "bubblePackCode",
         align: "center",
@@ -435,6 +464,11 @@ const formConfig = computed(() => {
     },
     {
       type: "slot",
+      slotName: "paperBoxId",
+      label: "纸箱",
+    },
+    {
+      type: "slot",
       slotName: "bubblePackId",
       label: "气泡袋",
     },

+ 18 - 0
src/views/group/product/material-configuration/index.vue

@@ -27,6 +27,10 @@
         <div v-if="item.meshBag == 1" class="status-ball"></div>
         <div v-else>一</div>
       </template>
+      <template #paperBox="{ item }">
+        <div v-if="item.paperBox == 1" class="status-ball"></div>
+        <div v-else>一</div>
+      </template>
       <template #bubblePack="{ item }">
         <div v-if="item.bubblePack == 1" class="status-ball"></div>
         <div v-else>一</div>
@@ -130,6 +134,13 @@ const config = computed(() => {
     },
     {
       attrs: {
+        label: "纸箱",
+        slot: "paperBox",
+        align: "center",
+      },
+    },
+    {
+      attrs: {
         label: "气泡袋",
         slot: "bubblePack",
         align: "center",
@@ -281,6 +292,13 @@ const formConfig = computed(() => {
     },
     {
       type: "switch",
+      prop: "paperBox",
+      label: "纸箱",
+      active: 1,
+      inactive: 0,
+    },
+    {
+      type: "switch",
       prop: "bubblePack",
       label: "气泡袋",
       active: 1,