huangmp 2 лет назад
Родитель
Сommit
974df04402

+ 1 - 1
.env.development

@@ -13,5 +13,5 @@ VUE_APP_IM_API = 'http://127.0.0.1:8089'
 VUE_APP_WS_IM_API = 'ws://127.0.0.1:8089'
 VUE_APP_WS_IM_API = 'ws://127.0.0.1:8089'
 // 静态资源文件url
 // 静态资源文件url
 //VUE_APP_RESOURCES_URL = 'https://img.mall4j.com/'
 //VUE_APP_RESOURCES_URL = 'https://img.mall4j.com/'
-VUE_APP_RESOURCES_URL = 'https://sdmall-oss.yinkaprint.com/'
+VUE_APP_RESOURCES_URL = 'https://ecard-oss.58for.com/'
 
 

+ 3 - 2
src/views/modules/order/order.vue

@@ -216,6 +216,7 @@
               size="small"
               size="small"
               v-model="dateRange"
               v-model="dateRange"
               type="datetimerange"
               type="datetimerange"
+              :default-time="['00:00:00', '23:59:59']"
               :range-separator="this.$i18n.t('time.tip')"
               :range-separator="this.$i18n.t('time.tip')"
               value-format="yyyy-MM-dd HH:mm:ss"
               value-format="yyyy-MM-dd HH:mm:ss"
               :start-placeholder="this.$i18n.t('time.start')"
               :start-placeholder="this.$i18n.t('time.start')"
@@ -966,7 +967,7 @@
     <order-info ref="orderInfo" @orderAuditStatusUpdate="handleOrderAuditStatusUpdate"></order-info>
     <order-info ref="orderInfo" @orderAuditStatusUpdate="handleOrderAuditStatusUpdate"></order-info>
     <orderPromotion ref="orderPromotion" ></orderPromotion>
     <orderPromotion ref="orderPromotion" ></orderPromotion>
     <el-dialog
     <el-dialog
-    title="批量生成PDF"
+    title="批量生成打印单"
     :modal="false"
     :modal="false"
     top="200px"
     top="200px"
     :close-on-click-modal="false"
     :close-on-click-modal="false"
@@ -1182,7 +1183,7 @@ export default {
       infoWidth: '400px',
       infoWidth: '400px',
       generatePrintPdfBatchVisible: false,
       generatePrintPdfBatchVisible: false,
       orderCreateBatchVisible: false,
       orderCreateBatchVisible: false,
-      printChannel: "GSART",
+      printChannel: "Lightning",
       orderCreateBatchLoading: false
       orderCreateBatchLoading: false
     }
     }
   },
   },

+ 2 - 1
src/views/modules/order/orderInfo.vue

@@ -810,7 +810,7 @@
        :close-on-click-modal="false"
        :close-on-click-modal="false"
        :close-on-press-escape="false">
        :close-on-press-escape="false">
        <el-form :model="dataForm" label-position="right">
        <el-form :model="dataForm" label-position="right">
-         <el-form-item label="备注" label-width="70px">
+         <el-form-item label="下单时间" label-width="70px">
            <el-date-picker v-model="dataForm.createTime"
            <el-date-picker v-model="dataForm.createTime"
                            type="datetime"
                            type="datetime"
                            :placeholder="this.$i18n.t('admin.seleData')"
                            :placeholder="this.$i18n.t('admin.seleData')"
@@ -1067,6 +1067,7 @@ export default {
             message: "修改成功",
             message: "修改成功",
             type: 'success'
             type: 'success'
           })
           })
+          this.modifyCreateTimeVisible = false;
         }else{
         }else{
           this.$message({
           this.$message({
             message: "修改失败",
             message: "修改失败",

+ 162 - 0
src/views/modules/print/third-print-sku-add-or-update.vue

@@ -0,0 +1,162 @@
+<template>
+  <el-dialog
+    :title="!dataForm.templateId ? this.$i18n.t('crud.addTitle') : this.$i18n.t('temp.modify')"
+    :close-on-click-modal="false"
+    :visible.sync="visible">
+    <el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="100px">
+      <el-form-item label="三方skuID" prop="thirdSkuId">
+        <el-input v-model="dataForm.thirdSkuId" style="width: 185px"/>
+      </el-form-item>
+      <el-form-item label="三方sku名称" prop="thirdSkuName">
+        <el-input v-model="dataForm.thirdSkuName" style="width: 185px"/>
+      </el-form-item>
+      <!-- 产品类型 -->
+      <el-form-item label="产品类型" prop="prodType">
+        <el-select v-model="dataForm.prodType" clearable filterable >
+          <el-option key="smallcard" label="小卡" value="smallcard"></el-option>
+          <el-option key="squarecard" label="方卡" value="squarecard"></el-option>
+          <el-option key="badge" label="马口铁徽章" value="badge"></el-option>
+          <el-option key="plushbadge" label="毛绒徽章" value="plushbadge"></el-option>
+          <el-option key="postcard" label="明信片" value="postcard"></el-option>
+          <el-option key="bookmark" label="书签" value="bookmark"></el-option>
+          <el-option key="tipscard" label="迷你手幅" value="tipscard"></el-option>
+          <el-option key="polaroid" label="花式拍立得" value="polaroid"></el-option>
+          <el-option key="covercard" label="直拍封面" value="covercard"></el-option>
+          <el-option key="stub" label="票根" value="stub"></el-option>
+          <el-option key="transformcard" label="变换卡" value="transformcard"></el-option>
+          <el-option key="transpolaroid" label="透明胶片拍立得" value="transpolaroid"></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item label="关联产品" prop="prodId">
+        <el-select v-model="dataForm.prodId" clearable filterable @change="prodChange">
+          <el-option v-for="(item, index) in prodList"
+             :key="index"
+             :label="item.prodName"
+             :value="item.prodId">
+          </el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item label="产品SKU" prop="skuId">
+        <el-select v-model="dataForm.skuId" clearable filterable>
+          <el-option v-for="(item, index) in skuList"
+               :key="index"
+               :label="item.skuName"
+               :value="item.skuId">
+          </el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item label="三方产品类型编号" prop="prodTypeNo">
+        <el-input v-model="dataForm.prodTypeNo" style="width: 185px"/>
+      </el-form-item>
+      <el-form-item label="三方SKU编号" prop="skuNo">
+        <el-input v-model="dataForm.skuNo" style="width: 185px"/>
+      </el-form-item>
+      <el-form-item label="产品角型" prop="prodAngle">
+        <el-select v-model="dataForm.prodAngle" clearable filterable>
+          <el-option key="1" lable="圆角" value="圆角"/>
+          <el-option key="2" lable="直角" value="直角"/>
+        </el-select>
+      </el-form-item>
+
+    </el-form>
+    <span slot="footer" class="dialog-footer">
+      <el-button class="default-btn" @click="visible = false">{{$t("crud.filter.cancelBtn")}}</el-button>
+      <el-button class="default-btn primary-btn" type="primary" @click="dataFormSubmit()">{{$t("crud.filter.submitBtn")}}</el-button>
+    </span>
+  </el-dialog>
+</template>
+
+<script>
+export default {
+  data () {
+    return {
+      visible: false,
+      dataForm: {
+        id: null,
+        prodId: null,
+        prodType: null,
+        thirdSkuName: null,
+        skuId: null,
+        thirdSkuId: null,
+        prodTypeNo: null,
+        prodAngle: null,
+        skuNo: null,
+        prodName: null,
+      },
+      prodList: [],
+      skuList: [],
+      dataRule: {
+      }
+    }
+  },
+  created(){
+    this.getProdList();
+  },
+  methods: {
+    init (id) {
+      this.dataForm.id = id || 0
+      this.visible = true
+      this.$nextTick(() => {
+        this.$refs['dataForm'].resetFields()
+        if (this.dataForm.id) {
+          this.$http({
+            url: this.$http.adornUrl('/prod/thirdPrintSku/info/' + this.dataForm.id),
+            method: 'get',
+            params: this.$http.adornParams()
+          }).then(({data}) => {
+            this.dataForm = data
+          })
+        }
+      })
+    },
+    prodChange(prodId){
+      this.prodList.map(item =>{
+        if(item.prodId === prodId){
+          this.dataForm.prodName = item.prodName;
+        }
+      });
+      this.getSkuList()
+    },
+    getSkuList(){
+      this.$http({
+        url: this.$http.adornUrl('/sku/getEnableSkuList'),
+        method: 'GET',
+        params: this.$http.adornParams({prodId:this.dataForm.prodId})
+      }).then(({data}) => {
+        this.skuList = data
+      })
+    },
+    getProdList(){
+      this.$http({
+        url: this.$http.adornUrl('/prod/prod/simpleList'),
+        method: 'GET',
+        params: this.$http.adornParams({customized:0})
+      }).then(({data}) => {
+        this.prodList = data
+      })
+    },
+    // 表单提交
+    dataFormSubmit () {
+      this.$refs['dataForm'].validate((valid) => {
+        if (valid) {
+          this.$http({
+            url: this.$http.adornUrl('/prod/thirdPrintSku'),
+            method: this.dataForm.id ? 'put' : 'post',
+            data: this.$http.adornData(this.dataForm)
+          }).then(({data}) => {
+            this.$message({
+              message: this.$i18n.t('publics.operation'),
+              type: 'success',
+              duration: 200,
+              onClose: () => {
+                this.visible = false
+                this.$emit('refreshDataList')
+              }
+            })
+          })
+        }
+      })
+    }
+  }
+}
+</script>

+ 253 - 0
src/views/modules/print/third-print-sku.vue

@@ -0,0 +1,253 @@
+<template>
+  <div class="mod-print-printPicLib">
+    <!-- 搜索相关区域 -->
+    <div class="search-bar">
+      <el-form :inline="true" class="search-form" ref="searchForm" :model="searchForm" label-width="auto" size="small">
+        <div class="input-row">
+          <el-form-item prop="prodType" label="产品类型" class="search-form-item">
+            <el-select v-model="searchForm.prodType" clearable filterable >
+              <el-option key="smallcard" label="小卡" value="smallcard"></el-option>
+              <el-option key="squarecard" label="方卡" value="squarecard"></el-option>
+              <el-option key="badge" label="马口铁徽章" value="badge"></el-option>
+              <el-option key="plushbadge" label="毛绒徽章" value="plushbadge"></el-option>
+              <el-option key="postcard" label="明信片" value="postcard"></el-option>
+              <el-option key="bookmark" label="书签" value="bookmark"></el-option>
+              <el-option key="tipscard" label="迷你手幅" value="tipscard"></el-option>
+              <el-option key="polaroid" label="花式拍立得" value="polaroid"></el-option>
+              <el-option key="covercard" label="直拍封面" value="covercard"></el-option>
+              <el-option key="stub" label="票根" value="stub"></el-option>
+              <el-option key="transformcard" label="变换卡" value="transformcard"></el-option>
+              <el-option key="transpolaroid" label="透明胶片拍立得" value="transpolaroid"></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item prop="prodAngle" label="产品角型" class="search-form-item">
+            <el-select v-model="searchForm.prodAngle" clearable filterable >
+              <el-option key="1" label="圆角" value="圆角"></el-option>
+              <el-option key="2" label="直角" value="直角"></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item prop="prodId" label="产品名称" class="search-form-item">
+            <el-select v-model="searchForm.prodId" clearable filterable >
+              <el-option v-for="(item, index) in prodList"
+                         :key="index" :label="item.prodName" :value="item.prodId"></el-option>
+            </el-select>
+          </el-form-item>
+          <div class="default-btn primary-btn" @click="searchChange">{{$t('crud.searchBtn')}}</div>
+          <div class="default-btn" @click="resetSearchForm('searchForm')">{{$t('shop.resetMap')}}</div>
+        </div>
+
+      </el-form>
+    </div>
+    <!-- 列表相关区域 -->
+    <div class="main-container">
+      <div class="operation-bar">
+        <div class="default-btn primary-btn" @click="addOrUpdateHandle()">{{$t("crud.addTitle")}}</div>
+      </div>
+      <div class="table-con spec-table">
+        <el-table
+          ref="specListTable"
+          :data="dataList"
+          header-cell-class-name="table-header"
+          row-class-name="table-row"
+          style="width: 100%">
+          <!-- 正面图 -->
+          <el-table-column label="三方skuId" prop="thirdSkuId" align="center">
+            <template slot-scope="scope">
+              <span>{{scope.row.thirdSkuId}}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="三方SKU名称" prop="thirdSkuName" align="center">
+            <template slot-scope="scope">
+              <span>{{scope.row.thirdSkuName}}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="三方SKU编号" prop="skuNo" align="center">
+            <template slot-scope="scope">
+              <span>{{scope.row.skuNo}}</span>
+            </template>
+          </el-table-column>
+          <!-- 背面图 -->
+          <el-table-column label="产品类型" prop="prodType" align="center">
+            <template slot-scope="scope">
+              <span v-if="scope.row.prodType === 'smallcard'">小卡</span>
+              <span v-if="scope.row.prodType === 'squarecard'">方卡</span>
+              <span v-if="scope.row.prodType === 'badge'">马口铁徽章</span>
+              <span v-if="scope.row.prodType === 'plushbadge'">毛绒徽章</span>
+              <span v-if="scope.row.prodType === 'postcard'">明信片</span>
+              <span v-if="scope.row.prodType === 'bookmark'">书签</span>
+              <span v-if="scope.row.prodType === 'tipscard'">迷你手幅</span>
+              <span v-if="scope.row.prodType === 'polaroid'">仿拍立得</span>
+              <span v-if="scope.row.prodType === 'covercard'">直拍封面</span>
+              <span v-if="scope.row.prodType === 'stub'">票根</span>
+              <span v-if="scope.row.prodType === 'transformcard'">变换卡</span>
+              <span v-if="scope.row.prodType === 'transpolaroid'">透明胶片拍立得</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="产品类型名称" prop="prodName" align="center">
+            <template slot-scope="scope">
+              <span>{{scope.row.prodName}}</span>
+            </template>
+          </el-table-column>
+          <el-table-column label="产品角型" prop="prodAngle" align="center">
+            <template slot-scope="scope">
+              <span>{{scope.row.prodAngle}}</span>
+            </template>
+          </el-table-column>
+
+          <!--&lt;!&ndash; 关联的产品ID &ndash;&gt;
+          <el-table-column label="关联产品" prop="prodId" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.prodId}}</span>
+            </template>
+          </el-table-column>-->
+          <!-- 产品名称 -->
+          <el-table-column label="关联产品" prop="prodName" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.prodName}}</span>
+            </template>
+          </el-table-column>
+          <el-table-column align="center" fixed="right" :label="$t('publics.operating')" width="auto">
+            <template slot-scope="scope">
+              <div class="text-btn-con">
+                <div class="default-btn text-btn" @click="addOrUpdateHandle(scope.row.id)">{{$t("crud.updateBtn")}}</div>
+                <div class="default-btn text-btn" @click.stop="deleteHandle(scope.row.id)">{{$t("text.delBtn")}}</div>
+                </div>
+            </template>
+          </el-table-column>
+        </el-table>
+      </div>
+        <el-pagination
+          v-if="dataList.length"
+          @size-change="handleSizeChange"
+          @current-change="handleCurrentChange"
+          :current-page="page.currentPage"
+          :page-sizes="[10, 20, 50, 100]"
+          :page-size="page.pageSize"
+          layout="total, sizes, prev, pager, next, jumper"
+          :total="page.total">
+        </el-pagination>
+      </div>
+    <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="refreshChange"></add-or-update>
+    <el-dialog :visible.sync="previewPicDialogVisible" :modal="false" title="图片预览" width="30%" top="3vh">
+      <el-image :src="previewPicUrl" alt=""  style="width: 100%; height: 100%"/>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import AddOrUpdate from './third-print-sku-add-or-update'
+export default {
+  data () {
+    return {
+      dataList: [],
+      page: {
+        total: 0, // 总页数
+        currentPage: 1, // 当前页数
+        pageSize: 10 // 每页显示多少条
+      },
+      prodList:[],
+      previewPicUrl: null,
+      previewPicDialogVisible: false,
+      resourcesUrl: process.env.VUE_APP_RESOURCES_URL,
+      searchForm: {
+        prodType: null,
+        prodId: null,
+        prodAngle: null
+      }, // 搜索
+      dataListLoading: false,
+      addOrUpdateVisible: false
+    }
+  },
+  components: {
+    AddOrUpdate
+  },
+  created () {
+    this.getDataList();
+    this.getProdList();
+  },
+  mounted () {
+  },
+  methods: {
+    getProdList(){
+      this.$http({
+        url: this.$http.adornUrl('/prod/prod/simpleList'),
+        method: 'GET',
+        params: this.$http.adornParams({customized:0})
+      }).then(({data}) => {
+        this.prodList = data
+      })
+    },
+    resetSearchForm (formName) {
+      this.$refs[formName].resetFields()
+    },
+    getDataList (page) {
+      this.dataListLoading = true
+      this.$http({
+        url: this.$http.adornUrl('/prod/thirdPrintSku/page'),
+        method: 'get',
+        params: this.$http.adornParams(
+          Object.assign({
+            current: page == null ? this.page.currentPage : page.currentPage,
+            size: page == null ? this.page.pageSize : page.pageSize
+          },
+            this.searchForm
+          )
+        )
+      }).then(({data}) => {
+        this.dataList = data.records
+        this.page.total = data.total
+        this.dataListLoading = false
+      })
+    },
+    // 新增 / 修改
+    addOrUpdateHandle (id) {
+      this.addOrUpdateVisible = true
+      this.$nextTick(() => {
+        this.$refs.addOrUpdate.init(id)
+      })
+    },
+    deleteHandle (id) {
+      this.$confirm(this.$i18n.t('admin.isDeleOper') + '?', this.$i18n.t('text.tips'), {
+        confirmButtonText: this.$i18n.t('crud.filter.submitBtn'),
+        cancelButtonText: this.$i18n.t('crud.filter.cancelBtn'),
+        type: 'warning'
+      }).then(() => {
+        this.$http({
+          url: this.$http.adornUrl('/print/printPicLib/' + id),
+          method: 'delete',
+          data: this.$http.adornData({})
+        }).then(({ data }) => {
+          this.$message({
+            message: this.$i18n.t('publics.operation'),
+            type: 'success',
+            duration: 200,
+            onClose: () => {
+              this.refreshChange()
+            }
+          })
+        })
+      }).catch(() => { })
+    },
+    // 刷新回调
+    refreshChange () {
+      this.page.currentPage = 1
+      this.getDataList(this.page)
+    },
+    searchChange (params) {
+      this.getDataList(this.page)
+    },
+    handleSizeChange (val) {
+      this.page.pageSize = val
+      this.getDataList()
+    },
+    handleCurrentChange (val) {
+      this.page.currentPage = val
+      this.getDataList()
+    }
+  }
+}
+</script>
+<style lang="scss">
+.mod-print-printPicLib {
+}
+</style>

+ 130 - 0
src/views/modules/prod/printPicLib-add-or-update.vue

@@ -0,0 +1,130 @@
+<template>
+  <el-dialog
+    :title="!dataForm.templateId ? this.$i18n.t('crud.addTitle') : this.$i18n.t('temp.modify')"
+    :close-on-click-modal="false"
+    :visible.sync="visible">
+    <el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()" label-width="100px">
+      <el-form-item label="关联产品" prop="prodId">
+        <el-select v-model="dataForm.prodId" clearable filterable @change="prodChange">
+          <el-option v-for="(item, index) in prodList"
+             :key="index"
+             :label="item.prodName"
+             :value="item.prodId">
+          </el-option>
+        </el-select>
+      </el-form-item>
+      <el-row>
+        <el-col :span="6">
+            <el-form-item label="正面" prop="frontUrl">
+              <img-upload v-model="dataForm.frontUrl" :limit="1"></img-upload>
+            </el-form-item>
+          </el-col>
+        <el-col :span="6">
+          <el-form-item label="背面" prop="backUrl">
+            <img-upload v-model="dataForm.backUrl" :limit="1"></img-upload>
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <el-form-item label="是否禁用" prop="isDelete">
+        <el-select v-model="dataForm.isDelete" clearable filterable>
+          <el-option key="1" label="启用" :value=0 ></el-option>
+          <el-option key="0" label="禁用" :value=1 ></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item label="排序" prop="seq">
+        <el-input v-model="dataForm.seq" style="width: 185px" type="number"/>
+      </el-form-item>
+    </el-form>
+    <span slot="footer" class="dialog-footer">
+      <el-button class="default-btn" @click="visible = false">{{$t("crud.filter.cancelBtn")}}</el-button>
+      <el-button class="default-btn primary-btn" type="primary" @click="dataFormSubmit()">{{$t("crud.filter.submitBtn")}}</el-button>
+    </span>
+  </el-dialog>
+</template>
+
+<script>
+  import ImgUpload from '@/components/imgs-upload'
+export default {
+  components: {
+    ImgUpload
+  },
+  data () {
+    return {
+      visible: false,
+      dataForm: {
+        id: null,
+        frontUrl: null,
+        backUrl: null,
+        prodId: null,
+        prodName: null,
+        seq: null,
+        isDelete: 0,
+      },
+      prodList: [],
+      dataRule: {
+      }
+    }
+  },
+  created(){
+    this.getProdList();
+  },
+  methods: {
+    init (id) {
+      this.dataForm.id = id || 0
+      this.visible = true
+      this.$nextTick(() => {
+        this.$refs['dataForm'].resetFields()
+        if (this.dataForm.id) {
+          this.$http({
+            url: this.$http.adornUrl('/print/printPicLib/info/' + this.dataForm.id),
+            method: 'get',
+            params: this.$http.adornParams()
+          }).then(({data}) => {
+            this.dataForm = data
+          })
+        }
+      })
+    },
+    prodChange(prodId){
+      this.prodList.map(item =>{
+        if(item.prodId === prodId){
+          this.dataForm.prodName = item.prodName;
+        }
+      })
+      // this.dataForm.prodId = prod.value;
+      // this.dataForm.prodName = prod.label;
+    },
+    getProdList(){
+      this.$http({
+        url: this.$http.adornUrl('/prod/prod/simpleList'),
+        method: 'GET',
+        params: this.$http.adornParams({customized:0})
+      }).then(({data}) => {
+        this.prodList = data
+      })
+    },
+    // 表单提交
+    dataFormSubmit () {
+      this.$refs['dataForm'].validate((valid) => {
+        if (valid) {
+          this.$http({
+            url: this.$http.adornUrl('/print/printPicLib'),
+            method: this.dataForm.id ? 'put' : 'post',
+            data: this.$http.adornData(this.dataForm)
+          }).then(({data}) => {
+            this.$message({
+              message: this.$i18n.t('publics.operation'),
+              type: 'success',
+              duration: 1500,
+              onClose: () => {
+                this.visible = false
+                this.$emit('refreshDataList')
+              }
+            })
+          })
+        }
+      })
+    }
+  }
+}
+</script>

+ 199 - 0
src/views/modules/prod/printPicLib.vue

@@ -0,0 +1,199 @@
+<template>
+  <div class="mod-print-printPicLib">
+    <!-- 搜索相关区域 -->
+    <div class="search-bar">
+      <el-button class="default-btn primary-btn" @click="searchChange">{{$t('crud.searchBtn')}}</el-button>
+    </div>
+    <!-- 列表相关区域 -->
+    <div class="main-container">
+      <div class="operation-bar">
+        <div class="default-btn primary-btn" @click="addOrUpdateHandle()">{{$t("crud.addTitle")}}</div>
+      </div>
+      <div class="table-con spec-table">
+        <el-table
+          ref="specListTable"
+          :data="dataList"
+          header-cell-class-name="table-header"
+          row-class-name="table-row"
+          style="width: 100%">
+          <!-- 正面图 -->
+          <el-table-column label="正面" prop="frontUrl" align="center">
+            <template slot-scope="scope">
+              <el-image
+                style="width: 100px; height: 100px"
+                :src="resourcesUrl + scope.row.frontUrl"
+                v-if="scope.row.frontUrl"
+                fit="fill"
+                @click="previewPic(scope.row.frontUrl)"
+              />
+            </template>
+          </el-table-column>
+          <!-- 背面图 -->
+          <el-table-column label="背面" prop="backUrl" align="center">
+            <template slot-scope="scope">
+              <el-image
+                style="width: 100px; height: 100px"
+                :src="resourcesUrl + scope.row.backUrl"
+                v-if="scope.row.backUrl"
+                fit="fill"
+                @click="previewPic(scope.row.backUrl)"
+              />
+            </template>
+          </el-table-column>
+          <!--&lt;!&ndash; 关联的产品ID &ndash;&gt;
+          <el-table-column label="关联产品" prop="prodId" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.prodId}}</span>
+            </template>
+          </el-table-column>-->
+          <!-- 产品名称 -->
+          <el-table-column label="关联产品" prop="prodName" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.prodName}}</span>
+            </template>
+          </el-table-column>
+          <!-- 排序序号 -->
+          <el-table-column label="序号" prop="seq" align="center">
+            <template slot-scope="scope">
+              <span>{{ scope.row.seq}}</span>
+            </template>
+          </el-table-column>
+          <!-- 是否删除,0正常,1删除 -->
+          <el-table-column label="是否删除" prop="isDelete" align="center">
+            <template slot-scope="scope">
+              <el-tag v-if="scope.row.isDelete === 1" type="danger">已删除</el-tag>
+              <el-tag v-if="scope.row.isDelete === 0" type="success">正常</el-tag>
+            </template>
+          </el-table-column>
+          <el-table-column align="center" fixed="right" :label="$t('publics.operating')" width="auto">
+            <template slot-scope="scope">
+              <div class="text-btn-con">
+                <div class="default-btn text-btn" @click="addOrUpdateHandle(scope.row.id)">{{$t("crud.updateBtn")}}</div>
+                <div class="default-btn text-btn" @click.stop="deleteHandle(scope.row.id)">{{$t("text.delBtn")}}</div>
+                </div>
+            </template>
+          </el-table-column>
+        </el-table>
+      </div>
+        <el-pagination
+          v-if="dataList.length"
+          @size-change="handleSizeChange"
+          @current-change="handleCurrentChange"
+          :current-page="page.currentPage"
+          :page-sizes="[10, 20, 50, 100]"
+          :page-size="page.pageSize"
+          layout="total, sizes, prev, pager, next, jumper"
+          :total="page.total">
+        </el-pagination>
+      </div>
+    <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="refreshChange"></add-or-update>
+    <el-dialog :visible.sync="previewPicDialogVisible" :modal="false" title="图片预览" width="30%" top="3vh">
+      <el-image :src="previewPicUrl" alt=""  style="width: 100%; height: 100%"/>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import AddOrUpdate from './printPicLib-add-or-update'
+export default {
+  data () {
+    return {
+      dataList: [],
+      page: {
+        total: 0, // 总页数
+        currentPage: 1, // 当前页数
+        pageSize: 10 // 每页显示多少条
+      },
+      previewPicUrl: null,
+      previewPicDialogVisible: false,
+      resourcesUrl: process.env.VUE_APP_RESOURCES_URL,
+      searchForm: {}, // 搜索
+      dataListLoading: false,
+      addOrUpdateVisible: false
+    }
+  },
+  components: {
+    AddOrUpdate
+  },
+  created () {
+    this.getDataList();
+  },
+  mounted () {
+  },
+  methods: {
+    previewPic(url){
+      this.previewPicUrl = this.resourcesUrl + url
+      this.previewPicDialogVisible = true;
+    },
+    getDataList (page) {
+      this.dataListLoading = true
+      this.$http({
+        url: this.$http.adornUrl('/print/printPicLib/page'),
+        method: 'get',
+        params: this.$http.adornParams(
+          Object.assign({
+            current: page == null ? this.page.currentPage : page.currentPage,
+            size: page == null ? this.page.pageSize : page.pageSize
+          },
+            this.searchForm
+          )
+        )
+      }).then(({data}) => {
+        this.dataList = data.records
+        this.page.total = data.total
+        this.dataListLoading = false
+      })
+    },
+    // 新增 / 修改
+    addOrUpdateHandle (id) {
+      this.addOrUpdateVisible = true
+      this.$nextTick(() => {
+        this.$refs.addOrUpdate.init(id)
+      })
+    },
+    deleteHandle (id) {
+      this.$confirm(this.$i18n.t('admin.isDeleOper') + '?', this.$i18n.t('text.tips'), {
+        confirmButtonText: this.$i18n.t('crud.filter.submitBtn'),
+        cancelButtonText: this.$i18n.t('crud.filter.cancelBtn'),
+        type: 'warning'
+      }).then(() => {
+        this.$http({
+          url: this.$http.adornUrl('/print/printPicLib/' + id),
+          method: 'delete',
+          data: this.$http.adornData({})
+        }).then(({ data }) => {
+          this.$message({
+            message: this.$i18n.t('publics.operation'),
+            type: 'success',
+            duration: 1500,
+            onClose: () => {
+              this.refreshChange()
+            }
+          })
+        })
+      }).catch(() => { })
+    },
+    // 刷新回调
+    refreshChange () {
+      this.page.currentPage = 1
+      this.getDataList(this.page)
+    },
+    searchChange (params) {
+      this.searchForm = params
+      this.getDataList(this.page)
+    },
+    handleSizeChange (val) {
+      this.page.pageSize = val
+      this.getDataList()
+    },
+    handleCurrentChange (val) {
+      this.page.currentPage = val
+      this.getDataList()
+    }
+  }
+}
+</script>
+<style lang="scss">
+.mod-print-printPicLib {
+}
+</style>

+ 3 - 0
src/views/modules/prod/prodTemplate-add-or-update.vue

@@ -134,6 +134,9 @@ export default {
           }else if(templateUsage.indexOf("stub") !== -1){
           }else if(templateUsage.indexOf("stub") !== -1){
             width = 780;
             width = 780;
             height = 1489;
             height = 1489;
+          }else if(templateUsage.indexOf("postcard") !== -1){
+            width = 1819;
+            height = 1252;
           }
           }
           if (image.width === width && image.height === height) {
           if (image.width === width && image.height === height) {
             resolve();
             resolve();