Compare commits
	
		
			2 Commits
		
	
	
		
			a46814e6c8
			...
			12fade3092
		
	
	| Author | SHA1 | Date | 
|---|---|---|
| 
							
							
								 | 
						12fade3092 | |
| 
							
							
								 | 
						cfba91182e | 
| 
						 | 
					@ -271,3 +271,11 @@ export function getTreeType(params) {
 | 
				
			||||||
  })
 | 
					  })
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// 批量驳回
 | 
				
			||||||
 | 
					export function batchReject(data) {
 | 
				
			||||||
 | 
					  return request({
 | 
				
			||||||
 | 
					    url: '/member/manager/withdraw/reject',
 | 
				
			||||||
 | 
					    method: 'post',
 | 
				
			||||||
 | 
					    data
 | 
				
			||||||
 | 
					  })
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -939,37 +939,37 @@ export const constantRoutes = [
 | 
				
			||||||
            meta: { title: '邮费配置' }
 | 
					            meta: { title: '邮费配置' }
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
        ]
 | 
					        ]
 | 
				
			||||||
      },
 | 
					      }
 | 
				
			||||||
      {
 | 
					      // {
 | 
				
			||||||
        path: 'productBasicInfo',
 | 
					      //   path: 'productBasicInfo',
 | 
				
			||||||
        name: 'productBasicInfo',
 | 
					      //   name: 'productBasicInfo',
 | 
				
			||||||
        meta: { title: '产品基本信息' },
 | 
					      //   meta: { title: '产品基本信息' },
 | 
				
			||||||
        component: ParentView,
 | 
					      //   component: ParentView,
 | 
				
			||||||
        redirect: 'productBasicInfo/cpfl',
 | 
					      //   redirect: 'productBasicInfo/cpfl',
 | 
				
			||||||
        children: [
 | 
					      //   children: [
 | 
				
			||||||
          {
 | 
					      //     {
 | 
				
			||||||
            path: 'productBasicList',
 | 
					      //       path: 'productBasicList',
 | 
				
			||||||
            name: 'productBasicList',
 | 
					      //       name: 'productBasicList',
 | 
				
			||||||
            component: () => import('@/views/goodsManage/productBasicInfo/productBasicList/index.vue'),
 | 
					      //       component: () => import('@/views/goodsManage/productBasicInfo/productBasicList/index.vue'),
 | 
				
			||||||
            meta: { title: '产品列表' },
 | 
					 | 
				
			||||||
            hidden: true
 | 
					 | 
				
			||||||
          },
 | 
					 | 
				
			||||||
          {
 | 
					 | 
				
			||||||
            path: 'productBasicAdd',
 | 
					 | 
				
			||||||
            name: 'productBasicAdd',
 | 
					 | 
				
			||||||
            component: () => import('@/views/goodsManage/productBasicInfo/productBasicAdd/jcsz.vue'),
 | 
					 | 
				
			||||||
            meta: { title: '产品新增' },
 | 
					 | 
				
			||||||
            hidden: true
 | 
					 | 
				
			||||||
          },
 | 
					 | 
				
			||||||
          {
 | 
					 | 
				
			||||||
            path: 'productBasicDetail',
 | 
					 | 
				
			||||||
            name: 'productBasicDetail',
 | 
					 | 
				
			||||||
            component: () => import('@/views/goodsManage/productBasicInfo/productBasicAdd/productDetail.vue'),
 | 
					 | 
				
			||||||
      //       meta: { title: '产品列表' },
 | 
					      //       meta: { title: '产品列表' },
 | 
				
			||||||
            hidden: true
 | 
					      //       hidden: true
 | 
				
			||||||
          }
 | 
					      //     },
 | 
				
			||||||
        ]
 | 
					      //     {
 | 
				
			||||||
      }
 | 
					      //       path: 'productBasicAdd',
 | 
				
			||||||
 | 
					      //       name: 'productBasicAdd',
 | 
				
			||||||
 | 
					      //       component: () => import('@/views/goodsManage/productBasicInfo/productBasicAdd/jcsz.vue'),
 | 
				
			||||||
 | 
					      //       meta: { title: '产品新增' },
 | 
				
			||||||
 | 
					      //       hidden: true
 | 
				
			||||||
 | 
					      //     },
 | 
				
			||||||
 | 
					      //     {
 | 
				
			||||||
 | 
					      //       path: 'productBasicDetail',
 | 
				
			||||||
 | 
					      //       name: 'productBasicDetail',
 | 
				
			||||||
 | 
					      //       component: () => import('@/views/goodsManage/productBasicInfo/productBasicAdd/productDetail.vue'),
 | 
				
			||||||
 | 
					      //       // meta: { title: '产品列表'},
 | 
				
			||||||
 | 
					      //       hidden: true
 | 
				
			||||||
 | 
					      //     }
 | 
				
			||||||
 | 
					      //   ]
 | 
				
			||||||
 | 
					      // }
 | 
				
			||||||
    ]
 | 
					    ]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -221,7 +221,16 @@
 | 
				
			||||||
              @click="handleExport"
 | 
					              @click="handleExport"
 | 
				
			||||||
            >
 | 
					            >
 | 
				
			||||||
              {{ '导出' }}</el-button>
 | 
					              {{ '导出' }}</el-button>
 | 
				
			||||||
 | 
					            <el-button
 | 
				
			||||||
 | 
					              style="padding: 8px"
 | 
				
			||||||
 | 
					              size="small"
 | 
				
			||||||
 | 
					              class="thebtn2"
 | 
				
			||||||
 | 
					              @click="batchRejectHandle"
 | 
				
			||||||
 | 
					            >
 | 
				
			||||||
 | 
					              驳回
 | 
				
			||||||
 | 
					            </el-button>
 | 
				
			||||||
          </div>
 | 
					          </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        <div style="overflow: auto">
 | 
					        <div style="overflow: auto">
 | 
				
			||||||
| 
						 | 
					@ -457,12 +466,7 @@
 | 
				
			||||||
              prop="payerRemarks"
 | 
					              prop="payerRemarks"
 | 
				
			||||||
              :label="'打款备注'"
 | 
					              :label="'打款备注'"
 | 
				
			||||||
            />
 | 
					            />
 | 
				
			||||||
            <el-table-column
 | 
					
 | 
				
			||||||
              v-if="showData.approveStateVal"
 | 
					 | 
				
			||||||
              align="center"
 | 
					 | 
				
			||||||
              prop="approveStateVal"
 | 
					 | 
				
			||||||
              :label="'审核状态'"
 | 
					 | 
				
			||||||
            />
 | 
					 | 
				
			||||||
            <el-table-column
 | 
					            <el-table-column
 | 
				
			||||||
              v-if="showData.withdrawCode"
 | 
					              v-if="showData.withdrawCode"
 | 
				
			||||||
              align="center"
 | 
					              align="center"
 | 
				
			||||||
| 
						 | 
					@ -470,6 +474,13 @@
 | 
				
			||||||
              width="200"
 | 
					              width="200"
 | 
				
			||||||
              :label="'单据编号'"
 | 
					              :label="'单据编号'"
 | 
				
			||||||
            />
 | 
					            />
 | 
				
			||||||
 | 
					            <el-table-column
 | 
				
			||||||
 | 
					              v-if="showData.approveStateVal"
 | 
				
			||||||
 | 
					              align="center"
 | 
				
			||||||
 | 
					              prop="approveStateVal"
 | 
				
			||||||
 | 
					              :label="'审核状态'"
 | 
				
			||||||
 | 
					              fixed="right"
 | 
				
			||||||
 | 
					            />
 | 
				
			||||||
            <el-table-column
 | 
					            <el-table-column
 | 
				
			||||||
              align="center"
 | 
					              align="center"
 | 
				
			||||||
              prop="time"
 | 
					              prop="time"
 | 
				
			||||||
| 
						 | 
					@ -552,6 +563,28 @@
 | 
				
			||||||
        }}</el-button>
 | 
					        }}</el-button>
 | 
				
			||||||
      </span>
 | 
					      </span>
 | 
				
			||||||
    </el-dialog>
 | 
					    </el-dialog>
 | 
				
			||||||
 | 
					    <el-dialog
 | 
				
			||||||
 | 
					      title="驳回原因"
 | 
				
			||||||
 | 
					      :visible.sync="rejectDialogVisible"
 | 
				
			||||||
 | 
					      width="30%"
 | 
				
			||||||
 | 
					      :close-on-click-modal="false"
 | 
				
			||||||
 | 
					      center
 | 
				
			||||||
 | 
					    >
 | 
				
			||||||
 | 
					      <el-form ref="rejectForm" :model="rejectForm" label-width="auto">
 | 
				
			||||||
 | 
					        <el-form-item required label="驳回原因">
 | 
				
			||||||
 | 
					          <el-input
 | 
				
			||||||
 | 
					            v-model="rejectForm.rejectRemark"
 | 
				
			||||||
 | 
					            :maxlength="80"
 | 
				
			||||||
 | 
					            show-word-limit
 | 
				
			||||||
 | 
					            type="textarea"
 | 
				
			||||||
 | 
					          />
 | 
				
			||||||
 | 
					        </el-form-item>
 | 
				
			||||||
 | 
					      </el-form>
 | 
				
			||||||
 | 
					      <span slot="footer" class="dialog-footer">
 | 
				
			||||||
 | 
					        <el-button @click="rejectDialogVisible = false">取消</el-button>
 | 
				
			||||||
 | 
					        <el-button type="primary" @click="saveRejectForm">确认</el-button>
 | 
				
			||||||
 | 
					      </span>
 | 
				
			||||||
 | 
					    </el-dialog>
 | 
				
			||||||
  </div>
 | 
					  </div>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -584,6 +617,10 @@ export default {
 | 
				
			||||||
      // 折叠搜索框
 | 
					      // 折叠搜索框
 | 
				
			||||||
      isActive: false,
 | 
					      isActive: false,
 | 
				
			||||||
      moren: 'cashDetails',
 | 
					      moren: 'cashDetails',
 | 
				
			||||||
 | 
					      rejectDialogVisible: false,
 | 
				
			||||||
 | 
					      rejectForm: {
 | 
				
			||||||
 | 
					        rejectRemark: ''
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
      topList: [
 | 
					      topList: [
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
          name: '提现明细',
 | 
					          name: '提现明细',
 | 
				
			||||||
| 
						 | 
					@ -772,6 +809,34 @@ export default {
 | 
				
			||||||
  methods: {
 | 
					  methods: {
 | 
				
			||||||
    isLocals,
 | 
					    isLocals,
 | 
				
			||||||
    isLocalSymbol,
 | 
					    isLocalSymbol,
 | 
				
			||||||
 | 
					    saveRejectForm() {
 | 
				
			||||||
 | 
					      const data = {
 | 
				
			||||||
 | 
					        idList: this.checkArr,
 | 
				
			||||||
 | 
					        rejectRemark: this.rejectForm.rejectRemark
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					      api.batchReject(data).then((res) => {
 | 
				
			||||||
 | 
					        if (res.code == 200) {
 | 
				
			||||||
 | 
					          this.$message({
 | 
				
			||||||
 | 
					            message: res.msg,
 | 
				
			||||||
 | 
					            type: 'success'
 | 
				
			||||||
 | 
					          })
 | 
				
			||||||
 | 
					          this.rejectDialogVisible = false
 | 
				
			||||||
 | 
					          this.getDataList()
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      })
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    batchRejectHandle() {
 | 
				
			||||||
 | 
					      const canReject = this.checkArrAll.every((item) => item.approveState == 1)
 | 
				
			||||||
 | 
					      console.log(canReject)
 | 
				
			||||||
 | 
					      if (!canReject) {
 | 
				
			||||||
 | 
					        this.$message({
 | 
				
			||||||
 | 
					          message: '存在已审核单据,请重新选择',
 | 
				
			||||||
 | 
					          type: 'warning'
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        return false
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					      this.rejectDialogVisible = true
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
    getUserRole() {
 | 
					    getUserRole() {
 | 
				
			||||||
      getRoleMenu('CashDetails').then((res) => {
 | 
					      getRoleMenu('CashDetails').then((res) => {
 | 
				
			||||||
        const obj = {}
 | 
					        const obj = {}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,802 +0,0 @@
 | 
				
			||||||
<!--
 | 
					 | 
				
			||||||
 * @Descripttion:
 | 
					 | 
				
			||||||
 * @version:
 | 
					 | 
				
			||||||
 * @Author: kBank
 | 
					 | 
				
			||||||
 * @Date: 2022-10-28 09:02:23
 | 
					 | 
				
			||||||
-->
 | 
					 | 
				
			||||||
<template>
 | 
					 | 
				
			||||||
  <div class="page">
 | 
					 | 
				
			||||||
    <div class="topbox">
 | 
					 | 
				
			||||||
      <div class="levelList_i"
 | 
					 | 
				
			||||||
           :class="tabActive == item.id ? 'act' : ''"
 | 
					 | 
				
			||||||
           v-for="(item, index) in topList"
 | 
					 | 
				
			||||||
           :key="index"
 | 
					 | 
				
			||||||
           @click.prevent="handleLink(item.id)">
 | 
					 | 
				
			||||||
        {{ item.name }}
 | 
					 | 
				
			||||||
      </div>
 | 
					 | 
				
			||||||
    </div>
 | 
					 | 
				
			||||||
    <div class="main">
 | 
					 | 
				
			||||||
      <div class="contain">
 | 
					 | 
				
			||||||
        <el-form ref="form"
 | 
					 | 
				
			||||||
                 :rules="rules"
 | 
					 | 
				
			||||||
                 :model="form"
 | 
					 | 
				
			||||||
                 label-width="auto">
 | 
					 | 
				
			||||||
          <div v-show="tabActive==0">
 | 
					 | 
				
			||||||
            <el-row >
 | 
					 | 
				
			||||||
              <el-col class="el-col-40">
 | 
					 | 
				
			||||||
                <el-form-item :label="'产品名称'"
 | 
					 | 
				
			||||||
                              prop="productName">
 | 
					 | 
				
			||||||
                  <el-input clearable
 | 
					 | 
				
			||||||
                            v-model="form.productName"
 | 
					 | 
				
			||||||
                            :placeholder="'请输入'"></el-input>
 | 
					 | 
				
			||||||
                </el-form-item>
 | 
					 | 
				
			||||||
              </el-col>
 | 
					 | 
				
			||||||
              <el-col class="el-col-20">
 | 
					 | 
				
			||||||
                <el-form-item :label="'产品编码'"
 | 
					 | 
				
			||||||
                              prop="productCode">
 | 
					 | 
				
			||||||
                  <el-input clearable
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                            v-model="form.productCode"
 | 
					 | 
				
			||||||
                            :placeholder="'请输入'"></el-input>
 | 
					 | 
				
			||||||
                </el-form-item>
 | 
					 | 
				
			||||||
              </el-col>
 | 
					 | 
				
			||||||
              <!-- <el-col class="el-col-20">
 | 
					 | 
				
			||||||
                <el-form-item :label="'划线价'"
 | 
					 | 
				
			||||||
                              prop="retailPrice">
 | 
					 | 
				
			||||||
                  <el-input clearable
 | 
					 | 
				
			||||||
                            oninput="value=value.replace(/[^\d.]/g,'')"
 | 
					 | 
				
			||||||
                            v-model="form.retailPrice"
 | 
					 | 
				
			||||||
                            :placeholder="'请输入'"></el-input>
 | 
					 | 
				
			||||||
                </el-form-item>
 | 
					 | 
				
			||||||
              </el-col> -->
 | 
					 | 
				
			||||||
              <!-- <el-col class="el-col-20">
 | 
					 | 
				
			||||||
                <el-form-item :label="'发货类型'"
 | 
					 | 
				
			||||||
                              prop="shippingChannel">
 | 
					 | 
				
			||||||
                  <el-select clearable
 | 
					 | 
				
			||||||
                             v-model="form.shippingChannel">
 | 
					 | 
				
			||||||
                    <el-option v-for="item in fhTypeList"
 | 
					 | 
				
			||||||
                               :key="item.value"
 | 
					 | 
				
			||||||
                               :label="item.label"
 | 
					 | 
				
			||||||
                               :value="item.value"></el-option>
 | 
					 | 
				
			||||||
                  </el-select>
 | 
					 | 
				
			||||||
                </el-form-item>
 | 
					 | 
				
			||||||
              </el-col> -->
 | 
					 | 
				
			||||||
              <el-col class="el-col-20">
 | 
					 | 
				
			||||||
                <el-form-item :label="'保质期'"
 | 
					 | 
				
			||||||
                              prop="shelfLife">
 | 
					 | 
				
			||||||
                  <el-input clearable
 | 
					 | 
				
			||||||
                            oninput="value=value.replace(/[^\d]/g,'')"
 | 
					 | 
				
			||||||
                            v-model="form.shelfLife"
 | 
					 | 
				
			||||||
                            :placeholder="'请输入'">
 | 
					 | 
				
			||||||
                    <i slot="suffix"
 | 
					 | 
				
			||||||
                       class="neibu">{{'天'}} </i>
 | 
					 | 
				
			||||||
                  </el-input>
 | 
					 | 
				
			||||||
                </el-form-item>
 | 
					 | 
				
			||||||
              </el-col>
 | 
					 | 
				
			||||||
              <el-col class="el-col-20">
 | 
					 | 
				
			||||||
                <el-form-item :label="'单位'"
 | 
					 | 
				
			||||||
                              prop="unit">
 | 
					 | 
				
			||||||
                  <el-select clearable
 | 
					 | 
				
			||||||
                             v-model="form.unit">
 | 
					 | 
				
			||||||
                    <el-option v-for="item in dwList"
 | 
					 | 
				
			||||||
                               :key="item.pkId"
 | 
					 | 
				
			||||||
                               :label="item.name"
 | 
					 | 
				
			||||||
                               :value="item.pkId"></el-option>
 | 
					 | 
				
			||||||
                  </el-select>
 | 
					 | 
				
			||||||
                </el-form-item>
 | 
					 | 
				
			||||||
              </el-col>
 | 
					 | 
				
			||||||
              <el-col class="el-col-20">
 | 
					 | 
				
			||||||
                <el-form-item :label="'重量'"
 | 
					 | 
				
			||||||
                              prop="weight">
 | 
					 | 
				
			||||||
                  <el-input clearable
 | 
					 | 
				
			||||||
                            oninput="value=value.replace(/[^\d.]/g,'')"
 | 
					 | 
				
			||||||
                            v-model="form.weight"
 | 
					 | 
				
			||||||
                            :placeholder="'请输入'">
 | 
					 | 
				
			||||||
                    <i slot="suffix"
 | 
					 | 
				
			||||||
                       class="neibu">KG </i>
 | 
					 | 
				
			||||||
                  </el-input>
 | 
					 | 
				
			||||||
                </el-form-item>
 | 
					 | 
				
			||||||
              </el-col>
 | 
					 | 
				
			||||||
              <!-- <el-col class="el-col-20">
 | 
					 | 
				
			||||||
                <el-form-item :label="'邮费重量'"
 | 
					 | 
				
			||||||
                              prop="postageWeight">
 | 
					 | 
				
			||||||
                  <el-input clearable
 | 
					 | 
				
			||||||
                            oninput="value=value.replace(/[^\d.]/g,'')"
 | 
					 | 
				
			||||||
                            v-model="form.postageWeight"
 | 
					 | 
				
			||||||
                            :placeholder="'请输入'">
 | 
					 | 
				
			||||||
                    <i slot="suffix"
 | 
					 | 
				
			||||||
                       class="neibu">KG </i>
 | 
					 | 
				
			||||||
                  </el-input>
 | 
					 | 
				
			||||||
                </el-form-item>
 | 
					 | 
				
			||||||
              </el-col> -->
 | 
					 | 
				
			||||||
              <!-- <el-col class="el-col-20">
 | 
					 | 
				
			||||||
                <el-form-item :label="'请选择产品属性'"
 | 
					 | 
				
			||||||
                              prop="productAttr">
 | 
					 | 
				
			||||||
                  <el-select clearable
 | 
					 | 
				
			||||||
                             v-model="form.productAttr">
 | 
					 | 
				
			||||||
                    <el-option v-for="item in productTypeList"
 | 
					 | 
				
			||||||
                               :key="item.value"
 | 
					 | 
				
			||||||
                               :label="item.label"
 | 
					 | 
				
			||||||
                               :value="item.value"></el-option>
 | 
					 | 
				
			||||||
                  </el-select>
 | 
					 | 
				
			||||||
                </el-form-item>
 | 
					 | 
				
			||||||
              </el-col> -->
 | 
					 | 
				
			||||||
              <el-col class="el-col-20">
 | 
					 | 
				
			||||||
                <el-form-item :label="'所属分类'"
 | 
					 | 
				
			||||||
                              prop="pkClassify">
 | 
					 | 
				
			||||||
                  <el-select clearable
 | 
					 | 
				
			||||||
                             v-model="form.pkClassify">
 | 
					 | 
				
			||||||
                    <el-option v-for="item in classifyList"
 | 
					 | 
				
			||||||
                               :key="item.pkId"
 | 
					 | 
				
			||||||
                               :label="item.name"
 | 
					 | 
				
			||||||
                               :value="item.pkId"></el-option>
 | 
					 | 
				
			||||||
                  </el-select>
 | 
					 | 
				
			||||||
                </el-form-item>
 | 
					 | 
				
			||||||
              </el-col>
 | 
					 | 
				
			||||||
              <!-- <el-col class="el-col-20">
 | 
					 | 
				
			||||||
                <el-form-item :label="'排列序号'"
 | 
					 | 
				
			||||||
                              prop="sort">
 | 
					 | 
				
			||||||
                  <el-input clearable
 | 
					 | 
				
			||||||
                            oninput="value = value.replace(/[^\d]/g,'')"
 | 
					 | 
				
			||||||
                            v-model="form.sort"
 | 
					 | 
				
			||||||
                            :placeholder="'请输入'">
 | 
					 | 
				
			||||||
                  </el-input>
 | 
					 | 
				
			||||||
                </el-form-item>
 | 
					 | 
				
			||||||
              </el-col> -->
 | 
					 | 
				
			||||||
              <el-col class="el-col-20">
 | 
					 | 
				
			||||||
                <el-form-item :label="'长'"
 | 
					 | 
				
			||||||
                              prop="length">
 | 
					 | 
				
			||||||
                  <el-input clearable
 | 
					 | 
				
			||||||
                            oninput="value=value.replace(/[^\d.]/g,'')"
 | 
					 | 
				
			||||||
                            v-model="form.length"
 | 
					 | 
				
			||||||
                            :placeholder="'请输入'">
 | 
					 | 
				
			||||||
                    <i slot="suffix"
 | 
					 | 
				
			||||||
                       class="neibu">CM </i>
 | 
					 | 
				
			||||||
                  </el-input>
 | 
					 | 
				
			||||||
                </el-form-item>
 | 
					 | 
				
			||||||
              </el-col>
 | 
					 | 
				
			||||||
              <el-col class="el-col-20">
 | 
					 | 
				
			||||||
                <el-form-item :label="'宽'"
 | 
					 | 
				
			||||||
                              prop="width">
 | 
					 | 
				
			||||||
                  <el-input clearable
 | 
					 | 
				
			||||||
                            oninput="value=value.replace(/[^\d.]/g,'')"
 | 
					 | 
				
			||||||
                            v-model="form.width"
 | 
					 | 
				
			||||||
                            :placeholder="'请输入'">
 | 
					 | 
				
			||||||
                    <i slot="suffix"
 | 
					 | 
				
			||||||
                       class="neibu">CM </i>
 | 
					 | 
				
			||||||
                  </el-input>
 | 
					 | 
				
			||||||
                </el-form-item>
 | 
					 | 
				
			||||||
              </el-col>
 | 
					 | 
				
			||||||
              <el-col class="el-col-20">
 | 
					 | 
				
			||||||
                <el-form-item :label="'高'"
 | 
					 | 
				
			||||||
                              prop="height">
 | 
					 | 
				
			||||||
                  <el-input clearable
 | 
					 | 
				
			||||||
                            oninput="value=value.replace(/[^\d.]/g,'')"
 | 
					 | 
				
			||||||
                            v-model="form.height"
 | 
					 | 
				
			||||||
                            :placeholder="'请输入'">
 | 
					 | 
				
			||||||
                    <i slot="suffix"
 | 
					 | 
				
			||||||
                       class="neibu">CM </i>
 | 
					 | 
				
			||||||
                  </el-input>
 | 
					 | 
				
			||||||
                </el-form-item>
 | 
					 | 
				
			||||||
              </el-col>
 | 
					 | 
				
			||||||
              <!-- <el-col class="el-col-20">
 | 
					 | 
				
			||||||
                <el-form-item :label="'复购类型'">
 | 
					 | 
				
			||||||
                  <el-select clearable
 | 
					 | 
				
			||||||
                             v-model="form.repurchaseType">
 | 
					 | 
				
			||||||
                    <el-option v-for="item in repurchaseTypeList"
 | 
					 | 
				
			||||||
                               :key="item.value"
 | 
					 | 
				
			||||||
                               :label="item.label"
 | 
					 | 
				
			||||||
                               :value="item.value"></el-option>
 | 
					 | 
				
			||||||
                  </el-select>
 | 
					 | 
				
			||||||
                </el-form-item>
 | 
					 | 
				
			||||||
              </el-col> -->
 | 
					 | 
				
			||||||
              <!-- <el-col class="el-col-20">
 | 
					 | 
				
			||||||
                <el-form-item label="产品基本信息">
 | 
					 | 
				
			||||||
                  <el-select clearable
 | 
					 | 
				
			||||||
                             v-model="form.pkProductBas">
 | 
					 | 
				
			||||||
                    <el-option v-for="item in productList"
 | 
					 | 
				
			||||||
                               :key="item.pkId"
 | 
					 | 
				
			||||||
                               :label="item.productName"
 | 
					 | 
				
			||||||
                               :value="item.pkId"></el-option>
 | 
					 | 
				
			||||||
                  </el-select>
 | 
					 | 
				
			||||||
                </el-form-item>
 | 
					 | 
				
			||||||
              </el-col> -->
 | 
					 | 
				
			||||||
              <el-col class="el-col-40">
 | 
					 | 
				
			||||||
                <el-form-item :label="'产品主图'"
 | 
					 | 
				
			||||||
                              prop="cover">
 | 
					 | 
				
			||||||
                  <!-- <el-upload :headers="headers"
 | 
					 | 
				
			||||||
                             :class="{ uploadIconOne: showImg, uploadIcon: noneUploadImg }"
 | 
					 | 
				
			||||||
                             :action="uploadImgUrl"
 | 
					 | 
				
			||||||
                             :on-success="handlePictureSuccess"
 | 
					 | 
				
			||||||
                             :on-change="uploadImgChange"
 | 
					 | 
				
			||||||
                             list-type="picture-card"
 | 
					 | 
				
			||||||
                             :limit="1"
 | 
					 | 
				
			||||||
                             :on-remove="handleRemove">
 | 
					 | 
				
			||||||
                    <i class="el-icon-plus"></i>
 | 
					 | 
				
			||||||
                  </el-upload> -->
 | 
					 | 
				
			||||||
                  <imageUpload v-model="form.cover" />
 | 
					 | 
				
			||||||
                  <div class="jy">{{ '建议尺寸452×452,大小为200K' }}</div>
 | 
					 | 
				
			||||||
                </el-form-item>
 | 
					 | 
				
			||||||
              </el-col>
 | 
					 | 
				
			||||||
             
 | 
					 | 
				
			||||||
            </el-row>
 | 
					 | 
				
			||||||
          </div>
 | 
					 | 
				
			||||||
          <div v-show="tabActive==1">
 | 
					 | 
				
			||||||
            <el-form-item :label="'规格'"
 | 
					 | 
				
			||||||
                          prop="pkSpecsType">
 | 
					 | 
				
			||||||
              <el-tag :key="item.pkId"
 | 
					 | 
				
			||||||
                      v-for="item,index in ggList"
 | 
					 | 
				
			||||||
                      closable
 | 
					 | 
				
			||||||
                      class="elTag"
 | 
					 | 
				
			||||||
                      v-show="item.checked"
 | 
					 | 
				
			||||||
                      :disable-transitions="false"
 | 
					 | 
				
			||||||
                      @close="handleClose(item.pkId)">
 | 
					 | 
				
			||||||
                {{item.typeName}}
 | 
					 | 
				
			||||||
              </el-tag>
 | 
					 | 
				
			||||||
              <el-button class="button-new-tag"
 | 
					 | 
				
			||||||
                         size="small"
 | 
					 | 
				
			||||||
                         @click="openDiag=true">{{'添加'}}</el-button>
 | 
					 | 
				
			||||||
            </el-form-item>
 | 
					 | 
				
			||||||
          </div>
 | 
					 | 
				
			||||||
          <!-- <div v-show="tabActive==2">
 | 
					 | 
				
			||||||
            <el-row :gutter="40">
 | 
					 | 
				
			||||||
              <el-col class="el-col-20">
 | 
					 | 
				
			||||||
                <el-form-item :label="'抽奖礼品'"
 | 
					 | 
				
			||||||
                              prop="isPrize">
 | 
					 | 
				
			||||||
                  <el-select clearable
 | 
					 | 
				
			||||||
                             v-model="form.isPrize">
 | 
					 | 
				
			||||||
                    <el-option v-for="item in agreeList"
 | 
					 | 
				
			||||||
                               :key="item.val"
 | 
					 | 
				
			||||||
                               :label="item.text"
 | 
					 | 
				
			||||||
                               :value="item.val"></el-option>
 | 
					 | 
				
			||||||
                  </el-select>
 | 
					 | 
				
			||||||
                </el-form-item>
 | 
					 | 
				
			||||||
              </el-col>
 | 
					 | 
				
			||||||
              <el-col class="el-col-20">
 | 
					 | 
				
			||||||
                <el-form-item :label="'特惠礼品'"
 | 
					 | 
				
			||||||
                              prop="isGift">
 | 
					 | 
				
			||||||
                  <el-select clearable
 | 
					 | 
				
			||||||
                             v-model="form.isGift">
 | 
					 | 
				
			||||||
                    <el-option v-for="item in agreeList"
 | 
					 | 
				
			||||||
                               :key="item.val"
 | 
					 | 
				
			||||||
                               :label="item.text"
 | 
					 | 
				
			||||||
                               :value="item.val"></el-option>
 | 
					 | 
				
			||||||
                  </el-select>
 | 
					 | 
				
			||||||
                </el-form-item>
 | 
					 | 
				
			||||||
              </el-col>
 | 
					 | 
				
			||||||
              <el-col class="el-col-20">
 | 
					 | 
				
			||||||
                <el-form-item :label="'提货商品'"
 | 
					 | 
				
			||||||
                              prop="isPickUp">
 | 
					 | 
				
			||||||
                  <el-select clearable
 | 
					 | 
				
			||||||
                             v-model="form.isPickUp">
 | 
					 | 
				
			||||||
                    <el-option v-for="item in agreeList"
 | 
					 | 
				
			||||||
                               :key="item.val"
 | 
					 | 
				
			||||||
                               :label="item.text"
 | 
					 | 
				
			||||||
                               :value="item.val"></el-option>
 | 
					 | 
				
			||||||
                  </el-select>
 | 
					 | 
				
			||||||
                </el-form-item>
 | 
					 | 
				
			||||||
              </el-col>
 | 
					 | 
				
			||||||
              <el-col class="el-col-20">
 | 
					 | 
				
			||||||
                <el-form-item :label="'合并发货'"
 | 
					 | 
				
			||||||
                              prop="isMerge">
 | 
					 | 
				
			||||||
                  <el-select clearable
 | 
					 | 
				
			||||||
                             v-model="form.isMerge">
 | 
					 | 
				
			||||||
                    <el-option v-for="item in agreeList"
 | 
					 | 
				
			||||||
                               :key="item.val"
 | 
					 | 
				
			||||||
                               :label="item.text"
 | 
					 | 
				
			||||||
                               :value="item.val"></el-option>
 | 
					 | 
				
			||||||
                  </el-select>
 | 
					 | 
				
			||||||
                </el-form-item>
 | 
					 | 
				
			||||||
              </el-col>
 | 
					 | 
				
			||||||
              <el-col class="el-col-20">
 | 
					 | 
				
			||||||
                <el-form-item :label="'冷链运输'"
 | 
					 | 
				
			||||||
                              prop="isFresh">
 | 
					 | 
				
			||||||
                  <el-select clearable
 | 
					 | 
				
			||||||
                             v-model="form.isFresh">
 | 
					 | 
				
			||||||
                    <el-option v-for="item in agreeList"
 | 
					 | 
				
			||||||
                               :key="item.val"
 | 
					 | 
				
			||||||
                               :label="item.text"
 | 
					 | 
				
			||||||
                               :value="item.val"></el-option>
 | 
					 | 
				
			||||||
                  </el-select>
 | 
					 | 
				
			||||||
                </el-form-item>
 | 
					 | 
				
			||||||
              </el-col>
 | 
					 | 
				
			||||||
              <el-col class="el-col-20">
 | 
					 | 
				
			||||||
                <el-form-item :label="'追溯编号'"
 | 
					 | 
				
			||||||
                              prop="isBarCode">
 | 
					 | 
				
			||||||
                  <el-select clearable
 | 
					 | 
				
			||||||
                             v-model="form.isBarCode">
 | 
					 | 
				
			||||||
                    <el-option v-for="item in agreeList"
 | 
					 | 
				
			||||||
                               :key="item.val"
 | 
					 | 
				
			||||||
                               :label="item.text"
 | 
					 | 
				
			||||||
                               :value="item.val"></el-option>
 | 
					 | 
				
			||||||
                  </el-select>
 | 
					 | 
				
			||||||
                </el-form-item>
 | 
					 | 
				
			||||||
              </el-col>
 | 
					 | 
				
			||||||
              <el-col class="el-col-20">
 | 
					 | 
				
			||||||
                <el-form-item :label="'运输方式'"
 | 
					 | 
				
			||||||
                              prop="ysList">
 | 
					 | 
				
			||||||
                  <el-checkbox-group v-model="form.ysList"
 | 
					 | 
				
			||||||
                                     @change="changeYsfs">
 | 
					 | 
				
			||||||
                    <el-checkbox v-for="item,index in transportTypeList"
 | 
					 | 
				
			||||||
                                 :key="item.value"
 | 
					 | 
				
			||||||
                                 :label="item.value">{{item.label}}</el-checkbox>
 | 
					 | 
				
			||||||
                  </el-checkbox-group>
 | 
					 | 
				
			||||||
                </el-form-item>
 | 
					 | 
				
			||||||
              </el-col>
 | 
					 | 
				
			||||||
            </el-row>
 | 
					 | 
				
			||||||
          </div> -->
 | 
					 | 
				
			||||||
        </el-form>
 | 
					 | 
				
			||||||
      </div>
 | 
					 | 
				
			||||||
      <div class="footer">
 | 
					 | 
				
			||||||
        <el-button size="small"
 | 
					 | 
				
			||||||
                   class="cancelBtn"> {{ '取消' }}</el-button>
 | 
					 | 
				
			||||||
        <el-button size="small"
 | 
					 | 
				
			||||||
                   v-hasButtons="['productBasicAddSure']"
 | 
					 | 
				
			||||||
                   @click="submit('form')"
 | 
					 | 
				
			||||||
                   style="background: #c8161d;border: none;"
 | 
					 | 
				
			||||||
                   class="sureBtn"> {{ '确认' }}</el-button>
 | 
					 | 
				
			||||||
      </div>
 | 
					 | 
				
			||||||
    </div>
 | 
					 | 
				
			||||||
    <el-dialog :title="'添加'"
 | 
					 | 
				
			||||||
               :visible.sync="openDiag"
 | 
					 | 
				
			||||||
               :close-on-click-modal="false"
 | 
					 | 
				
			||||||
               width="30%"
 | 
					 | 
				
			||||||
               center>
 | 
					 | 
				
			||||||
      <div class="addCheck">
 | 
					 | 
				
			||||||
        <el-checkbox-group v-model="form.checkList"
 | 
					 | 
				
			||||||
                           class="check">
 | 
					 | 
				
			||||||
          <el-checkbox v-for="item,index in ggList"
 | 
					 | 
				
			||||||
                       class="check_i"
 | 
					 | 
				
			||||||
                       :key="item.pkId"
 | 
					 | 
				
			||||||
                       :label="item.pkId">{{item.typeName}}</el-checkbox>
 | 
					 | 
				
			||||||
        </el-checkbox-group>
 | 
					 | 
				
			||||||
      </div>
 | 
					 | 
				
			||||||
      <span slot="footer"
 | 
					 | 
				
			||||||
            class="dialog-footer">
 | 
					 | 
				
			||||||
        <el-button @click="openDiag = false">{{'取消'}}</el-button>
 | 
					 | 
				
			||||||
        <el-button type="primary"
 | 
					 | 
				
			||||||
                   @click="checkTrue">{{'确认'}}</el-button>
 | 
					 | 
				
			||||||
      </span>
 | 
					 | 
				
			||||||
    </el-dialog>
 | 
					 | 
				
			||||||
  </div>
 | 
					 | 
				
			||||||
</template>
 | 
					 | 
				
			||||||
<script>
 | 
					 | 
				
			||||||
import { getToken } from '@/utils/auth'
 | 
					 | 
				
			||||||
import * as api from '@/api/product.js'
 | 
					 | 
				
			||||||
import ImageUpload from '@/components/ImageUpload'
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
export default {
 | 
					 | 
				
			||||||
  name: 'jcsz',
 | 
					 | 
				
			||||||
  components: {
 | 
					 | 
				
			||||||
    ImageUpload,
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  data() {
 | 
					 | 
				
			||||||
    return {
 | 
					 | 
				
			||||||
      rules: {
 | 
					 | 
				
			||||||
        shippingChannel: [
 | 
					 | 
				
			||||||
          { required: true, message: '请输入发货类型', trigger: 'change' },
 | 
					 | 
				
			||||||
        ],
 | 
					 | 
				
			||||||
        unit: [{ required: true, message: '请选择单位', trigger: 'change' }],
 | 
					 | 
				
			||||||
        productName: [
 | 
					 | 
				
			||||||
          { required: true, message: '请输入产品名称', trigger: 'blur' },
 | 
					 | 
				
			||||||
        ],
 | 
					 | 
				
			||||||
        retailPrice: [
 | 
					 | 
				
			||||||
          { required: true, message: '请输入划线价', trigger: 'blur' },
 | 
					 | 
				
			||||||
        ],
 | 
					 | 
				
			||||||
        shelfLife: [
 | 
					 | 
				
			||||||
          { required: true, message: '请输入保质期', trigger: 'blur' },
 | 
					 | 
				
			||||||
        ],
 | 
					 | 
				
			||||||
        weight: [{ required: true, message: '请输入重量', trigger: 'blur' }],
 | 
					 | 
				
			||||||
        productCode: [
 | 
					 | 
				
			||||||
          { required: true, message: '请输入产品编号', trigger: 'blur' },
 | 
					 | 
				
			||||||
        ],
 | 
					 | 
				
			||||||
        postageWeight: [
 | 
					 | 
				
			||||||
          { required: true, message: '请输入邮费重量', trigger: 'blur' },
 | 
					 | 
				
			||||||
        ],
 | 
					 | 
				
			||||||
        productAttr: [
 | 
					 | 
				
			||||||
          { required: true, message: '请选择产品属性', trigger: 'change' },
 | 
					 | 
				
			||||||
        ],
 | 
					 | 
				
			||||||
        pkClassify: [
 | 
					 | 
				
			||||||
          { required: true, message: '请选择所属分类', trigger: 'change' },
 | 
					 | 
				
			||||||
        ],
 | 
					 | 
				
			||||||
        sort: [{ required: true, message: '请输入排列序号', trigger: 'blur' }],
 | 
					 | 
				
			||||||
        length: [{ required: true, message: '请输入长', trigger: 'blur' }],
 | 
					 | 
				
			||||||
        width: [{ required: true, message: '请输入宽', trigger: 'blur' }],
 | 
					 | 
				
			||||||
        height: [{ required: true, message: '请输入高', trigger: 'blur' }],
 | 
					 | 
				
			||||||
        cover: [
 | 
					 | 
				
			||||||
          { required: true, message: '请上传产品主图', trigger: 'change' },
 | 
					 | 
				
			||||||
        ],
 | 
					 | 
				
			||||||
        pkSpecsType: [
 | 
					 | 
				
			||||||
          { required: true, message: '请选择规格', trigger: 'change' },
 | 
					 | 
				
			||||||
        ],
 | 
					 | 
				
			||||||
        isPrize: [
 | 
					 | 
				
			||||||
          { required: true, message: '抽奖礼品', trigger: 'change' },
 | 
					 | 
				
			||||||
        ],
 | 
					 | 
				
			||||||
        isGift: [
 | 
					 | 
				
			||||||
          { required: true, message: '请选择特惠礼品', trigger: 'change' },
 | 
					 | 
				
			||||||
        ],
 | 
					 | 
				
			||||||
        isPickUp: [
 | 
					 | 
				
			||||||
          { required: true, message: '请选择提货商品', trigger: 'change' },
 | 
					 | 
				
			||||||
        ],
 | 
					 | 
				
			||||||
        isMerge: [
 | 
					 | 
				
			||||||
          { required: true, message: '请选择合并发货', trigger: 'change' },
 | 
					 | 
				
			||||||
        ],
 | 
					 | 
				
			||||||
        isFresh: [
 | 
					 | 
				
			||||||
          { required: true, message: '请选择冷链运输', trigger: 'change' },
 | 
					 | 
				
			||||||
        ],
 | 
					 | 
				
			||||||
        isBarCode: [
 | 
					 | 
				
			||||||
          { required: true, message: '请选择条码管理', trigger: 'change' },
 | 
					 | 
				
			||||||
        ],
 | 
					 | 
				
			||||||
        ysList: [
 | 
					 | 
				
			||||||
          { required: true, message: '请选择运输方式', trigger: 'change' },
 | 
					 | 
				
			||||||
        ],
 | 
					 | 
				
			||||||
      },
 | 
					 | 
				
			||||||
      ggList: [],
 | 
					 | 
				
			||||||
      // 规格名称弹框
 | 
					 | 
				
			||||||
      openDiag: false,
 | 
					 | 
				
			||||||
      showImg: true, //默认展示
 | 
					 | 
				
			||||||
      noneUploadImg: false, //
 | 
					 | 
				
			||||||
      uploadImgUrl: process.env.VUE_APP_BASE_API + '/system/upload',
 | 
					 | 
				
			||||||
      headers: {
 | 
					 | 
				
			||||||
        Authorization: getToken(),
 | 
					 | 
				
			||||||
      },
 | 
					 | 
				
			||||||
      form: {
 | 
					 | 
				
			||||||
        productCode: '',
 | 
					 | 
				
			||||||
        sptw: '',
 | 
					 | 
				
			||||||
        checkList: [],
 | 
					 | 
				
			||||||
        ysList: [],
 | 
					 | 
				
			||||||
        sort: '',
 | 
					 | 
				
			||||||
        postageWeight: '',
 | 
					 | 
				
			||||||
        height: '',
 | 
					 | 
				
			||||||
        width: '',
 | 
					 | 
				
			||||||
        length: '',
 | 
					 | 
				
			||||||
        weight: '',
 | 
					 | 
				
			||||||
        shelfLife: '',
 | 
					 | 
				
			||||||
        retailPrice: '',
 | 
					 | 
				
			||||||
      },
 | 
					 | 
				
			||||||
      tabActive: 0,
 | 
					 | 
				
			||||||
      agreeList: [
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
          text: '允许',
 | 
					 | 
				
			||||||
          val: 0,
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
          text: '禁止',
 | 
					 | 
				
			||||||
          val: 1,
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
      ],
 | 
					 | 
				
			||||||
      topList: [
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
          name: '基础设置',
 | 
					 | 
				
			||||||
          id: 0,
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
          name: '规格明细',
 | 
					 | 
				
			||||||
          id: 1,
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
        // {
 | 
					 | 
				
			||||||
        //   name: '拓展设置',
 | 
					 | 
				
			||||||
        //   id: 2,
 | 
					 | 
				
			||||||
        // },
 | 
					 | 
				
			||||||
      ],
 | 
					 | 
				
			||||||
      productTypeList: [],
 | 
					 | 
				
			||||||
      fhTypeList: [],
 | 
					 | 
				
			||||||
      dwList: [],
 | 
					 | 
				
			||||||
      classifyList: [],
 | 
					 | 
				
			||||||
      transportTypeList: [],
 | 
					 | 
				
			||||||
      repurchaseTypeList: [],
 | 
					 | 
				
			||||||
      productList: [],
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  mounted() {
 | 
					 | 
				
			||||||
    // 获取规格list
 | 
					 | 
				
			||||||
    this.getGg()
 | 
					 | 
				
			||||||
    // // // 产品属性枚举
 | 
					 | 
				
			||||||
    // this.getProductType()
 | 
					 | 
				
			||||||
    // // 发货类型
 | 
					 | 
				
			||||||
    // this.getShipping()
 | 
					 | 
				
			||||||
    // // 单位
 | 
					 | 
				
			||||||
    this.getUnit()
 | 
					 | 
				
			||||||
    // 复购类型
 | 
					 | 
				
			||||||
    // this.getRepurchaseType()
 | 
					 | 
				
			||||||
    // 所属分类
 | 
					 | 
				
			||||||
    this.getClassifyAll()
 | 
					 | 
				
			||||||
    // 运输方式
 | 
					 | 
				
			||||||
    this.getTransportType()
 | 
					 | 
				
			||||||
    // 获取产品编号
 | 
					 | 
				
			||||||
    this.getProductCode()
 | 
					 | 
				
			||||||
    // 获取排序
 | 
					 | 
				
			||||||
    this.getSort()
 | 
					 | 
				
			||||||
    // // 获取产品
 | 
					 | 
				
			||||||
    // this.getProduct()
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  methods: {
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    // getProduct() {
 | 
					 | 
				
			||||||
    //   api.productFind().then((res) => {
 | 
					 | 
				
			||||||
    //     this.productList = res.data
 | 
					 | 
				
			||||||
    //   })
 | 
					 | 
				
			||||||
    // },
 | 
					 | 
				
			||||||
    // getRepurchaseType() {
 | 
					 | 
				
			||||||
    //   api.repurchaseType().then((res) => {
 | 
					 | 
				
			||||||
    //     this.repurchaseTypeList = res.data
 | 
					 | 
				
			||||||
    //   })
 | 
					 | 
				
			||||||
    // },
 | 
					 | 
				
			||||||
    getSort() {
 | 
					 | 
				
			||||||
      api.getMaxSort().then((res) => {
 | 
					 | 
				
			||||||
        this.form.sort = res.data
 | 
					 | 
				
			||||||
      })
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    getProductCode() {
 | 
					 | 
				
			||||||
      api.getProductCode().then((res) => {
 | 
					 | 
				
			||||||
        this.form.productCode = res.msg
 | 
					 | 
				
			||||||
      })
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    // 运输方式单独三个字段
 | 
					 | 
				
			||||||
    changeYsfs(val) {
 | 
					 | 
				
			||||||
      // 有陆运
 | 
					 | 
				
			||||||
      if (val.indexOf(1) > -1) {
 | 
					 | 
				
			||||||
        this.form.isLandTrans = 0
 | 
					 | 
				
			||||||
      } else {
 | 
					 | 
				
			||||||
        this.form.isLandTrans = 1
 | 
					 | 
				
			||||||
      }
 | 
					 | 
				
			||||||
      // 有空运
 | 
					 | 
				
			||||||
      if (val.indexOf(2) > -1) {
 | 
					 | 
				
			||||||
        this.form.isAirTrans = 0
 | 
					 | 
				
			||||||
      } else {
 | 
					 | 
				
			||||||
        this.form.isAirTrans = 1
 | 
					 | 
				
			||||||
      }
 | 
					 | 
				
			||||||
      // 海运
 | 
					 | 
				
			||||||
      if (val.indexOf(3) > -1) {
 | 
					 | 
				
			||||||
        this.form.isOceanTrans = 0
 | 
					 | 
				
			||||||
      } else {
 | 
					 | 
				
			||||||
        this.form.isOceanTrans = 1
 | 
					 | 
				
			||||||
      }
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    // 运输方式
 | 
					 | 
				
			||||||
    getTransportType() {
 | 
					 | 
				
			||||||
      api.transportType().then((res) => {
 | 
					 | 
				
			||||||
        this.transportTypeList = res.data
 | 
					 | 
				
			||||||
      })
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    // 所属分类
 | 
					 | 
				
			||||||
    getClassifyAll() {
 | 
					 | 
				
			||||||
      api.classifyAll().then((res) => {
 | 
					 | 
				
			||||||
        this.classifyList = res.data
 | 
					 | 
				
			||||||
      })
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    // 选完规格
 | 
					 | 
				
			||||||
    checkTrue() {
 | 
					 | 
				
			||||||
      this.ggList.forEach((item) => {
 | 
					 | 
				
			||||||
        item.checked = false
 | 
					 | 
				
			||||||
      })
 | 
					 | 
				
			||||||
      this.ggList.forEach((item) => {
 | 
					 | 
				
			||||||
        this.form.checkList.forEach((child) => {
 | 
					 | 
				
			||||||
          if (item.pkId == child) {
 | 
					 | 
				
			||||||
            item.checked = true
 | 
					 | 
				
			||||||
          }
 | 
					 | 
				
			||||||
        })
 | 
					 | 
				
			||||||
      })
 | 
					 | 
				
			||||||
      this.openDiag = false
 | 
					 | 
				
			||||||
      this.form.pkSpecsType = this.form.checkList
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    // 获取规格
 | 
					 | 
				
			||||||
    getGg() {
 | 
					 | 
				
			||||||
      api.findAll().then((res) => {
 | 
					 | 
				
			||||||
        res.data.forEach((item) => {
 | 
					 | 
				
			||||||
          item.checked = false
 | 
					 | 
				
			||||||
        })
 | 
					 | 
				
			||||||
        this.ggList = res.data
 | 
					 | 
				
			||||||
      })
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    // // 产品属性枚举
 | 
					 | 
				
			||||||
    // getProductType() {
 | 
					 | 
				
			||||||
    //   api.productType().then((res) => {
 | 
					 | 
				
			||||||
    //     this.productTypeList = res.data
 | 
					 | 
				
			||||||
    //   })
 | 
					 | 
				
			||||||
    // },
 | 
					 | 
				
			||||||
    // // 发货类型
 | 
					 | 
				
			||||||
    // getShipping() {
 | 
					 | 
				
			||||||
    //   api.getShipping().then((res) => {
 | 
					 | 
				
			||||||
    //     this.fhTypeList = res.data
 | 
					 | 
				
			||||||
    //   })
 | 
					 | 
				
			||||||
    // },
 | 
					 | 
				
			||||||
    // // 单位
 | 
					 | 
				
			||||||
    getUnit() {
 | 
					 | 
				
			||||||
      api.unitAll().then((res) => {
 | 
					 | 
				
			||||||
        this.dwList = res.data
 | 
					 | 
				
			||||||
      })
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    // 移除规格
 | 
					 | 
				
			||||||
    handleClose(pkId) {
 | 
					 | 
				
			||||||
      // 引藏全规格中选中字段
 | 
					 | 
				
			||||||
      this.ggList.forEach((item) => {
 | 
					 | 
				
			||||||
        if (item.pkId == pkId) {
 | 
					 | 
				
			||||||
          item.checked = false
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
      })
 | 
					 | 
				
			||||||
      // 移除表单选中
 | 
					 | 
				
			||||||
      this.form.checkList.splice(this.form.checkList.indexOf(pkId), 1)
 | 
					 | 
				
			||||||
      this.$forceUpdate()
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    submit(form) {
 | 
					 | 
				
			||||||
      this.$refs[form].validate((valid) => {
 | 
					 | 
				
			||||||
        if (valid) {
 | 
					 | 
				
			||||||
          api.productSaveJxc(this.form).then((res) => {
 | 
					 | 
				
			||||||
            if (res.code == 200) {
 | 
					 | 
				
			||||||
              this.$message({
 | 
					 | 
				
			||||||
                message: '添加成功',
 | 
					 | 
				
			||||||
                type: 'success',
 | 
					 | 
				
			||||||
              })
 | 
					 | 
				
			||||||
              this.$router.replace({
 | 
					 | 
				
			||||||
                path: 'productBasicList',
 | 
					 | 
				
			||||||
              })
 | 
					 | 
				
			||||||
            } else {
 | 
					 | 
				
			||||||
              this.$message({
 | 
					 | 
				
			||||||
                message: res.msg,
 | 
					 | 
				
			||||||
                type: 'warning',
 | 
					 | 
				
			||||||
                duration: 3000,
 | 
					 | 
				
			||||||
              })
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
          })
 | 
					 | 
				
			||||||
        } else {
 | 
					 | 
				
			||||||
          return false
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
      })
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    // 切换tab
 | 
					 | 
				
			||||||
    handleLink(id) {
 | 
					 | 
				
			||||||
      this.tabActive = id
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    // uploadImgChange(file, fileList) {
 | 
					 | 
				
			||||||
    //   this.noneUploadImg = fileList.length > 0
 | 
					 | 
				
			||||||
    //   this.$refs.form.clearValidate('cover')
 | 
					 | 
				
			||||||
    // },
 | 
					 | 
				
			||||||
    //图片上传成功后的回调
 | 
					 | 
				
			||||||
    // handlePictureSuccess(res, file) {
 | 
					 | 
				
			||||||
    //   this.form.cover = res.data.url
 | 
					 | 
				
			||||||
    // },
 | 
					 | 
				
			||||||
    //图片上传删除
 | 
					 | 
				
			||||||
    // handleRemove(file, fileList) {
 | 
					 | 
				
			||||||
    //   this.form.cover = ''
 | 
					 | 
				
			||||||
    //   this.noneUploadImg = fileList.length > 0
 | 
					 | 
				
			||||||
    // },
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
</script>
 | 
					 | 
				
			||||||
<style scoped lang="scss">
 | 
					 | 
				
			||||||
::v-deep .el-select {
 | 
					 | 
				
			||||||
  width: 100%;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
.uploadIcon ::v-deep .el-upload--picture-card {
 | 
					 | 
				
			||||||
  display: none !important; /* 上传按钮隐藏 */
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
.el-col-20 {
 | 
					 | 
				
			||||||
  width: 20%;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
.el-col-60 {
 | 
					 | 
				
			||||||
  width: 60%;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
.el-col-40 {
 | 
					 | 
				
			||||||
  width: 40%;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
.page {
 | 
					 | 
				
			||||||
  padding-top: 20px;
 | 
					 | 
				
			||||||
  background: #f9f9f9;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
.topbox {
 | 
					 | 
				
			||||||
  align-items: center;
 | 
					 | 
				
			||||||
  padding: 0px 0 0px 0;
 | 
					 | 
				
			||||||
  display: flex;
 | 
					 | 
				
			||||||
  //   background: skyblue;
 | 
					 | 
				
			||||||
  .levelList_i {
 | 
					 | 
				
			||||||
    margin-left: 20px;
 | 
					 | 
				
			||||||
    position: relative;
 | 
					 | 
				
			||||||
    cursor: pointer;
 | 
					 | 
				
			||||||
    // padding: 0 5px;
 | 
					 | 
				
			||||||
    // width: 88px;
 | 
					 | 
				
			||||||
    // height: 34px;
 | 
					 | 
				
			||||||
    border-radius: 17px;
 | 
					 | 
				
			||||||
    border: 1px solid #cccccc;
 | 
					 | 
				
			||||||
    font-size: 12px;
 | 
					 | 
				
			||||||
    font-family: MicrosoftYaHei;
 | 
					 | 
				
			||||||
    text-align: center;
 | 
					 | 
				
			||||||
    padding: 4px 15px;
 | 
					 | 
				
			||||||
    // line-height: 32px;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
  .act {
 | 
					 | 
				
			||||||
    color: #ffffff;
 | 
					 | 
				
			||||||
    background: #c8161d;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
  .act1 {
 | 
					 | 
				
			||||||
    border-bottom: 3px solid #1890ff !important;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
  .cha {
 | 
					 | 
				
			||||||
    font-size: 16px;
 | 
					 | 
				
			||||||
    color: #606266;
 | 
					 | 
				
			||||||
    position: absolute;
 | 
					 | 
				
			||||||
    top: 10px;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
  .li {
 | 
					 | 
				
			||||||
    width: 40px;
 | 
					 | 
				
			||||||
    margin: 0 auto;
 | 
					 | 
				
			||||||
    border-bottom: 3px solid transparent;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
.page {
 | 
					 | 
				
			||||||
  height: calc(100vh - 50px);
 | 
					 | 
				
			||||||
  overflow: hidden;
 | 
					 | 
				
			||||||
  background: #f9f9f9;
 | 
					 | 
				
			||||||
  padding-top: 20px;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
.main {
 | 
					 | 
				
			||||||
  display: flex;
 | 
					 | 
				
			||||||
  flex-direction: column;
 | 
					 | 
				
			||||||
  height: calc(100vh - 124px);
 | 
					 | 
				
			||||||
  overflow: hidden;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
.contain {
 | 
					 | 
				
			||||||
  background: #ffffff;
 | 
					 | 
				
			||||||
  border-radius: 8px;
 | 
					 | 
				
			||||||
  box-shadow: 0px 2px 20px 0px rgba(238, 238, 238, 0.5);
 | 
					 | 
				
			||||||
  // margin: 10px 20px 0 20px;
 | 
					 | 
				
			||||||
  flex: 1;
 | 
					 | 
				
			||||||
  padding: 10px;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
.footer {
 | 
					 | 
				
			||||||
  height: 68px;
 | 
					 | 
				
			||||||
  background: #ffffff;
 | 
					 | 
				
			||||||
  box-shadow: 0px -3px 20px 0px rgba(204, 204, 204, 0.5);
 | 
					 | 
				
			||||||
  margin: 0 0px;
 | 
					 | 
				
			||||||
  display: flex;
 | 
					 | 
				
			||||||
  justify-content: center;
 | 
					 | 
				
			||||||
  align-items: center;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
.thebtn1 {
 | 
					 | 
				
			||||||
  background: #48b2fd;
 | 
					 | 
				
			||||||
  color: #ffffff;
 | 
					 | 
				
			||||||
  padding: 9px 45px;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
.thebtn2 {
 | 
					 | 
				
			||||||
  background: #f9f9f9;
 | 
					 | 
				
			||||||
  color: #333;
 | 
					 | 
				
			||||||
  padding: 9px 45px;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
.neibu {
 | 
					 | 
				
			||||||
  margin-right: 10px;
 | 
					 | 
				
			||||||
  color: #666666;
 | 
					 | 
				
			||||||
  font-style: normal;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
.elTag {
 | 
					 | 
				
			||||||
  margin-right: 10px;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
.check {
 | 
					 | 
				
			||||||
  display: flex;
 | 
					 | 
				
			||||||
  flex-wrap: wrap;
 | 
					 | 
				
			||||||
  text-align: center;
 | 
					 | 
				
			||||||
  // justify-content: center;
 | 
					 | 
				
			||||||
  .check_i {
 | 
					 | 
				
			||||||
    width: 50%;
 | 
					 | 
				
			||||||
    text-align: left;
 | 
					 | 
				
			||||||
    margin-bottom: 10px;
 | 
					 | 
				
			||||||
    margin-right: 0 !important;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
.jy {
 | 
					 | 
				
			||||||
  font-size: 10px;
 | 
					 | 
				
			||||||
  font-family: PingFang SC-Regular, PingFang SC;
 | 
					 | 
				
			||||||
  font-weight: 400;
 | 
					 | 
				
			||||||
  color: #999999;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
.addCheck {
 | 
					 | 
				
			||||||
  padding-left: 20px;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
::v-deep .el-dialog__body {
 | 
					 | 
				
			||||||
  border-top: 1px solid #eee;
 | 
					 | 
				
			||||||
  border-bottom: 1px solid #eee;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
::v-deep .el-form-item {
 | 
					 | 
				
			||||||
  margin-bottom: 15px;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
</style>
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,805 +0,0 @@
 | 
				
			||||||
<!--
 | 
					 | 
				
			||||||
 * @Descripttion:
 | 
					 | 
				
			||||||
 * @version:
 | 
					 | 
				
			||||||
 * @Author: kBank
 | 
					 | 
				
			||||||
 * @Date: 2022-10-31 13:55:20
 | 
					 | 
				
			||||||
-->
 | 
					 | 
				
			||||||
<template>
 | 
					 | 
				
			||||||
  <div class="page">
 | 
					 | 
				
			||||||
    <div class="topbox">
 | 
					 | 
				
			||||||
      <div class="levelList_i"
 | 
					 | 
				
			||||||
           :class="tabActive == item.id ? 'act' : ''"
 | 
					 | 
				
			||||||
           v-for="(item, index) in topList"
 | 
					 | 
				
			||||||
           :key="index"
 | 
					 | 
				
			||||||
           @click.prevent="handleLink(item.id)">
 | 
					 | 
				
			||||||
        {{ item.name }}
 | 
					 | 
				
			||||||
      </div>
 | 
					 | 
				
			||||||
    </div>
 | 
					 | 
				
			||||||
    <div class="main">
 | 
					 | 
				
			||||||
      <div class="contain">
 | 
					 | 
				
			||||||
        <el-form ref="form"
 | 
					 | 
				
			||||||
                 :rules="rules"
 | 
					 | 
				
			||||||
                 :model="form"
 | 
					 | 
				
			||||||
                 label-width="80px">
 | 
					 | 
				
			||||||
          <div v-show="tabActive==0">
 | 
					 | 
				
			||||||
            <el-col class="el-col-40">
 | 
					 | 
				
			||||||
              <el-form-item :label="'产品名称'"
 | 
					 | 
				
			||||||
                            prop="productName">
 | 
					 | 
				
			||||||
                <el-input clearable
 | 
					 | 
				
			||||||
                          v-model="form.productName"
 | 
					 | 
				
			||||||
                          :disabled="methods"
 | 
					 | 
				
			||||||
                          :placeholder="'请输入'"></el-input>
 | 
					 | 
				
			||||||
              </el-form-item>
 | 
					 | 
				
			||||||
            </el-col>
 | 
					 | 
				
			||||||
            <el-col class="el-col-20">
 | 
					 | 
				
			||||||
              <el-form-item :label="'产品编号'"
 | 
					 | 
				
			||||||
                            prop="productCode">
 | 
					 | 
				
			||||||
                <el-input clearable
 | 
					 | 
				
			||||||
                          v-model="form.productCode"
 | 
					 | 
				
			||||||
                          disabled
 | 
					 | 
				
			||||||
                          :placeholder="'请输入'"></el-input>
 | 
					 | 
				
			||||||
              </el-form-item>
 | 
					 | 
				
			||||||
            </el-col>
 | 
					 | 
				
			||||||
            <!-- <el-col class="el-col-20">
 | 
					 | 
				
			||||||
              <el-form-item :label="'划线价'"
 | 
					 | 
				
			||||||
                            prop="retailPrice">
 | 
					 | 
				
			||||||
                <el-input clearable
 | 
					 | 
				
			||||||
                          v-model="form.retailPrice"
 | 
					 | 
				
			||||||
                          :disabled="methods"
 | 
					 | 
				
			||||||
                          :placeholder="'请输入'"></el-input>
 | 
					 | 
				
			||||||
              </el-form-item>
 | 
					 | 
				
			||||||
            </el-col> -->
 | 
					 | 
				
			||||||
            <!-- <el-col class="el-col-20">
 | 
					 | 
				
			||||||
              <el-form-item :label="'发货类型'"
 | 
					 | 
				
			||||||
                            prop="shippingChannel">
 | 
					 | 
				
			||||||
                <el-select clearable
 | 
					 | 
				
			||||||
                           v-model="form.shippingChannel"
 | 
					 | 
				
			||||||
                           :disabled="methods">
 | 
					 | 
				
			||||||
                  <el-option v-for="item in fhTypeList"
 | 
					 | 
				
			||||||
                             :key="item.value"
 | 
					 | 
				
			||||||
                             :label="item.label"
 | 
					 | 
				
			||||||
                             :value="item.value"></el-option>
 | 
					 | 
				
			||||||
                </el-select>
 | 
					 | 
				
			||||||
              </el-form-item>
 | 
					 | 
				
			||||||
            </el-col> -->
 | 
					 | 
				
			||||||
            <el-col class="el-col-20">
 | 
					 | 
				
			||||||
              <el-form-item label="保质期"
 | 
					 | 
				
			||||||
                            prop="shelfLife">
 | 
					 | 
				
			||||||
                <el-input clearable
 | 
					 | 
				
			||||||
                          oninput="value=value.replace(/[^\d]/g,'')"
 | 
					 | 
				
			||||||
                          v-model="form.shelfLife"
 | 
					 | 
				
			||||||
                          :disabled="methods"
 | 
					 | 
				
			||||||
                          :placeholder="'请输入'">
 | 
					 | 
				
			||||||
                  <i slot="suffix"
 | 
					 | 
				
			||||||
                     class="neibu">{{'天'}} </i>
 | 
					 | 
				
			||||||
                </el-input>
 | 
					 | 
				
			||||||
              </el-form-item>
 | 
					 | 
				
			||||||
            </el-col>
 | 
					 | 
				
			||||||
            <el-col class="el-col-20">
 | 
					 | 
				
			||||||
              <el-form-item :label=''单位''
 | 
					 | 
				
			||||||
                            prop="unit">
 | 
					 | 
				
			||||||
                <el-select clearable
 | 
					 | 
				
			||||||
                           v-model="form.unit"
 | 
					 | 
				
			||||||
                           :disabled="methods">
 | 
					 | 
				
			||||||
                  <el-option v-for="item in dwList"
 | 
					 | 
				
			||||||
                             :key="item.pkId"
 | 
					 | 
				
			||||||
                             :label="item.name"
 | 
					 | 
				
			||||||
                             :value="item.pkId"></el-option>
 | 
					 | 
				
			||||||
                </el-select>
 | 
					 | 
				
			||||||
              </el-form-item>
 | 
					 | 
				
			||||||
            </el-col>
 | 
					 | 
				
			||||||
            <el-col class="el-col-20">
 | 
					 | 
				
			||||||
              <el-form-item :label="'重量'"
 | 
					 | 
				
			||||||
                            prop="weight">
 | 
					 | 
				
			||||||
                <el-input clearable
 | 
					 | 
				
			||||||
                          oninput="value=value.replace(/[^\d.]/g,'')"
 | 
					 | 
				
			||||||
                          v-model="form.weight"
 | 
					 | 
				
			||||||
                          :disabled="methods"
 | 
					 | 
				
			||||||
                          :placeholder="'请输入'">
 | 
					 | 
				
			||||||
                  <i slot="suffix"
 | 
					 | 
				
			||||||
                     class="neibu">KG </i>
 | 
					 | 
				
			||||||
                </el-input>
 | 
					 | 
				
			||||||
              </el-form-item>
 | 
					 | 
				
			||||||
            </el-col>
 | 
					 | 
				
			||||||
            <!-- <el-col class="el-col-20">
 | 
					 | 
				
			||||||
              <el-form-item :label="'邮费重量'"
 | 
					 | 
				
			||||||
                            prop="postageWeight">
 | 
					 | 
				
			||||||
                <el-input clearable
 | 
					 | 
				
			||||||
                          oninput="value=value.replace(/[^\d.]/g,'')"
 | 
					 | 
				
			||||||
                          v-model="form.postageWeight"
 | 
					 | 
				
			||||||
                          :disabled="methods"
 | 
					 | 
				
			||||||
                          :placeholder="'请输入'">
 | 
					 | 
				
			||||||
                  <i slot="suffix"
 | 
					 | 
				
			||||||
                     class="neibu">KG </i>
 | 
					 | 
				
			||||||
                </el-input>
 | 
					 | 
				
			||||||
              </el-form-item>
 | 
					 | 
				
			||||||
            </el-col> -->
 | 
					 | 
				
			||||||
            <!-- <el-col class="el-col-20">
 | 
					 | 
				
			||||||
              <el-form-item :label="'产品属性'"
 | 
					 | 
				
			||||||
                            prop="productAttr">
 | 
					 | 
				
			||||||
                <el-select clearable
 | 
					 | 
				
			||||||
                           v-model="form.productAttr"
 | 
					 | 
				
			||||||
                           :disabled="methods">
 | 
					 | 
				
			||||||
                  <el-option v-for="item in productTypeList"
 | 
					 | 
				
			||||||
                             :key="item.value"
 | 
					 | 
				
			||||||
                             :label="item.label"
 | 
					 | 
				
			||||||
                             :value="item.value"></el-option>
 | 
					 | 
				
			||||||
                </el-select>
 | 
					 | 
				
			||||||
              </el-form-item>
 | 
					 | 
				
			||||||
            </el-col> -->
 | 
					 | 
				
			||||||
            <el-col class="el-col-20">
 | 
					 | 
				
			||||||
              <el-form-item :label="'所属分类'"
 | 
					 | 
				
			||||||
                            prop="pkClassify">
 | 
					 | 
				
			||||||
                <el-select clearable
 | 
					 | 
				
			||||||
                           v-model="form.pkClassify"
 | 
					 | 
				
			||||||
                           :disabled="methods">
 | 
					 | 
				
			||||||
                  <el-option v-for="item in classifyList"
 | 
					 | 
				
			||||||
                             :key="item.pkId"
 | 
					 | 
				
			||||||
                             :label="item.name"
 | 
					 | 
				
			||||||
                             :value="item.pkId"></el-option>
 | 
					 | 
				
			||||||
                </el-select>
 | 
					 | 
				
			||||||
              </el-form-item>
 | 
					 | 
				
			||||||
            </el-col>
 | 
					 | 
				
			||||||
            <!-- <el-col class="el-col-20">
 | 
					 | 
				
			||||||
              <el-form-item :label="'排列序号'"
 | 
					 | 
				
			||||||
                            prop="sort">
 | 
					 | 
				
			||||||
                <el-input clearable
 | 
					 | 
				
			||||||
                          oninput="value = value.replace(/[^\d]/g,'')"
 | 
					 | 
				
			||||||
                          v-model="form.sort"
 | 
					 | 
				
			||||||
                          :disabled="methods"
 | 
					 | 
				
			||||||
                          :placeholder="'请输入'">
 | 
					 | 
				
			||||||
                </el-input>
 | 
					 | 
				
			||||||
              </el-form-item>
 | 
					 | 
				
			||||||
            </el-col>  -->
 | 
					 | 
				
			||||||
            <el-col class="el-col-20">
 | 
					 | 
				
			||||||
              <el-form-item :label="'长'"
 | 
					 | 
				
			||||||
                            prop="length">
 | 
					 | 
				
			||||||
                <el-input clearable
 | 
					 | 
				
			||||||
                          oninput="value=value.replace(/[^\d.]/g,'')"
 | 
					 | 
				
			||||||
                          v-model="form.length"
 | 
					 | 
				
			||||||
                          :disabled="methods"
 | 
					 | 
				
			||||||
                          :placeholder="'请输入'">
 | 
					 | 
				
			||||||
                  <i slot="suffix"
 | 
					 | 
				
			||||||
                     class="neibu">CM </i>
 | 
					 | 
				
			||||||
                </el-input>
 | 
					 | 
				
			||||||
              </el-form-item>
 | 
					 | 
				
			||||||
            </el-col>
 | 
					 | 
				
			||||||
            <el-col class="el-col-20">
 | 
					 | 
				
			||||||
              <el-form-item :label="'宽'"
 | 
					 | 
				
			||||||
                            prop="width">
 | 
					 | 
				
			||||||
                <el-input clearable
 | 
					 | 
				
			||||||
                          oninput="value=value.replace(/[^\d.]/g,'')"
 | 
					 | 
				
			||||||
                          v-model="form.width"
 | 
					 | 
				
			||||||
                          :disabled="methods"
 | 
					 | 
				
			||||||
                          :placeholder="'请输入'">
 | 
					 | 
				
			||||||
                  <i slot="suffix"
 | 
					 | 
				
			||||||
                     class="neibu">CM </i>
 | 
					 | 
				
			||||||
                </el-input>
 | 
					 | 
				
			||||||
              </el-form-item>
 | 
					 | 
				
			||||||
            </el-col>
 | 
					 | 
				
			||||||
            <el-col class="el-col-20">
 | 
					 | 
				
			||||||
              <el-form-item :label="'高'"
 | 
					 | 
				
			||||||
                            prop="height">
 | 
					 | 
				
			||||||
                <el-input clearable
 | 
					 | 
				
			||||||
                          oninput="value=value.replace(/[^\d.]/g,'')"
 | 
					 | 
				
			||||||
                          v-model="form.height"
 | 
					 | 
				
			||||||
                          :disabled="methods"
 | 
					 | 
				
			||||||
                          :placeholder="'请输入'">
 | 
					 | 
				
			||||||
                  <i slot="suffix"
 | 
					 | 
				
			||||||
                     class="neibu">CM </i>
 | 
					 | 
				
			||||||
                </el-input>
 | 
					 | 
				
			||||||
              </el-form-item>
 | 
					 | 
				
			||||||
            </el-col>
 | 
					 | 
				
			||||||
            <!-- <el-col class="el-col-20">
 | 
					 | 
				
			||||||
                <el-form-item :label="'复购类型'">
 | 
					 | 
				
			||||||
                  <el-select clearable  :disabled="methods"
 | 
					 | 
				
			||||||
                             v-model="form.repurchaseType">
 | 
					 | 
				
			||||||
                    <el-option v-for="item in repurchaseTypeList"
 | 
					 | 
				
			||||||
                               :key="item.value"
 | 
					 | 
				
			||||||
                               :label="item.label"
 | 
					 | 
				
			||||||
                               :value="item.value"></el-option>
 | 
					 | 
				
			||||||
                  </el-select>
 | 
					 | 
				
			||||||
                </el-form-item>
 | 
					 | 
				
			||||||
              </el-col> -->
 | 
					 | 
				
			||||||
            <el-col class="el-col-40">
 | 
					 | 
				
			||||||
              <el-form-item :label="'产品主图'"
 | 
					 | 
				
			||||||
                            prop="cover">
 | 
					 | 
				
			||||||
                <el-upload :headers="headers"
 | 
					 | 
				
			||||||
                           :disabled="methods"
 | 
					 | 
				
			||||||
                           :class="{ uploadIconOne: showImg, uploadIcon: noneUploadImg }"
 | 
					 | 
				
			||||||
                           :action="uploadImgUrl"
 | 
					 | 
				
			||||||
                           :file-list="form.coverList"
 | 
					 | 
				
			||||||
                           :on-success="handlePictureSuccess"
 | 
					 | 
				
			||||||
                           :on-change="uploadImgChange"
 | 
					 | 
				
			||||||
                           list-type="picture-card"
 | 
					 | 
				
			||||||
                           :limit="1"
 | 
					 | 
				
			||||||
                           :on-remove="handleRemove">
 | 
					 | 
				
			||||||
                  <i class="el-icon-plus"></i>
 | 
					 | 
				
			||||||
                </el-upload>
 | 
					 | 
				
			||||||
                <div class="jy">建议尺寸452×452,大小为200K</div>
 | 
					 | 
				
			||||||
              </el-form-item>
 | 
					 | 
				
			||||||
            </el-col>
 | 
					 | 
				
			||||||
          </div>
 | 
					 | 
				
			||||||
          <div v-show="tabActive==1">
 | 
					 | 
				
			||||||
            <el-form-item :label="'规格'"
 | 
					 | 
				
			||||||
                          prop="pkSpecsType">
 | 
					 | 
				
			||||||
              <el-tag :key="item.pkId"
 | 
					 | 
				
			||||||
                      v-for="item,index in ggList"
 | 
					 | 
				
			||||||
                      :closable="!methods"
 | 
					 | 
				
			||||||
                      class="elTag"
 | 
					 | 
				
			||||||
                      v-show="item.checked"
 | 
					 | 
				
			||||||
                      :disable-transitions="false"
 | 
					 | 
				
			||||||
                      @close="handleClose(item.pkId)">
 | 
					 | 
				
			||||||
                {{item.typeName}}
 | 
					 | 
				
			||||||
              </el-tag>
 | 
					 | 
				
			||||||
              <el-button class="button-new-tag"
 | 
					 | 
				
			||||||
                         v-show="!methods"
 | 
					 | 
				
			||||||
                         size="small"
 | 
					 | 
				
			||||||
                         @click="openDiag=true">{{'添加'}}</el-button>
 | 
					 | 
				
			||||||
            </el-form-item>
 | 
					 | 
				
			||||||
          </div>
 | 
					 | 
				
			||||||
          <!-- <div v-show="tabActive==2">
 | 
					 | 
				
			||||||
            <el-col class="el-col-20">
 | 
					 | 
				
			||||||
              <el-form-item :label="'抽奖礼品'"
 | 
					 | 
				
			||||||
                            prop="isPrize">
 | 
					 | 
				
			||||||
                <el-select clearable
 | 
					 | 
				
			||||||
                           v-model="form.isPrize"
 | 
					 | 
				
			||||||
                           :disabled="methods">
 | 
					 | 
				
			||||||
                  <el-option v-for="item in agreeList"
 | 
					 | 
				
			||||||
                             :key="item.val"
 | 
					 | 
				
			||||||
                             :label="item.text"
 | 
					 | 
				
			||||||
                             :value="item.val"></el-option>
 | 
					 | 
				
			||||||
                </el-select>
 | 
					 | 
				
			||||||
              </el-form-item>
 | 
					 | 
				
			||||||
            </el-col>
 | 
					 | 
				
			||||||
            <el-col class="el-col-20">
 | 
					 | 
				
			||||||
              <el-form-item :label="'特惠礼品'"
 | 
					 | 
				
			||||||
                            prop="isGift">
 | 
					 | 
				
			||||||
                <el-select clearable
 | 
					 | 
				
			||||||
                           v-model="form.isGift"
 | 
					 | 
				
			||||||
                           :disabled="methods">
 | 
					 | 
				
			||||||
                  <el-option v-for="item in agreeList"
 | 
					 | 
				
			||||||
                             :key="item.val"
 | 
					 | 
				
			||||||
                             :label="item.text"
 | 
					 | 
				
			||||||
                             :value="item.val"></el-option>
 | 
					 | 
				
			||||||
                </el-select>
 | 
					 | 
				
			||||||
              </el-form-item>
 | 
					 | 
				
			||||||
            </el-col>
 | 
					 | 
				
			||||||
            <el-col class="el-col-20">
 | 
					 | 
				
			||||||
              <el-form-item :label="'提货商品'"
 | 
					 | 
				
			||||||
                            prop="isPickUp">
 | 
					 | 
				
			||||||
                <el-select clearable
 | 
					 | 
				
			||||||
                           v-model="form.isPickUp"
 | 
					 | 
				
			||||||
                           :disabled="methods">
 | 
					 | 
				
			||||||
                  <el-option v-for="item in agreeList"
 | 
					 | 
				
			||||||
                             :key="item.val"
 | 
					 | 
				
			||||||
                             :label="item.text"
 | 
					 | 
				
			||||||
                             :value="item.val"></el-option>
 | 
					 | 
				
			||||||
                </el-select>
 | 
					 | 
				
			||||||
              </el-form-item>
 | 
					 | 
				
			||||||
            </el-col>
 | 
					 | 
				
			||||||
            <el-col class="el-col-20">
 | 
					 | 
				
			||||||
              <el-form-item :label="'合并发货'"
 | 
					 | 
				
			||||||
                            prop="isMerge">
 | 
					 | 
				
			||||||
                <el-select clearable
 | 
					 | 
				
			||||||
                           v-model="form.isMerge"
 | 
					 | 
				
			||||||
                           :disabled="methods">
 | 
					 | 
				
			||||||
                  <el-option v-for="item in agreeList"
 | 
					 | 
				
			||||||
                             :key="item.val"
 | 
					 | 
				
			||||||
                             :label="item.text"
 | 
					 | 
				
			||||||
                             :value="item.val"></el-option>
 | 
					 | 
				
			||||||
                </el-select>
 | 
					 | 
				
			||||||
              </el-form-item>
 | 
					 | 
				
			||||||
            </el-col>
 | 
					 | 
				
			||||||
            <el-col class="el-col-20">
 | 
					 | 
				
			||||||
              <el-form-item :label="'冷链运输'"
 | 
					 | 
				
			||||||
                            prop="isFresh">
 | 
					 | 
				
			||||||
                <el-select clearable
 | 
					 | 
				
			||||||
                           v-model="form.isFresh"
 | 
					 | 
				
			||||||
                           :disabled="methods">
 | 
					 | 
				
			||||||
                  <el-option v-for="item in agreeList"
 | 
					 | 
				
			||||||
                             :key="item.val"
 | 
					 | 
				
			||||||
                             :label="item.text"
 | 
					 | 
				
			||||||
                             :value="item.val"></el-option>
 | 
					 | 
				
			||||||
                </el-select>
 | 
					 | 
				
			||||||
              </el-form-item>
 | 
					 | 
				
			||||||
            </el-col>
 | 
					 | 
				
			||||||
            <el-col class="el-col-20">
 | 
					 | 
				
			||||||
              <el-form-item :label="'追溯编号'"
 | 
					 | 
				
			||||||
                            prop="isBarCode">
 | 
					 | 
				
			||||||
                <el-select clearable
 | 
					 | 
				
			||||||
                           v-model="form.isBarCode"
 | 
					 | 
				
			||||||
                           :disabled="methods">
 | 
					 | 
				
			||||||
                  <el-option v-for="item in agreeList"
 | 
					 | 
				
			||||||
                             :key="item.val"
 | 
					 | 
				
			||||||
                             :label="item.text"
 | 
					 | 
				
			||||||
                             :value="item.val"></el-option>
 | 
					 | 
				
			||||||
                </el-select>
 | 
					 | 
				
			||||||
              </el-form-item>
 | 
					 | 
				
			||||||
            </el-col>
 | 
					 | 
				
			||||||
            <el-col class="el-col-20">
 | 
					 | 
				
			||||||
              <el-form-item :label="'运输方式'"
 | 
					 | 
				
			||||||
                            prop="ysList">
 | 
					 | 
				
			||||||
                <el-checkbox-group v-model="form.ysList"
 | 
					 | 
				
			||||||
                                   :disabled="methods"
 | 
					 | 
				
			||||||
                                   @change="changeYsfs">
 | 
					 | 
				
			||||||
                  <el-checkbox v-for="item,index in transportTypeList"
 | 
					 | 
				
			||||||
                               :key="item.value"
 | 
					 | 
				
			||||||
                               :label="item.value">{{item.label}}</el-checkbox>
 | 
					 | 
				
			||||||
                </el-checkbox-group>
 | 
					 | 
				
			||||||
              </el-form-item>
 | 
					 | 
				
			||||||
            </el-col>
 | 
					 | 
				
			||||||
          </div> -->
 | 
					 | 
				
			||||||
        </el-form>
 | 
					 | 
				
			||||||
      </div>
 | 
					 | 
				
			||||||
      <div class="footer"
 | 
					 | 
				
			||||||
           v-show="!methods">
 | 
					 | 
				
			||||||
        <el-button size="small"
 | 
					 | 
				
			||||||
                   class="thebtn2"> {{ '取消' }}</el-button>
 | 
					 | 
				
			||||||
        <el-button size="small"
 | 
					 | 
				
			||||||
        v-hasButtons="['productBasicAddSure']"
 | 
					 | 
				
			||||||
                   @click="submit('form')"
 | 
					 | 
				
			||||||
                   class="thebtn1"> {{ '确认' }}</el-button>
 | 
					 | 
				
			||||||
      </div>
 | 
					 | 
				
			||||||
    </div>
 | 
					 | 
				
			||||||
    <el-dialog :title="'添加'"
 | 
					 | 
				
			||||||
               :visible.sync="openDiag"
 | 
					 | 
				
			||||||
               :close-on-click-modal="false"
 | 
					 | 
				
			||||||
               width="30%"
 | 
					 | 
				
			||||||
               center>
 | 
					 | 
				
			||||||
      <el-checkbox-group v-model="form.checkList"
 | 
					 | 
				
			||||||
                         class="check">
 | 
					 | 
				
			||||||
        <el-checkbox v-for="item,index in ggList"
 | 
					 | 
				
			||||||
                     class="check_i"
 | 
					 | 
				
			||||||
                     :key="item.pkId"
 | 
					 | 
				
			||||||
                     :label="item.pkId">{{item.typeName}}</el-checkbox>
 | 
					 | 
				
			||||||
      </el-checkbox-group>
 | 
					 | 
				
			||||||
      <span slot="footer"
 | 
					 | 
				
			||||||
            class="dialog-footer">
 | 
					 | 
				
			||||||
        <el-button @click="openDiag = false">{{'取消'}}</el-button>
 | 
					 | 
				
			||||||
        <el-button type="primary"
 | 
					 | 
				
			||||||
                   @click="checkTrue">{{'确认'}}</el-button>
 | 
					 | 
				
			||||||
      </span>
 | 
					 | 
				
			||||||
    </el-dialog>
 | 
					 | 
				
			||||||
  </div>
 | 
					 | 
				
			||||||
</template>
 | 
					 | 
				
			||||||
<script>
 | 
					 | 
				
			||||||
import { getToken } from '@/utils/auth'
 | 
					 | 
				
			||||||
import * as api from '@/api/product.js'
 | 
					 | 
				
			||||||
import { productUpdateJxc, productSaveJxc } from '@/api/product.js'
 | 
					 | 
				
			||||||
export default {
 | 
					 | 
				
			||||||
  name: 'jcsz',
 | 
					 | 
				
			||||||
  data() {
 | 
					 | 
				
			||||||
    return {
 | 
					 | 
				
			||||||
      rules: {
 | 
					 | 
				
			||||||
        shippingChannel: [
 | 
					 | 
				
			||||||
          { required: true, message: '请输入发货类型', trigger: 'change' },
 | 
					 | 
				
			||||||
        ],
 | 
					 | 
				
			||||||
        unit: [{ required: true, message: '请选择单位', trigger: 'change' }],
 | 
					 | 
				
			||||||
        productName: [
 | 
					 | 
				
			||||||
          { required: true, message: '请输入产品名称', trigger: 'blur' },
 | 
					 | 
				
			||||||
        ],
 | 
					 | 
				
			||||||
        productCode: [
 | 
					 | 
				
			||||||
          { required: true, message: '请输入产品编号', trigger: 'blur' },
 | 
					 | 
				
			||||||
        ],
 | 
					 | 
				
			||||||
        retailPrice: [
 | 
					 | 
				
			||||||
          { required: true, message: '请输入划线价', trigger: 'blur' },
 | 
					 | 
				
			||||||
        ],
 | 
					 | 
				
			||||||
        shelfLife: [
 | 
					 | 
				
			||||||
          { required: true, message: '请输入保质期', trigger: 'blur' },
 | 
					 | 
				
			||||||
        ],
 | 
					 | 
				
			||||||
        weight: [{ required: true, message: '请输入重量', trigger: 'blur' }],
 | 
					 | 
				
			||||||
        postageWeight: [
 | 
					 | 
				
			||||||
          { required: true, message: '请输入邮费重量', trigger: 'blur' },
 | 
					 | 
				
			||||||
        ],
 | 
					 | 
				
			||||||
        productAttr: [
 | 
					 | 
				
			||||||
          { required: true, message: '请选择产品属性', trigger: 'change' },
 | 
					 | 
				
			||||||
        ],
 | 
					 | 
				
			||||||
        pkClassify: [
 | 
					 | 
				
			||||||
          { required: true, message: '请选择所属分类', trigger: 'change' },
 | 
					 | 
				
			||||||
        ],
 | 
					 | 
				
			||||||
        sort: [{ required: true, message: '请输入排列序号', trigger: 'blur' }],
 | 
					 | 
				
			||||||
        length: [{ required: true, message: '请输入长', trigger: 'blur' }],
 | 
					 | 
				
			||||||
        width: [{ required: true, message: '请输入宽', trigger: 'blur' }],
 | 
					 | 
				
			||||||
        height: [{ required: true, message: '请输入高', trigger: 'blur' }],
 | 
					 | 
				
			||||||
        cover: [
 | 
					 | 
				
			||||||
          { required: true, message: '请上传产品主图', trigger: 'change' },
 | 
					 | 
				
			||||||
        ],
 | 
					 | 
				
			||||||
        pkSpecsType: [
 | 
					 | 
				
			||||||
          { required: true, message: '请选择规格', trigger: 'change' },
 | 
					 | 
				
			||||||
        ],
 | 
					 | 
				
			||||||
        isPrize: [
 | 
					 | 
				
			||||||
          { required: true, message: '抽奖礼品', trigger: 'change' },
 | 
					 | 
				
			||||||
        ],
 | 
					 | 
				
			||||||
        isGift: [
 | 
					 | 
				
			||||||
          { required: true, message: '请选择特惠礼品', trigger: 'change' },
 | 
					 | 
				
			||||||
        ],
 | 
					 | 
				
			||||||
        isPickUp: [
 | 
					 | 
				
			||||||
          { required: true, message: '请选择提货商品', trigger: 'change' },
 | 
					 | 
				
			||||||
        ],
 | 
					 | 
				
			||||||
        isMerge: [
 | 
					 | 
				
			||||||
          { required: true, message: '请选择合并发货', trigger: 'change' },
 | 
					 | 
				
			||||||
        ],
 | 
					 | 
				
			||||||
        isFresh: [
 | 
					 | 
				
			||||||
          { required: true, message: '冷链运输', trigger: 'change' },
 | 
					 | 
				
			||||||
        ],
 | 
					 | 
				
			||||||
        isBarCode: [
 | 
					 | 
				
			||||||
          { required: true, message: '请选择条码管理', trigger: 'change' },
 | 
					 | 
				
			||||||
        ],
 | 
					 | 
				
			||||||
        ysList: [
 | 
					 | 
				
			||||||
          { required: true, message: '请选择运输方式', trigger: 'change' },
 | 
					 | 
				
			||||||
        ],
 | 
					 | 
				
			||||||
      },
 | 
					 | 
				
			||||||
      ggList: [],
 | 
					 | 
				
			||||||
      // 规格名称弹框
 | 
					 | 
				
			||||||
      openDiag: false,
 | 
					 | 
				
			||||||
      showImg: true, //默认展示
 | 
					 | 
				
			||||||
      noneUploadImg: false, //
 | 
					 | 
				
			||||||
      uploadImgUrl: process.env.VUE_APP_BASE_API + '/system/upload',
 | 
					 | 
				
			||||||
      headers: {
 | 
					 | 
				
			||||||
        Authorization: getToken(),
 | 
					 | 
				
			||||||
      },
 | 
					 | 
				
			||||||
      form: {
 | 
					 | 
				
			||||||
        sort: '',
 | 
					 | 
				
			||||||
        sptw: '',
 | 
					 | 
				
			||||||
        checkList: [],
 | 
					 | 
				
			||||||
        ysList: [],
 | 
					 | 
				
			||||||
        coverList: [],
 | 
					 | 
				
			||||||
        sort: '',
 | 
					 | 
				
			||||||
        postageWeight: '',
 | 
					 | 
				
			||||||
        height: '',
 | 
					 | 
				
			||||||
        width: '',
 | 
					 | 
				
			||||||
        length: '',
 | 
					 | 
				
			||||||
        weight: '',
 | 
					 | 
				
			||||||
        shelfLife: '',
 | 
					 | 
				
			||||||
      },
 | 
					 | 
				
			||||||
      tabActive: 0,
 | 
					 | 
				
			||||||
      agreeList: [
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
          text: '允许',
 | 
					 | 
				
			||||||
          val: 0,
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
          text: '禁止',
 | 
					 | 
				
			||||||
          val: 1,
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
      ],
 | 
					 | 
				
			||||||
      topList: [
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
          name: '基础设置',
 | 
					 | 
				
			||||||
          id: 0,
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
          name: '规格明细',
 | 
					 | 
				
			||||||
          id: 1,
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
        // {
 | 
					 | 
				
			||||||
        //   name: '拓展设置',
 | 
					 | 
				
			||||||
        //   id: 2,
 | 
					 | 
				
			||||||
        // },
 | 
					 | 
				
			||||||
      ],
 | 
					 | 
				
			||||||
      productTypeList: [],
 | 
					 | 
				
			||||||
      fhTypeList: [],
 | 
					 | 
				
			||||||
      dwList: [],
 | 
					 | 
				
			||||||
      classifyList: [],
 | 
					 | 
				
			||||||
      transportTypeList: [],
 | 
					 | 
				
			||||||
      productId: '',
 | 
					 | 
				
			||||||
      methods: true,
 | 
					 | 
				
			||||||
      wahtMethods: 0,
 | 
					 | 
				
			||||||
      repurchaseTypeList: [],
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  mounted() {
 | 
					 | 
				
			||||||
    this.productId = this.$route.query.id
 | 
					 | 
				
			||||||
    this.methods = this.$route.query.methods ? false : true
 | 
					 | 
				
			||||||
    this.wahtMethods = this.$route.query.methods
 | 
					 | 
				
			||||||
    // 获取规格list
 | 
					 | 
				
			||||||
    this.getGg()
 | 
					 | 
				
			||||||
    // // 产品属性枚举
 | 
					 | 
				
			||||||
    // this.getProductType()
 | 
					 | 
				
			||||||
    // 发货类型
 | 
					 | 
				
			||||||
    this.getShipping()
 | 
					 | 
				
			||||||
    // 单位
 | 
					 | 
				
			||||||
    this.getUnit()
 | 
					 | 
				
			||||||
    // 所属分类
 | 
					 | 
				
			||||||
    this.getClassifyAll()
 | 
					 | 
				
			||||||
    // 运输方式
 | 
					 | 
				
			||||||
    this.getTransportType()
 | 
					 | 
				
			||||||
     // 复购类型
 | 
					 | 
				
			||||||
    //  this.getRepurchaseType()
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  methods: {
 | 
					 | 
				
			||||||
    // getRepurchaseType() {
 | 
					 | 
				
			||||||
    //   api.repurchaseType().then((res) => {
 | 
					 | 
				
			||||||
    //     this.repurchaseTypeList = res.data
 | 
					 | 
				
			||||||
    //   })
 | 
					 | 
				
			||||||
    // },
 | 
					 | 
				
			||||||
    getProductCode() {
 | 
					 | 
				
			||||||
      api.getProductCode().then((res) => {
 | 
					 | 
				
			||||||
        this.form.productCode = res.msg
 | 
					 | 
				
			||||||
      })
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    getAllData() {
 | 
					 | 
				
			||||||
      api.productDetailtJxc({ productBasId: this.productId }).then((res) => {
 | 
					 | 
				
			||||||
        this.form = res.data
 | 
					 | 
				
			||||||
        if (res.data.cover) {
 | 
					 | 
				
			||||||
          this.noneUploadImg = true
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        this.form.coverList = [{ url: res.data.cover }]
 | 
					 | 
				
			||||||
        this.form = res.data
 | 
					 | 
				
			||||||
        //  let ysList =
 | 
					 | 
				
			||||||
        this.$set(this.form, 'ysList', [
 | 
					 | 
				
			||||||
          res.data.isLandTrans == 0 ? 1 : '',
 | 
					 | 
				
			||||||
          res.data.isAirTrans == 0 ? 2 : '',
 | 
					 | 
				
			||||||
          res.data.isOceanTrans == 0 ? 3 : '',
 | 
					 | 
				
			||||||
        ])
 | 
					 | 
				
			||||||
        // this.form.checkList = this.form.pkSpecsType
 | 
					 | 
				
			||||||
        this.$set(this.form, 'checkList', this.form.pkSpecsType)
 | 
					 | 
				
			||||||
        this.ggList.forEach((item) => {
 | 
					 | 
				
			||||||
          this.form.pkSpecsType.forEach((child) => {
 | 
					 | 
				
			||||||
            if (item.pkId == child) {
 | 
					 | 
				
			||||||
              // item.checked = true
 | 
					 | 
				
			||||||
              this.$set(item, 'checked', true)
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
          })
 | 
					 | 
				
			||||||
        })
 | 
					 | 
				
			||||||
        if (this.wahtMethods == 2) {
 | 
					 | 
				
			||||||
          this.getProductCode()
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        this.$forceUpdate()
 | 
					 | 
				
			||||||
      })
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    // 运输方式单独三个字段
 | 
					 | 
				
			||||||
    changeYsfs(val) {
 | 
					 | 
				
			||||||
      // 有陆运
 | 
					 | 
				
			||||||
      if (val.indexOf(1) > -1) {
 | 
					 | 
				
			||||||
        this.form.isLandTrans = 0
 | 
					 | 
				
			||||||
      } else {
 | 
					 | 
				
			||||||
        this.form.isLandTrans = 1
 | 
					 | 
				
			||||||
      }
 | 
					 | 
				
			||||||
      // 有空运
 | 
					 | 
				
			||||||
      if (val.indexOf(2) > -1) {
 | 
					 | 
				
			||||||
        this.form.isAirTrans = 0
 | 
					 | 
				
			||||||
      } else {
 | 
					 | 
				
			||||||
        this.form.isAirTrans = 1
 | 
					 | 
				
			||||||
      }
 | 
					 | 
				
			||||||
      // 海运
 | 
					 | 
				
			||||||
      if (val.indexOf(3) > -1) {
 | 
					 | 
				
			||||||
        this.form.isOceanTrans = 0
 | 
					 | 
				
			||||||
      } else {
 | 
					 | 
				
			||||||
        this.form.isOceanTrans = 1
 | 
					 | 
				
			||||||
      }
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    // 运输方式
 | 
					 | 
				
			||||||
    getTransportType() {
 | 
					 | 
				
			||||||
      api.transportType().then((res) => {
 | 
					 | 
				
			||||||
        this.transportTypeList = res.data
 | 
					 | 
				
			||||||
      })
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    // 所属分类
 | 
					 | 
				
			||||||
    getClassifyAll() {
 | 
					 | 
				
			||||||
      api.classifyAll().then((res) => {
 | 
					 | 
				
			||||||
        this.classifyList = res.data
 | 
					 | 
				
			||||||
      })
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    // 选完规格
 | 
					 | 
				
			||||||
    checkTrue() {
 | 
					 | 
				
			||||||
      this.ggList.forEach((item) => {
 | 
					 | 
				
			||||||
        item.checked = false
 | 
					 | 
				
			||||||
      })
 | 
					 | 
				
			||||||
      this.ggList.forEach((item) => {
 | 
					 | 
				
			||||||
        this.form.checkList.forEach((child) => {
 | 
					 | 
				
			||||||
          if (item.pkId == child) {
 | 
					 | 
				
			||||||
            item.checked = true
 | 
					 | 
				
			||||||
          }
 | 
					 | 
				
			||||||
        })
 | 
					 | 
				
			||||||
      })
 | 
					 | 
				
			||||||
      this.openDiag = false
 | 
					 | 
				
			||||||
      this.form.pkSpecsType = this.form.checkList
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    // 获取规格
 | 
					 | 
				
			||||||
    getGg() {
 | 
					 | 
				
			||||||
      api.findAll().then((res) => {
 | 
					 | 
				
			||||||
        res.data.forEach((item) => {
 | 
					 | 
				
			||||||
          item.checked = false
 | 
					 | 
				
			||||||
        })
 | 
					 | 
				
			||||||
        this.ggList = res.data
 | 
					 | 
				
			||||||
        // 获取详情
 | 
					 | 
				
			||||||
        this.getAllData()
 | 
					 | 
				
			||||||
      })
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    // // 产品属性枚举
 | 
					 | 
				
			||||||
    // getProductType() {
 | 
					 | 
				
			||||||
    //   api.productType().then((res) => {
 | 
					 | 
				
			||||||
    //     this.productTypeList = res.data
 | 
					 | 
				
			||||||
    //   })
 | 
					 | 
				
			||||||
    // },
 | 
					 | 
				
			||||||
    // 发货类型
 | 
					 | 
				
			||||||
    getShipping() {
 | 
					 | 
				
			||||||
      api.getShipping().then((res) => {
 | 
					 | 
				
			||||||
        this.fhTypeList = res.data
 | 
					 | 
				
			||||||
      })
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    // 单位
 | 
					 | 
				
			||||||
    getUnit() {
 | 
					 | 
				
			||||||
      api.unitAll().then((res) => {
 | 
					 | 
				
			||||||
        this.dwList = res.data
 | 
					 | 
				
			||||||
      })
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    // 移除规格
 | 
					 | 
				
			||||||
    handleClose(pkId) {
 | 
					 | 
				
			||||||
      // 引藏全规格中选中字段
 | 
					 | 
				
			||||||
      this.ggList.forEach((item) => {
 | 
					 | 
				
			||||||
        if (item.pkId == pkId) {
 | 
					 | 
				
			||||||
          item.checked = false
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
      })
 | 
					 | 
				
			||||||
      // 移除表单选中
 | 
					 | 
				
			||||||
      this.form.checkList.splice(this.form.checkList.indexOf(pkId), 1)
 | 
					 | 
				
			||||||
      this.$forceUpdate()
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    submit(form) {
 | 
					 | 
				
			||||||
      let urlRequir = ''
 | 
					 | 
				
			||||||
      let mssg = ''
 | 
					 | 
				
			||||||
      if (this.wahtMethods == 1) {
 | 
					 | 
				
			||||||
        urlRequir = productUpdateJxc
 | 
					 | 
				
			||||||
        mssg = '修改成功'
 | 
					 | 
				
			||||||
      } else {
 | 
					 | 
				
			||||||
        urlRequir = productSaveJxc
 | 
					 | 
				
			||||||
        mssg = '复制成功'
 | 
					 | 
				
			||||||
      }
 | 
					 | 
				
			||||||
      this.$refs[form].validate((valid) => {
 | 
					 | 
				
			||||||
        if (valid) {
 | 
					 | 
				
			||||||
          urlRequir(this.form).then((res) => {
 | 
					 | 
				
			||||||
            if(res.code == 200){
 | 
					 | 
				
			||||||
              this.$message({
 | 
					 | 
				
			||||||
              message: mssg,
 | 
					 | 
				
			||||||
              type: 'success',
 | 
					 | 
				
			||||||
            })
 | 
					 | 
				
			||||||
            this.$router.go(-1)
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
          })
 | 
					 | 
				
			||||||
        } else {
 | 
					 | 
				
			||||||
          return false
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
      })
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    // 切换tab
 | 
					 | 
				
			||||||
    handleLink(id) {
 | 
					 | 
				
			||||||
      this.tabActive = id
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    uploadImgChange(file, fileList) {
 | 
					 | 
				
			||||||
      this.noneUploadImg = fileList.length > 0
 | 
					 | 
				
			||||||
      this.$refs.form.clearValidate('cover');
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    //图片上传成功后的回调
 | 
					 | 
				
			||||||
    handlePictureSuccess(res, file) {
 | 
					 | 
				
			||||||
      this.form.cover = res.data.url
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    //图片上传删除
 | 
					 | 
				
			||||||
    handleRemove(file, fileList) {
 | 
					 | 
				
			||||||
      this.form.cover = ''
 | 
					 | 
				
			||||||
      this.noneUploadImg = fileList.length > 0
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
</script>
 | 
					 | 
				
			||||||
<style scoped lang="scss">
 | 
					 | 
				
			||||||
::v-deep .el-select {
 | 
					 | 
				
			||||||
  width: 100%;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
.uploadIcon ::v-deep .el-upload--picture-card {
 | 
					 | 
				
			||||||
  display: none !important; /* 上传按钮隐藏 */
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
.el-col-20 {
 | 
					 | 
				
			||||||
  width: 20%;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
.el-col-60 {
 | 
					 | 
				
			||||||
  width: 60%;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
.el-col-40 {
 | 
					 | 
				
			||||||
  width: 40%;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
.topbox {
 | 
					 | 
				
			||||||
  align-items: center;
 | 
					 | 
				
			||||||
  padding: 0px 0 0px 0;
 | 
					 | 
				
			||||||
  display: flex; //   background: skyblue;
 | 
					 | 
				
			||||||
  .levelList_i {
 | 
					 | 
				
			||||||
    margin-left: 20px;
 | 
					 | 
				
			||||||
    position: relative;
 | 
					 | 
				
			||||||
    cursor: pointer;
 | 
					 | 
				
			||||||
    padding: 3px 10px;
 | 
					 | 
				
			||||||
    // width: 88px;
 | 
					 | 
				
			||||||
    // height: 34px;
 | 
					 | 
				
			||||||
    border-radius: 17px;
 | 
					 | 
				
			||||||
    border: 1px solid #cccccc;
 | 
					 | 
				
			||||||
    font-size: 14px;
 | 
					 | 
				
			||||||
    font-family: MicrosoftYaHei;
 | 
					 | 
				
			||||||
    text-align: center;
 | 
					 | 
				
			||||||
    // line-height: 34px;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
  .act {
 | 
					 | 
				
			||||||
    color: #ffffff;
 | 
					 | 
				
			||||||
    background: #c8161d;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
  .act1 {
 | 
					 | 
				
			||||||
    border-bottom: 3px solid #1890ff !important;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
  .cha {
 | 
					 | 
				
			||||||
    font-size: 16px;
 | 
					 | 
				
			||||||
    color: #606266;
 | 
					 | 
				
			||||||
    position: absolute;
 | 
					 | 
				
			||||||
    top: 10px;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
  .li {
 | 
					 | 
				
			||||||
    width: 40px;
 | 
					 | 
				
			||||||
    margin: 0 auto;
 | 
					 | 
				
			||||||
    border-bottom: 3px solid transparent;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
.page {
 | 
					 | 
				
			||||||
  height: calc(100vh - 50px);
 | 
					 | 
				
			||||||
  overflow: hidden;
 | 
					 | 
				
			||||||
  background: #f9f9f9;
 | 
					 | 
				
			||||||
  padding-top: 20px;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
.main {
 | 
					 | 
				
			||||||
  display: flex;
 | 
					 | 
				
			||||||
  flex-direction: column;
 | 
					 | 
				
			||||||
  height: calc(100vh - 124px);
 | 
					 | 
				
			||||||
  overflow: hidden;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
.contain {
 | 
					 | 
				
			||||||
  background: #ffffff;
 | 
					 | 
				
			||||||
  border-radius: 8px;
 | 
					 | 
				
			||||||
  box-shadow: 0px 2px 20px 0px rgba(238, 238, 238, 0.5);
 | 
					 | 
				
			||||||
  // margin: 10px 20px 0 20px;
 | 
					 | 
				
			||||||
  flex: 1;
 | 
					 | 
				
			||||||
  padding-top: 20px;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
.footer {
 | 
					 | 
				
			||||||
  height: 68px;
 | 
					 | 
				
			||||||
  background: #ffffff;
 | 
					 | 
				
			||||||
  box-shadow: 0px -3px 20px 0px rgba(204, 204, 204, 0.5);
 | 
					 | 
				
			||||||
  // margin: 0 20px;
 | 
					 | 
				
			||||||
  display: flex;
 | 
					 | 
				
			||||||
  justify-content: center;
 | 
					 | 
				
			||||||
  align-items: center;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
.thebtn1 {
 | 
					 | 
				
			||||||
  background: #c8161d;
 | 
					 | 
				
			||||||
  color: #ffffff;
 | 
					 | 
				
			||||||
  padding: 9px 45px;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
.thebtn2 {
 | 
					 | 
				
			||||||
  background: #cccccc;
 | 
					 | 
				
			||||||
  color: #ffffff;
 | 
					 | 
				
			||||||
  padding: 9px 45px;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
.neibu {
 | 
					 | 
				
			||||||
  margin-right: 10px;
 | 
					 | 
				
			||||||
  color: #666666;
 | 
					 | 
				
			||||||
  font-style: normal;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
.elTag {
 | 
					 | 
				
			||||||
  margin-right: 10px;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
.check {
 | 
					 | 
				
			||||||
  display: flex;
 | 
					 | 
				
			||||||
  flex-wrap: wrap;
 | 
					 | 
				
			||||||
  text-align: center;
 | 
					 | 
				
			||||||
  // justify-content: center;
 | 
					 | 
				
			||||||
  .check_i {
 | 
					 | 
				
			||||||
    width: 50%;
 | 
					 | 
				
			||||||
    text-align: left;
 | 
					 | 
				
			||||||
    margin-right: 0 !important;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
.jy{
 | 
					 | 
				
			||||||
  font-size: 10px;
 | 
					 | 
				
			||||||
font-family: PingFang SC-Regular, PingFang SC;
 | 
					 | 
				
			||||||
font-weight: 400;
 | 
					 | 
				
			||||||
color: #999999;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
</style>
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,531 +0,0 @@
 | 
				
			||||||
<!--
 | 
					 | 
				
			||||||
 * @Descripttion:
 | 
					 | 
				
			||||||
 * @version:
 | 
					 | 
				
			||||||
 * @Author: kBank
 | 
					 | 
				
			||||||
 * @Date: 2022-10-28 16:50:29
 | 
					 | 
				
			||||||
-->
 | 
					 | 
				
			||||||
<template>
 | 
					 | 
				
			||||||
  <div class="page">
 | 
					 | 
				
			||||||
    <div class="main">
 | 
					 | 
				
			||||||
      <div class="form_all">
 | 
					 | 
				
			||||||
        <el-form ref="select"
 | 
					 | 
				
			||||||
                 :model="select"
 | 
					 | 
				
			||||||
                 label-width="auto">
 | 
					 | 
				
			||||||
          <el-row :gutter="10">
 | 
					 | 
				
			||||||
            <!-- 一层 -->
 | 
					 | 
				
			||||||
            <el-col :span="4">
 | 
					 | 
				
			||||||
              <el-form-item :label="'产品名称'">
 | 
					 | 
				
			||||||
                <el-input clearable
 | 
					 | 
				
			||||||
                          v-model="select.productName"></el-input>
 | 
					 | 
				
			||||||
              </el-form-item>
 | 
					 | 
				
			||||||
            </el-col>
 | 
					 | 
				
			||||||
            <el-col :span="4">
 | 
					 | 
				
			||||||
              <el-form-item :label="'产品编号'">
 | 
					 | 
				
			||||||
                <el-input clearable
 | 
					 | 
				
			||||||
                          v-model="select.productCode"></el-input>
 | 
					 | 
				
			||||||
              </el-form-item>
 | 
					 | 
				
			||||||
            </el-col>
 | 
					 | 
				
			||||||
            <el-col :span="8">
 | 
					 | 
				
			||||||
              <el-form-item :label="'创建日期'">
 | 
					 | 
				
			||||||
                <el-date-picker v-model="creationTime"
 | 
					 | 
				
			||||||
                                @change="changeTime"
 | 
					 | 
				
			||||||
                                value-format="yyyy-MM-dd"
 | 
					 | 
				
			||||||
                                type="daterange"
 | 
					 | 
				
			||||||
                                :range-separator="'至'"
 | 
					 | 
				
			||||||
                                :start-placeholder="'开始日期'"
 | 
					 | 
				
			||||||
                                :end-placeholder="'结束日期'">
 | 
					 | 
				
			||||||
                </el-date-picker>
 | 
					 | 
				
			||||||
              </el-form-item>
 | 
					 | 
				
			||||||
            </el-col>
 | 
					 | 
				
			||||||
            <el-col :span="4">
 | 
					 | 
				
			||||||
              <el-button type="primary"
 | 
					 | 
				
			||||||
                         @click="getDataList"> {{ '搜索' }}</el-button>
 | 
					 | 
				
			||||||
              <el-button type=""
 | 
					 | 
				
			||||||
                         class="resetBtn"
 | 
					 | 
				
			||||||
                         @click="reset"> {{ '重置' }}</el-button>
 | 
					 | 
				
			||||||
            </el-col>
 | 
					 | 
				
			||||||
          </el-row>
 | 
					 | 
				
			||||||
        </el-form>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      </div>
 | 
					 | 
				
			||||||
      <div class="main_a">
 | 
					 | 
				
			||||||
        <div class="mainbtn">
 | 
					 | 
				
			||||||
          <el-button size="small"
 | 
					 | 
				
			||||||
                     @click="openDig"
 | 
					 | 
				
			||||||
                  
 | 
					 | 
				
			||||||
                     class="addBtn">{{'添加'}}</el-button>
 | 
					 | 
				
			||||||
          <el-button size="small"
 | 
					 | 
				
			||||||
                     @click="handleExport"
 | 
					 | 
				
			||||||
                   
 | 
					 | 
				
			||||||
                     class="exportBtn"> {{ '导出' }}</el-button>
 | 
					 | 
				
			||||||
          <el-button size="small"
 | 
					 | 
				
			||||||
                     :disabled="isCopy"
 | 
					 | 
				
			||||||
                     @click="toCopy"
 | 
					 | 
				
			||||||
             
 | 
					 | 
				
			||||||
                     class="copyBtn">{{'复制'}}</el-button>
 | 
					 | 
				
			||||||
        </div>
 | 
					 | 
				
			||||||
      </div>
 | 
					 | 
				
			||||||
      <div class="maintable">
 | 
					 | 
				
			||||||
        <el-table :data="tableData"
 | 
					 | 
				
			||||||
        v-loading="loading"
 | 
					 | 
				
			||||||
                  style="width: 100%"
 | 
					 | 
				
			||||||
                  height="100%"
 | 
					 | 
				
			||||||
                  :header-cell-style="{ background: '#EEEEEE' }"
 | 
					 | 
				
			||||||
                  :row-class-name="tableRowClassName"
 | 
					 | 
				
			||||||
                  @selection-change="handleSelectionChange">
 | 
					 | 
				
			||||||
          <el-table-column type="selection"
 | 
					 | 
				
			||||||
                           width="55"> </el-table-column>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
          <el-table-column align="center"
 | 
					 | 
				
			||||||
                           prop="cover"
 | 
					 | 
				
			||||||
                           :label="'产品主图'">
 | 
					 | 
				
			||||||
            <template slot-scope="scope">
 | 
					 | 
				
			||||||
              <img class="bgImg"
 | 
					 | 
				
			||||||
                   :src="scope.row.cover"
 | 
					 | 
				
			||||||
                   alt="" />
 | 
					 | 
				
			||||||
            </template>
 | 
					 | 
				
			||||||
          </el-table-column>
 | 
					 | 
				
			||||||
          <el-table-column align="center"
 | 
					 | 
				
			||||||
                           prop="productName"
 | 
					 | 
				
			||||||
                           :label="'产品名称'">
 | 
					 | 
				
			||||||
          </el-table-column>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
          <el-table-column align="center"
 | 
					 | 
				
			||||||
                           prop="productCode"
 | 
					 | 
				
			||||||
                           :label="'产品编号'">
 | 
					 | 
				
			||||||
          </el-table-column>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
          <el-table-column align="center"
 | 
					 | 
				
			||||||
                           prop="length"
 | 
					 | 
				
			||||||
                           :label="'长'+'(CM)'">
 | 
					 | 
				
			||||||
          </el-table-column>
 | 
					 | 
				
			||||||
          <el-table-column align="center"
 | 
					 | 
				
			||||||
                           prop="width"
 | 
					 | 
				
			||||||
                           :label="'宽'+'(CM)'">
 | 
					 | 
				
			||||||
          </el-table-column>
 | 
					 | 
				
			||||||
          <el-table-column align="center"
 | 
					 | 
				
			||||||
                           prop="height"
 | 
					 | 
				
			||||||
                           :label="'高'+'(CM)'">
 | 
					 | 
				
			||||||
          </el-table-column>
 | 
					 | 
				
			||||||
          <el-table-column align="center"
 | 
					 | 
				
			||||||
                           prop="weight"
 | 
					 | 
				
			||||||
                           :label="'重量'+'(KG)'">
 | 
					 | 
				
			||||||
          </el-table-column>
 | 
					 | 
				
			||||||
          <!-- <el-table-column align="center"
 | 
					 | 
				
			||||||
                           prop="postageWeight"
 | 
					 | 
				
			||||||
                           :label="'邮费重量'+'(KG)'">
 | 
					 | 
				
			||||||
          </el-table-column> -->
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
          <el-table-column align="center"
 | 
					 | 
				
			||||||
                           prop="shelfLife"
 | 
					 | 
				
			||||||
                           :label="'保质期(天)'">
 | 
					 | 
				
			||||||
          </el-table-column>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
          <el-table-column align="center"
 | 
					 | 
				
			||||||
                           prop="creationTime"
 | 
					 | 
				
			||||||
                           :label="'创建日期'">
 | 
					 | 
				
			||||||
          </el-table-column>
 | 
					 | 
				
			||||||
          <el-table-column align="center"
 | 
					 | 
				
			||||||
                           prop="time"
 | 
					 | 
				
			||||||
                           width="160"
 | 
					 | 
				
			||||||
                           :label="'操作'"
 | 
					 | 
				
			||||||
                           fixed="right">
 | 
					 | 
				
			||||||
            <template slot-scope="scope">
 | 
					 | 
				
			||||||
              <div class="btnHeng">
 | 
					 | 
				
			||||||
                <el-button @click="toFixed(scope.row.pkId,1)"
 | 
					 | 
				
			||||||
                           type="text"
 | 
					 | 
				
			||||||
                           style="color:#F3A900"
 | 
					 | 
				
			||||||
                           size="small">
 | 
					 | 
				
			||||||
                  {{ '修改' }}
 | 
					 | 
				
			||||||
                </el-button>
 | 
					 | 
				
			||||||
                <el-button @click="toChecked(scope.row.pkId,0)"
 | 
					 | 
				
			||||||
                           type="text"
 | 
					 | 
				
			||||||
                           style="color:#48B2FD"
 | 
					 | 
				
			||||||
                           size="small">
 | 
					 | 
				
			||||||
                  {{ '查看' }}
 | 
					 | 
				
			||||||
                </el-button>
 | 
					 | 
				
			||||||
                <el-button @click="handleDelete(scope.row.pkId)"
 | 
					 | 
				
			||||||
                           type="text"
 | 
					 | 
				
			||||||
                           size="small"
 | 
					 | 
				
			||||||
                           style="color: #C8161D">
 | 
					 | 
				
			||||||
                  {{'删除'}}
 | 
					 | 
				
			||||||
                </el-button>
 | 
					 | 
				
			||||||
                <el-button @click="toCreate(scope.row.pkId)"
 | 
					 | 
				
			||||||
                          v-if='scope.row.isShowCreateButton == 0'
 | 
					 | 
				
			||||||
                           type="text"
 | 
					 | 
				
			||||||
                           size="small"
 | 
					 | 
				
			||||||
                           style="color: #53B11E">
 | 
					 | 
				
			||||||
                  生成
 | 
					 | 
				
			||||||
                </el-button>
 | 
					 | 
				
			||||||
              </div>
 | 
					 | 
				
			||||||
            </template>
 | 
					 | 
				
			||||||
          </el-table-column>
 | 
					 | 
				
			||||||
        </el-table>
 | 
					 | 
				
			||||||
      </div>
 | 
					 | 
				
			||||||
    </div>
 | 
					 | 
				
			||||||
    <pagination v-show="total>0"
 | 
					 | 
				
			||||||
                :total="total"
 | 
					 | 
				
			||||||
                :page.sync="queryParams.pageNum"
 | 
					 | 
				
			||||||
                :limit.sync="queryParams.pageSize"
 | 
					 | 
				
			||||||
                @pagination="getDataList" />
 | 
					 | 
				
			||||||
  </div>
 | 
					 | 
				
			||||||
</template>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
<script>
 | 
					 | 
				
			||||||
import topBar from '@/components/topBar'
 | 
					 | 
				
			||||||
import * as api from '@/api/product.js'
 | 
					 | 
				
			||||||
import { accountSave, accountUpdate } from '@/api/configManage'
 | 
					 | 
				
			||||||
import { getToken } from '@/utils/auth'
 | 
					 | 
				
			||||||
export default {
 | 
					 | 
				
			||||||
  name: 'ProductList',
 | 
					 | 
				
			||||||
  components: {
 | 
					 | 
				
			||||||
    topBar,
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  filters: {
 | 
					 | 
				
			||||||
    isAgree(val, that) {
 | 
					 | 
				
			||||||
      if (!val) {
 | 
					 | 
				
			||||||
        return that.$t('ENU_POPUP_TYPE_1')
 | 
					 | 
				
			||||||
      } else {
 | 
					 | 
				
			||||||
        return that.$t('ENU_POPUP_TYPE_2')
 | 
					 | 
				
			||||||
      }
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  data() {
 | 
					 | 
				
			||||||
    return {
 | 
					 | 
				
			||||||
      that: this,
 | 
					 | 
				
			||||||
      // 所属分类
 | 
					 | 
				
			||||||
      classifyList: [],
 | 
					 | 
				
			||||||
      // 产品属性枚举
 | 
					 | 
				
			||||||
      productTypeList: [],
 | 
					 | 
				
			||||||
      // 发货类型
 | 
					 | 
				
			||||||
      fhTypeList: [],
 | 
					 | 
				
			||||||
      // 单位
 | 
					 | 
				
			||||||
      dwList: [],
 | 
					 | 
				
			||||||
      // 运输方式
 | 
					 | 
				
			||||||
      transportTypeList: [],
 | 
					 | 
				
			||||||
      // 折叠搜索框
 | 
					 | 
				
			||||||
      isActive: false,
 | 
					 | 
				
			||||||
      select: {},
 | 
					 | 
				
			||||||
      // 查询参数
 | 
					 | 
				
			||||||
      queryParams: {
 | 
					 | 
				
			||||||
        pageNum: 1,
 | 
					 | 
				
			||||||
        pageSize: 50,
 | 
					 | 
				
			||||||
      },
 | 
					 | 
				
			||||||
      addOrEdit: '',
 | 
					 | 
				
			||||||
      total: 0,
 | 
					 | 
				
			||||||
      loading:false,
 | 
					 | 
				
			||||||
      tableData: [],
 | 
					 | 
				
			||||||
      countryList: [],
 | 
					 | 
				
			||||||
      agreeList: [
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
          text: '允许',
 | 
					 | 
				
			||||||
          val: 0,
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
          text: '禁止',
 | 
					 | 
				
			||||||
          val: 1,
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
      ],
 | 
					 | 
				
			||||||
      form: {},
 | 
					 | 
				
			||||||
      creationTime: [],
 | 
					 | 
				
			||||||
      isCopy: true,
 | 
					 | 
				
			||||||
      selPkId: '',
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  mounted() {
 | 
					 | 
				
			||||||
    // 获取列表
 | 
					 | 
				
			||||||
    this.getDataList()
 | 
					 | 
				
			||||||
    // 发货类型
 | 
					 | 
				
			||||||
    this.getShipping()
 | 
					 | 
				
			||||||
    // 单位
 | 
					 | 
				
			||||||
    this.getUnit()
 | 
					 | 
				
			||||||
    // 所属分类
 | 
					 | 
				
			||||||
    this.getClassifyAll()
 | 
					 | 
				
			||||||
    // 运输方式
 | 
					 | 
				
			||||||
    this.getTransportType()
 | 
					 | 
				
			||||||
    //  产品属性枚举
 | 
					 | 
				
			||||||
    this.getProductType()
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  methods: {
 | 
					 | 
				
			||||||
    reset() {
 | 
					 | 
				
			||||||
      this.select = {}
 | 
					 | 
				
			||||||
      this.creationTime = []
 | 
					 | 
				
			||||||
      this.getDataList()
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    changeTime(val) {
 | 
					 | 
				
			||||||
      this.select.startCreateDate = val[0]
 | 
					 | 
				
			||||||
      this.select.endCreateDate = val[1]
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    // 产品属性枚举
 | 
					 | 
				
			||||||
    getProductType() {
 | 
					 | 
				
			||||||
      api.productType().then((res) => {
 | 
					 | 
				
			||||||
        this.productTypeList = res.data
 | 
					 | 
				
			||||||
      })
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    // 运输方式
 | 
					 | 
				
			||||||
    getTransportType() {
 | 
					 | 
				
			||||||
      api.transportType().then((res) => {
 | 
					 | 
				
			||||||
        this.transportTypeList = res.data
 | 
					 | 
				
			||||||
      })
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    // 发货类型
 | 
					 | 
				
			||||||
    getShipping() {
 | 
					 | 
				
			||||||
      api.getShipping().then((res) => {
 | 
					 | 
				
			||||||
        this.fhTypeList = res.data
 | 
					 | 
				
			||||||
      })
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    // 单位
 | 
					 | 
				
			||||||
    getUnit() {
 | 
					 | 
				
			||||||
      api.unitAll().then((res) => {
 | 
					 | 
				
			||||||
        this.dwList = res.data
 | 
					 | 
				
			||||||
      })
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    // 所属分类
 | 
					 | 
				
			||||||
    getClassifyAll() {
 | 
					 | 
				
			||||||
      api.classifyAll().then((res) => {
 | 
					 | 
				
			||||||
        this.classifyList = res.data
 | 
					 | 
				
			||||||
      })
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    // 展开折叠
 | 
					 | 
				
			||||||
    changeActive() {
 | 
					 | 
				
			||||||
      this.isActive = !this.isActive
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    // 点击修改
 | 
					 | 
				
			||||||
    toFixed(id) {
 | 
					 | 
				
			||||||
      this.$router.push({
 | 
					 | 
				
			||||||
        path: 'productBasicDetail',
 | 
					 | 
				
			||||||
        query: {
 | 
					 | 
				
			||||||
          id: id,
 | 
					 | 
				
			||||||
          methods: 1,
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
      })
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    // 删除
 | 
					 | 
				
			||||||
    handleDelete(id) {
 | 
					 | 
				
			||||||
      this.$confirm('确定删除?').then((_) => {
 | 
					 | 
				
			||||||
        api.productDelJxc(id).then((res) => {
 | 
					 | 
				
			||||||
          if (res.code == 200) {
 | 
					 | 
				
			||||||
            this.$message({
 | 
					 | 
				
			||||||
              message: res.msg,
 | 
					 | 
				
			||||||
              type: 'success',
 | 
					 | 
				
			||||||
            })
 | 
					 | 
				
			||||||
            this.getDataList()
 | 
					 | 
				
			||||||
          }
 | 
					 | 
				
			||||||
        })
 | 
					 | 
				
			||||||
      })
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    openDig() {
 | 
					 | 
				
			||||||
      this.$router.push({
 | 
					 | 
				
			||||||
        path: 'productBasicAdd',
 | 
					 | 
				
			||||||
      })
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    toCreate(id){
 | 
					 | 
				
			||||||
      api.generateProduct({
 | 
					 | 
				
			||||||
        pkProductBas:id
 | 
					 | 
				
			||||||
      }).then((res) => {
 | 
					 | 
				
			||||||
          if (res.code == 200) {
 | 
					 | 
				
			||||||
            this.$message({
 | 
					 | 
				
			||||||
              message: res.msg,
 | 
					 | 
				
			||||||
              type: 'success',
 | 
					 | 
				
			||||||
            })
 | 
					 | 
				
			||||||
            this.getDataList()
 | 
					 | 
				
			||||||
          }
 | 
					 | 
				
			||||||
        })
 | 
					 | 
				
			||||||
      // this.$router.push({
 | 
					 | 
				
			||||||
      //   path: '/goodsManage/productRelease/productDetail',
 | 
					 | 
				
			||||||
      //   query: {
 | 
					 | 
				
			||||||
      //     pkProductBas: id,
 | 
					 | 
				
			||||||
      //     methods: 3,
 | 
					 | 
				
			||||||
      //   },
 | 
					 | 
				
			||||||
      // })
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    // 查看 0,编辑1,复制2
 | 
					 | 
				
			||||||
    toChecked(id, index) {
 | 
					 | 
				
			||||||
      this.$router.push({
 | 
					 | 
				
			||||||
        path: 'productBasicDetail',
 | 
					 | 
				
			||||||
        query: {
 | 
					 | 
				
			||||||
          id: id,
 | 
					 | 
				
			||||||
          methods: index,
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
      })
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    upEdit(id, index) {
 | 
					 | 
				
			||||||
      api
 | 
					 | 
				
			||||||
        .productMove({
 | 
					 | 
				
			||||||
          productId: id,
 | 
					 | 
				
			||||||
          productMoveType: index,
 | 
					 | 
				
			||||||
        })
 | 
					 | 
				
			||||||
        .then((res) => {
 | 
					 | 
				
			||||||
          this.getDataList()
 | 
					 | 
				
			||||||
        })
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    topEdit(id) {
 | 
					 | 
				
			||||||
      api
 | 
					 | 
				
			||||||
        .floatingFoof({
 | 
					 | 
				
			||||||
          productId: id,
 | 
					 | 
				
			||||||
        })
 | 
					 | 
				
			||||||
        .then((res) => {
 | 
					 | 
				
			||||||
          this.getDataList()
 | 
					 | 
				
			||||||
        })
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    // 获取列表
 | 
					 | 
				
			||||||
    getDataList() {
 | 
					 | 
				
			||||||
      this.loading = true
 | 
					 | 
				
			||||||
      api
 | 
					 | 
				
			||||||
        .productListJxc(Object.assign({}, this.queryParams, this.select))
 | 
					 | 
				
			||||||
        .then((res) => {
 | 
					 | 
				
			||||||
          res.rows.forEach((item) => {
 | 
					 | 
				
			||||||
            // this.dwList.forEach((child) => {
 | 
					 | 
				
			||||||
            //   if (child.pkId == item.unit) {
 | 
					 | 
				
			||||||
            //     item.unitName = child.name
 | 
					 | 
				
			||||||
            //   }
 | 
					 | 
				
			||||||
            // })
 | 
					 | 
				
			||||||
            this.productTypeList.forEach((child) => {
 | 
					 | 
				
			||||||
              if (child.value == item.productAttr) {
 | 
					 | 
				
			||||||
                item.productAttrName = child.label
 | 
					 | 
				
			||||||
              }
 | 
					 | 
				
			||||||
            })
 | 
					 | 
				
			||||||
          })
 | 
					 | 
				
			||||||
          this.loading = false
 | 
					 | 
				
			||||||
          this.tableData = res.rows
 | 
					 | 
				
			||||||
          this.total = res.total
 | 
					 | 
				
			||||||
        })
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    toCopy() {
 | 
					 | 
				
			||||||
      this.toChecked(this.selPkId, 2)
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    handleSelectionChange(val) {
 | 
					 | 
				
			||||||
      if (val.length > 0) {
 | 
					 | 
				
			||||||
        this.selPkId = val[0].pkId
 | 
					 | 
				
			||||||
        this.isCopy = false
 | 
					 | 
				
			||||||
      } else {
 | 
					 | 
				
			||||||
        this.isCopy = true
 | 
					 | 
				
			||||||
      }
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    /** 导出按钮操作 */
 | 
					 | 
				
			||||||
    handleExport() {
 | 
					 | 
				
			||||||
      this.$confirm('是否确认导出所有数据项?', '警告', {
 | 
					 | 
				
			||||||
        confirmButtonText: '确定',
 | 
					 | 
				
			||||||
        cancelButtonText: '取消',
 | 
					 | 
				
			||||||
        type: 'warning',
 | 
					 | 
				
			||||||
      }).then((_) => {
 | 
					 | 
				
			||||||
        this.download(
 | 
					 | 
				
			||||||
          '/scm/manage/product-bas/export',
 | 
					 | 
				
			||||||
          Object.assign({}, this.queryParams, this.select),
 | 
					 | 
				
			||||||
          `产品列表-${new Date().getTime()}.xlsx`
 | 
					 | 
				
			||||||
        )
 | 
					 | 
				
			||||||
      })
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    tableRowClassName({ row, rowIndex }) {
 | 
					 | 
				
			||||||
      if (rowIndex % 2 == 1) {
 | 
					 | 
				
			||||||
        return 'warning-row'
 | 
					 | 
				
			||||||
      } else if (rowIndex % 2 == 0) {
 | 
					 | 
				
			||||||
        return 'success-row'
 | 
					 | 
				
			||||||
      }
 | 
					 | 
				
			||||||
      return ''
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
</script>
 | 
					 | 
				
			||||||
<style scoped lang="scss">
 | 
					 | 
				
			||||||
::v-deep .el-table .warning-row {
 | 
					 | 
				
			||||||
  background: #f9f9f9;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
::v-deep .el-table .success-row {
 | 
					 | 
				
			||||||
  background: #ffffff;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
::v-deep .el-table thead {
 | 
					 | 
				
			||||||
  color: #000000;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
::v-deep .el-select {
 | 
					 | 
				
			||||||
  width: 100%;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
::v-deep .el-date-editor.el-input,
 | 
					 | 
				
			||||||
.el-date-editor.el-input__inner {
 | 
					 | 
				
			||||||
  width: 100%;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
.uploadIcon ::v-deep .el-upload--picture-card {
 | 
					 | 
				
			||||||
  display: none !important; /* 上传按钮隐藏 */
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
.page {
 | 
					 | 
				
			||||||
  padding: 20px;
 | 
					 | 
				
			||||||
  background: #f9f9f9;
 | 
					 | 
				
			||||||
  font-size: 14px;
 | 
					 | 
				
			||||||
  .main {
 | 
					 | 
				
			||||||
    display: flex;
 | 
					 | 
				
			||||||
    flex-direction: column;
 | 
					 | 
				
			||||||
    // background: #ffffff;
 | 
					 | 
				
			||||||
    border-radius: 8px;
 | 
					 | 
				
			||||||
    box-shadow: 0px 2px 20px 0px rgba(238, 238, 238, 0.5);
 | 
					 | 
				
			||||||
    .form_all {
 | 
					 | 
				
			||||||
      padding: 0 20px;
 | 
					 | 
				
			||||||
      margin-bottom: 10px;
 | 
					 | 
				
			||||||
      background: #fff;
 | 
					 | 
				
			||||||
      border-radius: 8px;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
    .main_a {
 | 
					 | 
				
			||||||
      display: flex;
 | 
					 | 
				
			||||||
      padding: 0px 20px 3px 0;
 | 
					 | 
				
			||||||
      justify-content: space-between;
 | 
					 | 
				
			||||||
      align-items: center;
 | 
					 | 
				
			||||||
      background: #fff;
 | 
					 | 
				
			||||||
      border-radius: 8px;
 | 
					 | 
				
			||||||
      .mainbtn {
 | 
					 | 
				
			||||||
        .thebtn1 {
 | 
					 | 
				
			||||||
          background: #3181e5;
 | 
					 | 
				
			||||||
          color: #ffffff;
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        .thebtn2 {
 | 
					 | 
				
			||||||
          background: #4391fd;
 | 
					 | 
				
			||||||
          color: #ffffff;
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        .thebtn3 {
 | 
					 | 
				
			||||||
          background: #6962f6;
 | 
					 | 
				
			||||||
          color: #ffffff;
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
      }
 | 
					 | 
				
			||||||
      .maintitle {
 | 
					 | 
				
			||||||
        font-size: 10px;
 | 
					 | 
				
			||||||
        font-family: MicrosoftYaHei;
 | 
					 | 
				
			||||||
        color: #999999;
 | 
					 | 
				
			||||||
      }
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
    .maintable {
 | 
					 | 
				
			||||||
      flex: 1;
 | 
					 | 
				
			||||||
      overflow-y: auto;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
  .tem {
 | 
					 | 
				
			||||||
    display: flex;
 | 
					 | 
				
			||||||
    align-items: center;
 | 
					 | 
				
			||||||
    justify-content: center;
 | 
					 | 
				
			||||||
    img {
 | 
					 | 
				
			||||||
      width: 28px;
 | 
					 | 
				
			||||||
      height: 20px;
 | 
					 | 
				
			||||||
      margin-right: 3px;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
  .isRed {
 | 
					 | 
				
			||||||
    color: #ed1d25;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
  .isGreen {
 | 
					 | 
				
			||||||
    color: #1ab62b;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
  .bgImg {
 | 
					 | 
				
			||||||
    width: 48px;
 | 
					 | 
				
			||||||
    height: 48px;
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
.openClose {
 | 
					 | 
				
			||||||
  margin-right: 10px;
 | 
					 | 
				
			||||||
  color: #666666;
 | 
					 | 
				
			||||||
  text-align: center;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
.btnHeng {
 | 
					 | 
				
			||||||
  display: flex;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
.btnHeng ::v-deep .el-button {
 | 
					 | 
				
			||||||
  padding: 0;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
</style>
 | 
					 | 
				
			||||||
| 
						 | 
					@ -44,9 +44,9 @@ module.exports = {
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    proxy: {
 | 
					    proxy: {
 | 
				
			||||||
      '/prod-api': {
 | 
					      '/prod-api': {
 | 
				
			||||||
        target: 'http://192.168.0.86:8080',
 | 
					        target: 'http://t-app.beida777.com',
 | 
				
			||||||
        changeOrigin: true,
 | 
					        changeOrigin: true
 | 
				
			||||||
        pathRewrite: { '^/prod-api': '' }
 | 
					        // pathRewrite: { '^/prod-api': '' }
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue