yusheng hai 1 ano
pai
achega
d855f40255

+ 1 - 1
src/BIZComponents/innerdetails.vue

@@ -206,7 +206,7 @@
             <el-table-column label="单价" prop="price" align="center">
               <template slot-scope="{ row }">
                 <template>
-                  {{ row.price ? row.price : '-' + '元' }}/{{ row.measureUnit }}
+                  {{ row.price ? row.price : ' ' + '元' }}/{{ row.measureUnit }}
                 </template>
               </template>
             </el-table-column>

+ 1 - 1
src/BIZComponents/outdetails.vue

@@ -244,7 +244,7 @@
             <el-table-column label="单价" prop="price" align="center">
               <template slot-scope="{ row }">
                 <template>
-                  {{ row.price ? row.price : '-' + '元' }}/{{ row.measureUnit }}
+                  {{ row.price ? row.price : ' ' + '元' }}/{{ row.measureUnit }}
                 </template>
               </template>
             </el-table-column>

+ 2 - 2
src/views/commodityManagement/commodityPriceList/components/addDialog.vue

@@ -211,9 +211,9 @@
       ></BIZproductList>
     </el-form>
     <headerTitle title="价格"></headerTitle>
-    <ProductTable ref="inventoryTable" />
+    <ProductTable ref="inventoryTable" :type="type" />
     <template slot="footer">
-      <el-button type="primary" @click="save">保存</el-button>
+      <el-button type="primary" @click="save" v-if="type != 'view'">保存</el-button>
       <el-button @click="cancel">返回</el-button>
     </template>
   </ele-modal>

+ 7 - 5
src/views/commodityManagement/commodityPriceList/components/productTable.vue

@@ -17,13 +17,13 @@
             icon="el-icon-plus"
             class="ele-btn-icon"
             @click="handParent()"
-          
+            v-if="type != 'view'"
           >
             新增
           </el-button>
         </div>
       </template>
-      <template v-slot:unitPrice="scope">
+      <template v-slot:unitPrice="scope"  v-if="type != 'view'">
         <el-form-item
           style="margin-bottom: 20px"
           :prop="'datasource.' + scope.$index + '.unitPrice'"
@@ -31,6 +31,7 @@
             required: true,
             message: '请输入正确的单价',
             trigger: 'change'
+            
           }"
         >
           <el-input
@@ -43,7 +44,7 @@
           </el-input>
         </el-form-item>
       </template>
-      <template v-slot:taxRate="scope">
+      <template v-slot:taxRate="scope"  v-if="type != 'view'">
         <el-form-item
           style="margin-bottom: 20px"
           :prop="'datasource.' + scope.$index + '.taxRate'"
@@ -73,6 +74,7 @@
             clearable
             v-model="scope.row.priceType"
             :listFormatte="listFormatte"
+            :disabled="type=='view'"
           >
           </DictSelection>
         </el-form-item>
@@ -91,7 +93,7 @@
         <span class="is-required">{{ column.label }}</span>
       </template>
       <!-- 操作列 -->
-      <template v-slot:action="scope">
+      <template v-slot:action="scope" v-if="type != 'view'">
         <el-popconfirm
           class="ele-action"
           title="确定要删除吗?"
@@ -121,7 +123,7 @@
   export default {
     components: {},
     mixins: [dictMixins],
-    props: { groupId: String },
+    props: { groupId: String, type: String },
     data() {
       return {
         title: '',

+ 52 - 13
src/views/commodityManagement/commodityPriceList/index.vue

@@ -116,7 +116,7 @@
               <el-link
                 type="primary"
                 :underline="false"
-                @click="openEdit('view',row)"
+                @click="openEdit('view', row)"
               >
                 {{ row.goodsName }}</el-link
               >
@@ -147,8 +147,8 @@
             <!-- 操作列 -->
             <template v-slot:action="{ row }">
               <el-link
-                @click="editGoodsStatus(row)"
-                v-if="row.goodsStatus == 0"
+                @click="submit(row)"
+                v-if="row.goodsStatus == 0&&[0,3].includes(row.approvalStatus)"
                 type="primary"
                 :underline="false"
                 icon="el-icon-sort-up"
@@ -168,7 +168,7 @@
                 @click="openEditGoodsInfo(row)"
                 type="primary"
                 :underline="false"
-                v-if="row.goodsStatus == 0"
+                v-if="row.goodsStatus == 0&&[0,3].includes(row.approvalStatus)"
               >
                 修改
               </el-link>
@@ -176,7 +176,7 @@
                 class="ele-action"
                 title="确定要删除此信息吗?"
                 @confirm="commitBtn([row.id])"
-                v-if="row.goodsStatus == 0"
+                v-if="row.goodsStatus == 0&&[0,3].includes(row.approvalStatus)"
               >
                 <template v-slot:reference>
                   <el-link type="danger" :underline="false"> 删除 </el-link>
@@ -187,7 +187,13 @@
         </template>
       </ele-split-layout>
     </el-card>
-
+    <process-submit-dialog
+      :isNotNeedProcess="false"
+      :processSubmitDialogFlag.sync="processSubmitDialogFlag"
+      v-if="processSubmitDialogFlag"
+      ref="processSubmitDialogRef"
+      @reload="reload"
+    ></process-submit-dialog>
     <AddDialog ref="addContactDialogRef" @done="reload"></AddDialog>
     <EditPriceDialog ref="editPriceDialogRef" @done="reload"> </EditPriceDialog>
     <HistoricalpriceDialog
@@ -206,6 +212,8 @@
   import tabMixins from '@/mixins/tableColumnsMixin';
   import { getList, del, offOnSheft } from '@/api/goodsManage/index';
   import dictMixins from '@/mixins/dictMixins';
+  import processSubmitDialog from '@/BIZComponents/processSubmitDialog/processSubmitDialog.vue';
+  import { reviewStatus } from '@/enum/dict';
 
   export default {
     mixins: [tabMixins, dictMixins],
@@ -214,12 +222,13 @@
       PriceSearch,
       AddDialog,
       EditPriceDialog,
-      HistoricalpriceDialog
+      HistoricalpriceDialog,processSubmitDialog
     },
     data() {
       return {
         locationUrl: window.location.origin,
         loading: false,
+        processSubmitDialogFlag:false,
         cacheKeyUrl: 'eos-01283c34-commodityManagement-commodityPriceList',
         // 表格列配置
         columns: [
@@ -228,8 +237,8 @@
             type: 'selection',
             columnKey: 'selection',
             align: 'center',
-            selectable:(row)=>{
-              return row.goodsStatus==0
+            selectable: (row) => {
+              return row.goodsStatus == 0;
             }
           },
           {
@@ -266,9 +275,10 @@
             prop: 'goodsName',
             label: '商品名称',
             align: 'center',
-            slot:'goodsName',
+            slot: 'goodsName',
             showOverflowTooltip: true,
-            width: 180
+            minWidth: 180
+
           },
           {
             prop: 'categoryLevelName',
@@ -282,7 +292,7 @@
             align: 'center',
             label: '产品名称',
             showOverflowTooltip: true,
-            width: 180
+            minWidth: 180
           },
           // {
           //   prop: '产品编码',
@@ -331,6 +341,7 @@
           {
             prop: 'goodsStatus',
             align: 'center',
+            width: 150,
             label: '状态',
             showOverflowTooltip: true,
             formatter: (row, column) => {
@@ -341,6 +352,16 @@
                 : '';
             }
           },
+          {
+            prop: 'approvalStatus',
+            label: '审核状态',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 100,
+            formatter: (_row, _column, cellValue) => {
+              return reviewStatus[_row.approvalStatus];
+            }
+          },
           {
             prop: 'createTime',
             label: '创建时间',
@@ -415,6 +436,24 @@
         this.$refs.editPriceDialogRef.$refs.form &&
           this.$refs.editPriceDialogRef.$refs.form.clearValidate();
       },
+
+      async submit(res) {
+        this.processSubmitDialogFlag=true
+        this.$nextTick(() => {
+          let params = {
+            businessId: res.id,
+            businessKey: 'goods_manage_priceOffOnSheft_on',
+            formCreateUserId: res.createUserId,
+            variables: {
+              businessCode: res.goodsCode,
+              businessName: res.goodsName,
+              businessType: res.categoryLevelName
+            }
+          };
+          this.$refs.processSubmitDialogRef.init(params);
+        });
+      },
+
       //上架下架操作
       editGoodsStatus(row) {
         const data = {
@@ -440,7 +479,7 @@
         this.commitBtn();
       },
 
-      commitBtn(id ) {
+      commitBtn(id) {
         const dataId = id || this.selection.map((v) => v.id);
         del(dataId)
           .then((res) => {