瀏覽代碼

Merge branch 'dev_v2' of https://gogs.zfire.top/zfire-front/supply-front into dev_v2

zh 2 年之前
父節點
當前提交
ec5a0e4844

+ 33 - 3
src/api/basic_data/material.js

@@ -22,7 +22,6 @@ export function exportMachineLlistV2(data, name) {
   })
 }
 
-
 export function getCategoryListV2(params) {
   return request({
     url: `/v2/k3/category/list?moduleId=${params.moduleId}`,
@@ -53,7 +52,6 @@ export function exportProductListV2(data, name) {
   })
 }
 
-
 export function getList(params) {
   return request({
     url: '/admin/user/mch/list',
@@ -86,7 +84,7 @@ export function getMaterialList(params) {
 }
 
 export function getMaterialDetail(params) {
-  console.log(params,999);
+  console.log(params, 999)
   return request({
     url: '/k3/material/detail',
     method: 'get',
@@ -220,6 +218,38 @@ export function getProductRriceEdit(params) {
   })
 }
 
+// 产品调价单-列表
+export function v2ProductUpdPriceList(data) {
+  return request({
+    url: `/v2/product-upd-price/list?moduleId=${data.moduleId}`,
+    method: 'post',
+    data
+  })
+}
+
+//产品调价单-导出
+export function v2ProductUpdPriceListExport(data, name) {
+  return postBlob({
+    url: '/v2/product-upd-price/list/export',
+    method: 'post',
+    data,
+    name
+  })
+}
+
+//工程师组别配置API-模板下载
+export function productUpdPriceDownload(data, name) {
+  return getBlob({
+    url: 'product-upd-price/download',
+    data,
+    name
+  })
+}
+//导入调价单-导入
+export function productUpdPriceMaterialImport(data) {
+  return handleImport('/product-upd-price/material/import', data.formdata, data.id || '')
+}
+
 export function getProductRriceList(params) {
   return request({
     url: '/product-upd-price/list',

+ 17 - 0
src/api/deposit_list_v2.js

@@ -0,0 +1,17 @@
+import request, { postBlob } from '@/utils/request'
+
+export function depositManageHomeList(data) {
+  return request({
+    url: `/v2/deposit-manage/home/list?moduleId=${data.moduleId}`,
+    method: 'post',
+    data
+  })
+}
+
+export function depositManageHomeListExport(data, name) {
+  return postBlob({
+    url: '/v2/deposit-manage/home/list/export',
+    data,
+    name
+  })
+}

+ 17 - 0
src/api/finance/change_list_v2.js

@@ -0,0 +1,17 @@
+import request, { postBlob } from '@/utils/request'
+
+export function financeTransferList(data) {
+  return request({
+    url: `/finance/transfer/list/v2?moduleId=${data.moduleId}`,
+    method: 'post',
+    data
+  })
+}
+
+export function financeTransferListExport(data, name) {
+  return postBlob({
+    url: '/finance/transfer/list/listExport/v2',
+    data,
+    name
+  })
+}

+ 17 - 0
src/api/finance/rebate_list_v2.js

@@ -0,0 +1,17 @@
+import request, { postBlob } from '@/utils/request'
+
+export function rebateOrderList(data) {
+  return request({
+    url: `/rebate/order/list/v2?moduleId=${data.moduleId}`,
+    method: 'post',
+    data
+  })
+}
+
+export function rebateOrderListExport(data, name) {
+  return postBlob({
+    url: '/rebate/order/list/v2/export',
+    data,
+    name
+  })
+}

+ 2 - 1
src/components/Common/examine-dialog.vue

@@ -63,7 +63,8 @@ export default {
     submitForm() {
       this.$refs.examineForm.validate(valid => {
         if (valid) {
-          this.$parent.submitExamineForm()
+          // this.$parent.submitExamineForm()
+          this.$emit('submit')
           this.$refs.examineForm.resetFields()
         }
       })

+ 57 - 55
src/components/template/template-page-1.vue

@@ -9,7 +9,7 @@
       :tableEvents="{ ...defaultTableEvents, ...tableEvents }"
       :columnParsing="columnParsing"
       :reduction="reduction"
-      :plan="[...defaultPlan, ...morePlan]"
+      :plan="[...defaultPlan, ...timePlan, ...paramList, ...morePlan]"
       :operation="operationShow ? caozuojl : operation"
       :operationColumnWidth="(operation ? operationColumnWidth : 0) + (operationShow ? 70 : 0)"
       :showTable="showTable"
@@ -120,10 +120,6 @@ export default {
   data() {
     return {
       dialogVisible: false,
-      // 菜单id
-      moduleId: this.$route.meta.moduleId,
-      // 菜单名
-      moduleName: this.customModuleName || this.$route.meta.title,
       // 搜索的参数
       parameter: {},
       // 按钮集合
@@ -140,59 +136,29 @@ export default {
       codeGather: {},
       frontCodes: [],
       pk: '',
-      createTimeKey: '',
-      zfireParamList: [],
       planItem: null,
-      inputText: ''
-    }
-  },
-  computed: {
-    userid() {
-      return this.$store.getters.userid
-    },
-    defaultPlan() {
-      var ps = [
+      inputText: '',
+      defaultPlan: [
         {
           name: '默认方案',
           paramCallback: () => {
             return []
           }
         }
-      ]
-      if (this.createTimeKey) {
-        var [y, m, d] = new Date(new Date().getTime()).toJSON().split('T').join(' ').substr(0, 10).split('-')
-        ps.push({
-          name: '今日',
-          paramCallback: () => {
-            return [
-              { param: this.createTimeKey, compare: '>', value: `${y}-${m}-${Number(d) - 1} 23:59:59` },
-              { param: this.createTimeKey, compare: '<', value: `${y}-${m}-${Number(d) + 1} 00:00:00` }
-            ]
-          }
-        })
-        ps.push({
-          name: '昨日',
-          paramCallback: () => {
-            return [
-              { param: this.createTimeKey, compare: '>', value: `${y}-${m}-${Number(d) - 2} 23:59:59` },
-              { param: this.createTimeKey, compare: '<', value: `${y}-${m}-${Number(d)} 00:00:00` }
-            ]
-          }
-        })
-      }
-      if (this.zfireParamList.length) {
-        this.zfireParamList.map(item => {
-          ps.push({
-            name: item.name,
-            id: item.id,
-            closable: true,
-            paramCallback: () => {
-              return item.items.map(dav => ({ param: dav.param, compare: dav.compare, value: dav.value }))
-            }
-          })
-        })
-      }
-      return ps
+      ],
+      paramList: [],
+      timePlan: []
+    }
+  },
+  computed: {
+    userid() {
+      return this.$store.getters.userid
+    },
+    moduleId() {
+      return this.$route.meta.moduleId
+    },
+    moduleName() {
+      return this.customModuleName || this.$route.meta.title
     }
   },
   mounted() {
@@ -210,6 +176,33 @@ export default {
     this.getZfireParamList()
   },
   methods: {
+    setDefaultPlan(createTimeKey) {
+      this.$nextTick(() => {
+        if (createTimeKey) {
+          var [y, m, d] = new Date(new Date().getTime()).toJSON().split('T').join(' ').substr(0, 10).split('-')
+          this.timePlan = [
+            {
+              name: '今日',
+              paramCallback: () => {
+                return [
+                  { param: createTimeKey, compare: '>', value: `${y}-${m}-${Number(d) - 1} 23:59:59` },
+                  { param: createTimeKey, compare: '<', value: `${y}-${m}-${Number(d) + 1} 00:00:00` }
+                ]
+              }
+            },
+            {
+              name: '昨日',
+              paramCallback: () => {
+                return [
+                  { param: createTimeKey, compare: '>', value: `${y}-${m}-${Number(d) - 2} 23:59:59` },
+                  { param: createTimeKey, compare: '<', value: `${y}-${m}-${Number(d)} 00:00:00` }
+                ]
+              }
+            }
+          ]
+        }
+      })
+    },
     // 关闭方案命名弹窗
     handleClose() {
       this.planItem = null
@@ -221,7 +214,16 @@ export default {
       zfireParamList({
         moduleId: this.moduleId
       }).then(res => {
-        this.zfireParamList = res.data
+        this.paramList = res.data.map(item => {
+          return {
+            name: item.name,
+            id: item.id,
+            closable: true,
+            paramCallback: () => {
+              return item.items.map(dav => ({ param: dav.param, compare: dav.compare, value: dav.value }))
+            }
+          }
+        })
       })
     },
     // 点击获取保存方案数据
@@ -343,9 +345,9 @@ export default {
           if (this.fieldBeansHook) {
             res.fieldBeans = this.fieldBeansHook(res.fieldBeans) || res.fieldBeans
           }
-          for (var item of res.fieldBeans) {
-            if (!this.createTimeKey && item.jname === 'createTime') {
-              this.createTimeKey = `${item.tbName ? item.tbName + '.' : ''}${item.colName}`
+          for (let item of res.fieldBeans) {
+            if (item.jname === 'createTime') {
+              this.setDefaultPlan(`${item.tbName ? item.tbName + '.' : ''}${item.colName}`)
             }
             if (item.pk) {
               this.pk = item.colName

+ 15 - 12
src/views/basic_data/material/components/modify_list-apply.vue

@@ -529,7 +529,7 @@
       <el-button style="float: right" type="primary" size="small" @click="centerDialogVisible = true">添加</el-button>
     </div>
 
-    <el-dialog title="" :visible.sync="centerDialogVisible" width="80%" center>
+    <el-dialog title="" append-to-body :visible.sync="centerDialogVisible" width="80%" center>
       <div>
         <el-form ref="screenForm" :model="screenForm" label-width="70px" size="small" label-position="left">
           <el-row :gutter="20">
@@ -636,7 +636,7 @@ import Mixin from '@/mixin/index'
 
 export default {
   mixins: [Mixin],
-  props: ['cid'],
+  props: ['cid', 'show'],
   data() {
     return {
       baseURL: '',
@@ -790,10 +790,11 @@ export default {
       this.serviceId = adminCompany.roleId
     },
     goBack() {
-      this.$parent.cid = ''
-      this.$parent.show = 1
-      // 更新父组件数据
-      this.$parent.getList()
+      // this.$parent.cid = ''
+      // this.$parent.show = 1
+      // // 更新父组件数据
+      // this.$parent.getList()
+      this.$emit('back')
     },
     indexMethod(index) {
       console.log(index)
@@ -959,7 +960,7 @@ export default {
         wall.data[u].walletName = wall.data[u].name
       }
       this.walleList = wall.data
-      if (this.$parent.show === 5) {
+      if (this.show === 5) {
         getProductRriceDetail({ id: this.cid }).then(res => {
           for (let i = 0; i < res.data.items.length; i++) {
             const linshi = []
@@ -1091,8 +1092,9 @@ export default {
         .then(res => {
           console.log(res.code, 'klkk')
           this.$successMsg('成功')
-          this.$parent.show = 1
-          this.$parent.getList()
+          // this.$parent.show = 1
+          // this.$parent.getList()
+          this.goBack()
         })
         .catch(err => {
           console.log(err)
@@ -1114,9 +1116,10 @@ export default {
       })
         .then(res => {
           this.$successMsg('成功')
-          this.$parent.cid = ''
-          this.$parent.show = 1
-          this.$parent.getList()
+          // this.$parent.cid = ''
+          // this.$parent.show = 1
+          // this.$parent.getList()
+          this.goBack()
         })
         .catch(err => {
           for (let j = 0; j < this.items.length; j++) {

+ 6 - 4
src/views/basic_data/material/components/modify_list-approval.vue

@@ -230,8 +230,9 @@ export default {
       })[0]?.saleName
     },
     goBack() {
-      console.log(this.$parent)
-      this.$parent.show = 1
+      // console.log(this.$parent)
+      // this.$parent.show = 1
+      this.$emit('back')
     },
     onSubmit() {
       const params = {
@@ -242,8 +243,9 @@ export default {
 
       getProductRriceConfirm(params).then(res => {
         this.$successMsg('已提交审核')
-        this.$parent.show = 1
-        this.$parent.getList()
+        // this.$parent.show = 1
+        // this.$parent.getList()
+        this.goBack()
       })
     },
     resetScreenForm() {

+ 3 - 2
src/views/basic_data/material/components/modify_list-detail.vue

@@ -235,8 +235,9 @@ export default {
       })[0]?.saleName
     },
     goBack() {
-      console.log(this.$parent)
-      this.$parent.show = 1
+      // console.log(this.$parent)
+      // this.$parent.show = 1
+      this.$emit('back')
     }
   }
 }

+ 156 - 471
src/views/basic_data/material/modify_list.vue

@@ -1,404 +1,5 @@
 <template>
-  <div class="app-container">
-    <div v-if="show === 1">
-      <!-- 筛选条件 -->
-      <div>
-        <div>
-          <Collapse :screen-form="screenForm">
-            <template #right_btn>
-              <el-button size="mini" @click="resetScreenForm">清空</el-button>
-              <el-button size="mini" type="primary" @click="submitScreenForm">搜索</el-button>
-            </template>
-            <template #search>
-              <el-form ref="screenForm" :model="screenForm" label-width="70px" size="mini" label-position="left">
-                <el-row :gutter="20">
-                  <el-col :xs="24" :sm="12" :lg="6">
-                    <el-form-item label="物料编码" prop="materialNumber">
-                      <el-input placeholder="请输入物料编码" v-model="screenForm.materialNumber"></el-input>
-                    </el-form-item>
-                  </el-col>
-                  <el-col :xs="24" :sm="12" :lg="6">
-                    <el-form-item label="产品名称" prop="materialName">
-                      <el-input placeholder="请输入产品名称" v-model="screenForm.materialName"></el-input>
-                    </el-form-item>
-                  </el-col>
-                  <el-col :xs="24" :sm="12" :lg="6">
-                    <el-form-item label="产品编码" prop="materialOldNumber">
-                      <el-input placeholder="请输入产品编码" v-model="screenForm.materialOldNumber"></el-input>
-                    </el-form-item>
-                  </el-col>
-                  <!--              <el-col :xs="24" :sm="12" :lg="6">-->
-                  <!--                <el-form-item label="生效日期" prop="startDate">-->
-                  <!--                  <el-date-picker-->
-                  <!--                    v-model="screenForm.startDate"-->
-                  <!--                    type="datetime"-->
-                  <!--                    placeholder="请输入生效日期"-->
-                  <!--                    value-format="yyyy-MM-dd HH:mm:ss"-->
-                  <!--                  >-->
-                  <!--                  </el-date-picker>-->
-                  <!--                </el-form-item>-->
-                  <!--              </el-col>-->
-                  <!--              <el-col :xs="24" :sm="12" :lg="6">-->
-                  <!--                <el-form-item label="失效日期" prop="endDate">-->
-                  <!--                  <el-date-picker-->
-                  <!--                    v-model="screenForm.endDate"-->
-                  <!--                    type="datetime"-->
-                  <!--                    placeholder="请输入生效日期"-->
-                  <!--                    value-format="yyyy-MM-dd HH:mm:ss "-->
-                  <!--                  >-->
-                  <!--                  </el-date-picker>-->
-                  <!--                </el-form-item>-->
-                  <!--              </el-col>-->
-                  <el-col :xs="24" :sm="12" :lg="6">
-                    <el-form-item label="销售类型" prop="saleTypeId">
-                      <el-select
-                        v-model="screenForm.saleTypeId"
-                        filterable
-                        placeholder="选择销售类型"
-                        style="width: 100%"
-                      >
-                        <el-option label="全部" value=""></el-option>
-                        <el-option
-                          v-for="item in typeList"
-                          :key="item.id"
-                          :label="item.saleName"
-                          :value="item.id"
-                        ></el-option>
-                      </el-select>
-                    </el-form-item>
-                  </el-col>
-                  <el-col :xs="24" :sm="12" :lg="6">
-                    <el-form-item label="产品类别" prop="k3CategoryNumber">
-                      <el-select style="width: 100%" placeholder="请选择产品类别" v-model="screenForm.k3CategoryNumber">
-                        <el-option label="全部" value=""></el-option>
-                        <el-option v-for="item in dictList" :label="item.name" :value="item.number"></el-option>
-                      </el-select>
-                    </el-form-item>
-                  </el-col>
-                  <el-col :xs="24" :sm="12" :lg="6">
-                    <el-form-item label="规格型号" prop="specification">
-                      <el-input placeholder="请输入规格型号" v-model="screenForm.specification"></el-input>
-                    </el-form-item>
-                  </el-col>
-                </el-row>
-              </el-form>
-            </template>
-          </Collapse>
-        </div>
-      </div>
-      <!-- 按钮 -->
-      <div class="btn-group clearfix">
-        <div class="fl">
-          <el-button
-            type="primary"
-            v-if="$checkBtnRole('add', $route.meta.roles)"
-            icon="el-icon-plus"
-            size="mini"
-            @click="addFn"
-            >新增</el-button
-          >
-          <!-- <el-button type="primary" size="mini">编辑</el-button> -->
-          <el-upload
-            v-if="$checkBtnRole('add', $route.meta.roles)"
-            style="margin-bottom: 10px"
-            class="import-btn"
-            :action="baseURL + 'student/import'"
-            :http-request="handleImport"
-            :file-list="importFileList"
-            :show-file-list="false"
-            :disabled="importLoading"
-            v-loading="importLoading"
-          >
-            <el-button type="primary" size="mini">导入调价单 </el-button>
-          </el-upload>
-          <el-button
-            v-if="$checkBtnRole('add', $route.meta.roles)"
-            type="primary"
-            size="mini"
-            @click="hanleDownloadFiles"
-            >下载模板
-          </el-button>
-          <el-popconfirm
-            v-if="$checkBtnRole('del', $route.meta.roles)"
-            confirm-button-text="好的"
-            cancel-button-text="不用了"
-            icon="el-icon-info"
-            icon-color="red"
-            title="内容确定删除吗?"
-            style="margin-right: 10px"
-            @onConfirm="hanleDeleteAll"
-          >
-            <el-button type="primary" size="mini" icon="el-icon-delete" slot="reference" class="el-popover-left"
-              >删除</el-button
-            >
-          </el-popconfirm>
-          <el-button
-            size="mini"
-            type="warning"
-            icon="el-icon-finished"
-            @click="batchExamine"
-            v-if="$checkBtnRole('examine', $route.meta.roles)"
-            >批量审批</el-button
-          >
-        </div>
-        <div class="fr">
-          <ExportButton :exUrl="'product-upd-price/export'" :exParams="exParams" />
-          <!-- <el-button type="primary" size="mini">导入</el-button>
-          <el-button type="primary" size="mini">导出</el-button>
-          <el-button type="primary" size="mini">打印</el-button> -->
-        </div>
-      </div>
-      <div class="mymain-container">
-        <!-- 列表 -->
-        <div class="table">
-          <el-table
-            v-loading="listLoading"
-            :data="dataList"
-            element-loading-text="Loading"
-            border
-            fit
-            highlight-current-row
-            @select-all="hanleSelectAll"
-            @select="hanleSelectAll"
-            :row-class-name="tableRowClassName"
-          >
-            <el-table-column type="selection" align="left" width="50"></el-table-column>
-            <el-table-column align="left" label="单据号" prop="updPriceBillId" min-width="200" show-overflow-tooltip>
-              <template slot-scope="scope">
-                <CopyButton :copyText="scope.row.updPriceBillId" />
-                <span>{{ scope.row.updPriceBillId }}</span>
-              </template>
-            </el-table-column>
-
-            <el-table-column
-              align="left"
-              label="销售类型"
-              prop="saleTypeName"
-              :formatter="formatterType"
-              min-width="160"
-              show-overflow-tooltip
-            ></el-table-column>
-            <!-- <el-table-column
-              align="left"
-              label="产品类别"
-              prop="mainName"
-              min-width="160"
-              show-overflow-tooltip
-            ></el-table-column> -->
-            <el-table-column align="left" label="物料编码" prop="materialNumber" min-width="160" show-overflow-tooltip>
-              <template slot-scope="scope">
-                <CopyButton :copyText="scope.row.materialNumber" />
-                <span>{{ scope.row.materialNumber }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column align="left" label="产品名称" prop="materialName" min-width="200" show-overflow-tooltip>
-              <template slot-scope="scope">
-                <CopyButton :copyText="scope.row.materialName" />
-                <span>{{ scope.row.materialName }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column
-              align="left"
-              label="产品编码"
-              prop="materialOldNumber"
-              min-width="200"
-              show-overflow-tooltip
-            >
-              <template slot-scope="scope">
-                <CopyButton :copyText="scope.row.materialOldNumber" />
-                <span>{{ scope.row.materialOldNumber }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column align="left" label="规格型号" prop="specification" min-width="200" show-overflow-tooltip>
-              <template slot-scope="scope">
-                <CopyButton :copyText="scope.row.specification" />
-                <span>{{ scope.row.specification }}</span>
-              </template>
-            </el-table-column>
-            <el-table-column
-              align="left"
-              label="计量单位"
-              prop="unit"
-              min-width="160"
-              show-overflow-tooltip
-            ></el-table-column>
-            <el-table-column
-              align="right"
-              label="数量"
-              prop="qty"
-              min-width="160"
-              show-overflow-tooltip
-            ></el-table-column>
-            <el-table-column
-              align="right"
-              label="批发价"
-              prop="batchPrice"
-              min-width="160"
-              show-overflow-tooltip
-            ></el-table-column>
-
-            <el-table-column
-              align="right"
-              label="格力折扣"
-              prop="discAmount"
-              min-width="160"
-              show-overflow-tooltip
-            ></el-table-column>
-            <el-table-column
-              align="left"
-              label="调价日期"
-              prop="createTime"
-              min-width="200"
-              show-overflow-tooltip
-            ></el-table-column>
-            <el-table-column
-              align="left"
-              label="生效日期"
-              prop="startDate"
-              min-width="200"
-              show-overflow-tooltip
-            ></el-table-column>
-            <el-table-column
-              align="left"
-              label="失效日期"
-              prop="endDate"
-              min-width="200"
-              show-overflow-tooltip
-            ></el-table-column>
-            <!-- <el-table-column
-              align="left"
-              label="是否促销价"
-              prop="isPromote"
-              min-width="160"
-              show-overflow-tooltip
-            >
-              <template slot-scope="scope">
-                <el-tag size="mini" type="success" v-if="scope.row.isPromote">是</el-tag>
-                <el-tag size="mini"  type="danger" v-else>否</el-tag>
-              </template>
-            </el-table-column> -->
-            <el-table-column align="left" label="返利类型(钱包)" prop="wallets" min-width="250" show-overflow-tooltip>
-              <template slot-scope="scope">
-                <template v-for="(item, index) in comWallets(scope.row.wallets)">
-                  <template v-if="item.type === 'REBATE'">
-                    <el-tag type="success" style="margin: 0 10px" size="mini" :key="index">
-                      {{ item.walletName }}
-                    </el-tag>
-                  </template>
-                </template>
-              </template>
-            </el-table-column>
-            <el-table-column
-              align="left"
-              label="现金钱包"
-              prop="modifyPriceDepartment"
-              min-width="350"
-              show-overflow-tooltip
-            >
-              <template slot-scope="scope">
-                <template v-for="(item, index) in comWallets(scope.row.wallets)">
-                  <template v-if="item.type === 'COMMONLY'">
-                    <el-tag type="success" style="margin: 0 10px" size="mini" :key="index">
-                      {{ item.walletName }}
-                    </el-tag>
-                  </template>
-                </template>
-              </template>
-            </el-table-column>
-            <el-table-column
-              align="left"
-              label="调价部门"
-              prop="adminWebsitName"
-              min-width="200"
-              show-overflow-tooltip
-            ></el-table-column>
-            <el-table-column
-              align="left"
-              label="调价业务员"
-              prop="serviceName"
-              min-width="200"
-              show-overflow-tooltip
-            ></el-table-column>
-            <el-table-column
-              align="left"
-              label="制单日期"
-              prop="createTime"
-              min-width="200"
-              show-overflow-tooltip
-            ></el-table-column>
-            <el-table-column
-              align="left"
-              label="审核人"
-              prop="confirmName"
-              min-width="200"
-              show-overflow-tooltip
-            ></el-table-column>
-            <el-table-column
-              align="left"
-              label="审核日期"
-              prop="confirmTime"
-              min-width="200"
-              show-overflow-tooltip
-            ></el-table-column>
-            <el-table-column align="left" label="状态" prop="examineStatus" min-width="160" show-overflow-tooltip>
-              <template slot-scope="scope">
-                <el-tag size="mini" type="success" v-if="scope.row.examineStatus == 'SAVE'">保存</el-tag>
-                <el-tag size="mini" type="danger" v-else-if="scope.row.examineStatus == 'WAIT'">待审核</el-tag>
-                <el-tag size="mini" type="danger" v-else-if="scope.row.examineStatus == 'OK'">通过</el-tag>
-                <el-tag size="mini" type="danger" v-else-if="scope.row.examineStatus == 'FAIL'">不通过</el-tag>
-                <el-tag size="mini" type="danger" v-else>审核</el-tag>
-              </template>
-            </el-table-column>
-            <el-table-column align="center" label="操作" fixed="right" min-width="160" show-overflow-tooltip>
-              <template slot-scope="scope">
-                <template v-if="scope.row.examineStatus == 'SAVE'">
-                  <el-popconfirm
-                    title="确定提审吗?"
-                    @onConfirm="handleGetPriceSubmit(scope.row.updPriceBillId)"
-                    style="margin-right: 10px"
-                  >
-                    <el-button type="text" slot="reference">提审</el-button>
-                  </el-popconfirm>
-                </template>
-                <template v-if="scope.row.examineStatus == 'WAIT'">
-                  <el-button type="text" class="textColor" @click="approvalFn(scope.row.updPriceBillId)"
-                    >审批</el-button
-                  >
-                </template>
-                <el-button
-                  v-if="scope.row.examineStatus == 'SAVE'"
-                  type="text"
-                  class="textColor"
-                  @click="editFn(scope.row.updPriceBillId, scope.row)"
-                  >编辑</el-button
-                >
-                <el-button type="text" class="textColor" @click="detailFn(scope.row.updPriceBillId)">详情</el-button>
-              </template>
-            </el-table-column>
-          </el-table>
-        </div>
-        <!-- 分页 -->
-        <div class="fr">
-          <el-pagination
-            @size-change="handleSizeChange"
-            @current-change="handleCurrentChange"
-            :current-page="currentPage"
-            :page-sizes="[10, 20, 30, 50]"
-            :page-size="10"
-            layout="total, sizes, prev, pager, next, jumper"
-            :total="listTotal"
-          >
-          </el-pagination>
-        </div>
-      </div>
-    </div>
-    <ModifyListApply v-else-if="show === 2 || show == 5" :cid="cid" />
-    <ModifyListApproval v-else-if="show === 3" :detail="detail" />
-    <ModifyListDetail v-else :detail="detail" />
-    <ExamineDialog :isShow.sync="isShowExamineDialog" :examineForm.sync="examineForm" />
-  </div>
-
-  <!-- <template-page
+  <template-page
     ref="pageRef"
     :getList="getList"
     :operation="operation()"
@@ -408,8 +9,15 @@
     :tableAttributes="tableAttributes"
     :tableEvents="tableEvents"
   >
-    
-  </template-page> -->
+    <ExamineDialog @submit="submitExamineForm" :isShow.sync="isShowExamineDialog" :examineForm.sync="examineForm" />
+
+    <Popu v-if="show !== 1">
+      <!-- <el-page-header slot="head" :content="content" @back="handleClose" /> -->
+      <ModifyListApply v-if="show === 2 || show == 5" :cid="cid" :show="show" @back="handleClose" />
+      <ModifyListApproval v-if="show === 3" :detail="detail" @back="handleClose" />
+      <ModifyListDetail v-if="show === 4" :detail="detail" @back="handleClose" />
+    </Popu>
+  </template-page>
 </template>
 
 <script>
@@ -422,29 +30,43 @@ import ModifyListApply from './components/modify_list-apply.vue'
 import ModifyListApproval from './components/modify_list-approval.vue'
 import ModifyListDetail from './components/modify_list-detail.vue'
 import ExamineDialog from '@/components/Common/examine-dialog'
-import Mixin from '@/mixin/index'
+// import Mixin from '@/mixin/index'
 import {
   getPriceSubmit,
   getProductRricedel,
   getProductRriceDetail,
   getProductRriceList,
   getTypeList,
-  examineData
+  examineData,
+  v2ProductUpdPriceList,
+  v2ProductUpdPriceListExport,
+  productUpdPriceDownload,
+  productUpdPriceMaterialImport
 } from '@/api/basic_data/material'
-import { downloadFiles, handleImport } from '@/utils/util'
+// import { downloadFiles, handleImport } from '@/utils/util'
 import { getCategoryList } from '@/api/common'
 
 export default {
-  mixins: [Mixin, import_mixin, add_callback_mixin],
+  mixins: [import_mixin, add_callback_mixin],
   data() {
     return {
+      handleClose: this.addOff(() => {
+        if (this.show === 2 || this.show === 5) {
+          this.cid = ''
+          this.show = 1
+        }
+        this.show = 1
+        this.$refs.pageRef.refreshList()
+      }),
       // 事件组合
       optionsEvensGroup: [
         [
           [
             {
               name: '新增',
-              click: this.addOn(() => {})
+              click: this.addOn(() => {
+                this.addFn()
+              })
             }
           ]
         ],
@@ -457,14 +79,9 @@ export default {
                   this.$message.error('请选择需要删除的数据')
                   return
                 }
-                let messengerLevelId = this.recordSelected.map(v => {
-                  return v.messengerLevelId
-                })
-                let params = messengerLevelId
-                await levelDel(params)
-                this.$refs.pageRef.refreshList()
-                this.$message.success('批量删除成功')
-              }
+                this.hanleDeleteAll()
+              },
+              isRole: this.$checkBtnRole('del', this.$route.meta.roles)
             }
           ]
         ],
@@ -472,37 +89,41 @@ export default {
           [
             {
               name: '批量审批',
-              click: async () => {}
+              click: async () => {
+                this.batchExamine()
+              }
+            }
+          ]
+        ],
+        [
+          [
+            {
+              name: '',
+              render: this.importButton(productUpdPriceMaterialImport, '导入', {
+                billType: 'GENERAL'
+              })
+            }
+          ]
+        ],
+        [
+          [
+            {
+              name: '导入模版',
+              click: () => {
+                productUpdPriceDownload({}, `${this.$route.meta.title}`)
+                  .then(res => {
+                    this.$message({
+                      message: '下载成功',
+                      type: 'success'
+                    })
+                  })
+                  .catch(err => {
+                    this.$message.error('下载失败')
+                  })
+              }
             }
           ]
         ]
-        // [
-        //   [
-        //     {
-        //       name: '',
-        //       render: this.importButton(lbsAmapImport)
-        //     }
-        //   ]
-        // ],
-        // [
-        //   [
-        //     {
-        //       name: '导入模版',
-        //       click: () => {
-        //         // lbsAmapTemplateExcel({}, `${this.$route.meta.title}`)
-        //         //   .then(res => {
-        //         //     this.$message({
-        //         //       message: '下载成功',
-        //         //       type: 'success'
-        //         //     })
-        //         //   })
-        //         //   .catch(err => {
-        //         //     this.$message.error('下载失败')
-        //         //   })
-        //       }
-        //     }
-        //   ]
-        // ]
       ],
       // 表格属性
       tableAttributes: {
@@ -632,9 +253,9 @@ export default {
   },
   methods: {
     // 列表请求函数
-    // getList: levelList,
+    getList: v2ProductUpdPriceList,
     // 列表导出函数
-    // exportList: exportLevelList,
+    exportList: v2ProductUpdPriceListExport,
     // 表格列解析渲染数据更改
     columnParsing(item, defaultData) {
       return defaultData
@@ -645,9 +266,60 @@ export default {
     },
     operation() {
       return (h, { row, index, column }) => {
+        console.log(row)
         return (
           <div class="operation-btns">
-            <el-button size="mini" type="text" onClick={async () => {}}>
+            {row.examineStatus == 'SAVE' ? (
+              <el-popconfirm
+                onOnConfirm={async () => {
+                  this.handleGetPriceSubmit(row.updPriceBillId)
+                }}
+                title="是否确定需要提审该项内容?"
+              >
+                <el-button slot="reference" size="mini" type="text">
+                  提审
+                </el-button>
+              </el-popconfirm>
+            ) : (
+              ''
+            )}
+
+            {row.examineStatus == 'WAIT' ? (
+              <el-popconfirm
+                onOnConfirm={async () => {
+                  this.approvalFn(row.updPriceBillId)
+                }}
+                title="是否确定需要审批该项内容?"
+              >
+                <el-button slot="reference" size="mini" type="text">
+                  审批
+                </el-button>
+              </el-popconfirm>
+            ) : (
+              ''
+            )}
+
+            {row.examineStatus == 'SAVE' ? (
+              <el-button
+                size="mini"
+                type="text"
+                onClick={async () => {
+                  this.editFn(row.updPriceBillId, row)
+                }}
+              >
+                编辑
+              </el-button>
+            ) : (
+              ''
+            )}
+
+            <el-button
+              size="mini"
+              type="text"
+              onClick={async () => {
+                this.detailFn(row.updPriceBillId)
+              }}
+            >
               详情
             </el-button>
           </div>
@@ -665,17 +337,28 @@ export default {
     addFn() {
       this.show = 2
     },
+    hanleDeleteAllPromise(id) {
+      return new Promise((resolve, reject) => {
+        const ids = id ? [id] : this.recordSelected.map(v => v.updPriceBillId)
+        if (!ids.length) {
+          this.$errorMsg('请选择删除内容')
+          return
+        }
+        resolve(ids)
+      })
+    },
     hanleDeleteAll(id) {
       this.hanleDeleteAllPromise(id).then(ids => {
         getProductRricedel(ids).then(res => {
           this.$successMsg('删除成功')
-          this.getList()
+          // this.getList()
+          this.$refs.pageRef.refreshList()
         })
       })
     },
     // 打开 批量审批
     batchExamine() {
-      if (this.ids.length) {
+      if (this.recordSelected.length) {
         this.isShowExamineDialog = true
         return
       }
@@ -686,7 +369,7 @@ export default {
       // let ids = this.dis.map(item => {
       //   return item
       // });
-      const ids = [...new Set(this.ids)]
+      const ids = [...new Set(this.recordSelected.map(v => v.updPriceBillId))]
       examineData({
         ids: ids.join(','),
         examineStatus: this.examineForm.status,
@@ -694,14 +377,16 @@ export default {
       }).then(res => {
         this.isShowExamineDialog = false
         this.$successMsg('修改成功')
-        this.getList()
+        // this.getList()
+        this.$refs.pageRef.refreshList()
       })
     },
     handleGetPriceSubmit(id) {
       console.log(id)
       getPriceSubmit({ ids: id }).then(res => {
         this.$successMsg('已提审')
-        this.getList()
+        // this.getList()
+        this.$refs.pageRef.refreshList()
       })
     },
     approvalFn(id) {
@@ -717,26 +402,26 @@ export default {
         this.show = 4
       })
     },
-    getList() {
-      this.listLoading = true
-      console.log(456654)
-      let params = {
-        pageNum: this.currentPage,
-        pageSize: this.pageSize,
-        materialName: this.screenForm.materialName,
-        materialNumber: this.screenForm.materialNumber,
-        startDate: this.screenForm.startDate,
-        materialOldNumber: this.screenForm.materialOldNumber,
-        saleTypeId: this.screenForm.saleTypeId,
-        k3CategoryNumber: this.screenForm.k3CategoryNumber,
-        specification: this.screenForm.specification
-      }
-      getProductRriceList(params).then(res => {
-        this.dataList = res.data.records
-        this.listTotal = res.data.total
-        this.listLoading = false
-      })
-    },
+    // getList() {
+    //   this.listLoading = true
+    //   console.log(456654)
+    //   let params = {
+    //     pageNum: this.currentPage,
+    //     pageSize: this.pageSize,
+    //     materialName: this.screenForm.materialName,
+    //     materialNumber: this.screenForm.materialNumber,
+    //     startDate: this.screenForm.startDate,
+    //     materialOldNumber: this.screenForm.materialOldNumber,
+    //     saleTypeId: this.screenForm.saleTypeId,
+    //     k3CategoryNumber: this.screenForm.k3CategoryNumber,
+    //     specification: this.screenForm.specification
+    //   }
+    //   getProductRriceList(params).then(res => {
+    //     this.dataList = res.data.records
+    //     this.listTotal = res.data.total
+    //     this.listLoading = false
+    //   })
+    // },
     editFn(id, row) {
       this.cid = id
       this.show = 5

File diff suppressed because it is too large
+ 132 - 842
src/views/deposit_home/deposit_list.vue


+ 11 - 83
src/views/finance/change_list.vue

@@ -27,6 +27,7 @@
 <script>
 import TemplatePage from '@/components/template/template-page-1.vue'
 import { getChangeList, getChangeListDetail, getTransferSubmit, getTransferCancel } from '@/api/finance/change_list'
+import { financeTransferList, financeTransferListExport } from '@/api/finance/change_list_v2'
 import ChangeListDetail from './components/change_list-detail'
 import ChangeListExamine from './components/change_list-examine'
 import ChangeListReview from './components/change_list-review'
@@ -40,20 +41,7 @@ export default {
   data() {
     return {
       isCustomer: null,
-      currentPage: 1, // 当前页码
-      pageSize: 10, // 每页数量
-      listTotal: 0, // 列表总数
-      dataList: [], // 列表数据
-      searchForm: {
-        customerName: '',
-        startTime: '',
-        walletName: '',
-        id: ''
-      }, //搜索表单
-      listLoading: false, // 列表加载loading
-      category: '',
       showPage: 1,
-      isCollapse: true,
       detailList: {},
       optionsEvensGroup: [],
       // 表格属性
@@ -71,13 +59,12 @@ export default {
   created() {
     const res = JSON.parse(localStorage.getItem('supply_user'))
     this.isCustomer = res.isCustomer
-    this.getDataList()
   },
   methods: {
     // 列表请求函数
-    getList: getCreditList,
+    getList: financeTransferList,
     // 列表导出函数
-    exportList: getCreditListExport,
+    exportList: financeTransferListExport,
     // 表格列解析渲染数据更改
     columnParsing(item, defaultData) {
       return defaultData
@@ -90,7 +77,7 @@ export default {
       return (h, { row, index, column }) => {
         return (
           <div class="operation-btns">
-            {this.$checkBtnRole('apply', this.$route.meta.roles) && row.examineStatus == 'SAVE' ? (
+            {this.$checkBtnRole('apply', this.$route.meta.roles) && row.examineStatus == '保存' ? (
               <el-button
                 onClick={() => {
                   this.submitFn(row.id)
@@ -102,7 +89,7 @@ export default {
                 提审
               </el-button>
             ) : null}
-            {row.examineStatus == 'WAIT' &&
+            {row.examineStatus == '待审核' &&
             !this.isCustomer &&
             this.$checkBtnRole('examine', this.$route.meta.roles) ? (
               <el-button
@@ -116,7 +103,7 @@ export default {
                 审核
               </el-button>
             ) : null}
-            {(row.examineStatus == 'FAIL_ONE' || row.examineStatus == 'SAVE') &&
+            {(row.examineStatus == '初审不通过' || row.examineStatus == '保存') &&
             this.$checkBtnRole('edit', this.$route.meta.roles) ? (
               <el-button
                 type="text"
@@ -129,7 +116,6 @@ export default {
                 修改
               </el-button>
             ) : null}
-
             <el-button
               onClick={() => {
                 this.detailFn(row.id)
@@ -140,9 +126,8 @@ export default {
             >
               详情
             </el-button>
-            {row.examineStatus == 'WAIT' ? (
+            {row.examineStatus == '待审核' ? (
               <el-button
-                v-if="scope.row.examineStatus == 'WAIT'"
                 onClick={() => {
                   this.cancelFn(row.id)
                 }}
@@ -160,96 +145,39 @@ export default {
     //取消
     async cancelFn(id) {
       await getTransferCancel({ id })
-      this.getDataList()
+      this.refreshFn()
       this.$message.success('取消成功')
     },
-    //切换radio
-    changeRadioGroupFn(v) {
-      // console.log(v);
-      this.currentPage = 1
-
-      this.getDataList()
-    },
-    //撤回
-    withdrawFn() {},
     //刷新
     refreshFn() {
-      this.getDataList()
+      this.$refs.pageRef.refreshList()
     },
     //提审
     async submitFn(id) {
       await getTransferSubmit({ id })
       this.$message.success('提审成功')
-      this.getDataList()
-    },
-    //清空
-    clearFn() {
-      this.$refs.searchForm.resetFields()
-    },
-    //搜索
-    searchFn() {
-      this.currentPage = 1
-      this.getDataList()
-    },
-
-    //获取列表数据
-    async getDataList() {
-      let params = {
-        pageNum: this.currentPage,
-        pageSize: this.pageSize,
-        customerName: this.searchForm.customerName,
-        examineStatus: this.category,
-        id: this.searchForm.id,
-        startTime: this.searchForm.startTime,
-        walletName: this.searchForm.walletName
-      }
-      const res = await getChangeList(params)
-      // console.log(res);
-      res.data.records.forEach(item => {
-        item.sums1 = []
-        item.sums2 = ['amount', 'allowanceAmount']
-      })
-      this.dataList = res.data.records
-      this.listTotal = res.data.total
+      this.refreshFn()
     },
     //详情
     async detailFn(id) {
       const res = await getChangeListDetail({ id })
-      console.log(res)
       this.detailList = res.data
       this.showPage = 2
     },
     //修改
     async editFn(id) {
       const res = await getChangeListDetail({ id })
-
       this.detailList = res.data
       this.showPage = 4
     },
     //审核
     async examineFn(id) {
       const res = await getChangeListDetail({ id })
-
       this.detailList = res.data
       this.showPage = 3
-    },
-    // 更改每页数量
-    handleSizeChange(val) {
-      this.pageSize = val
-      this.currentPage = 1
-      this.getDataList()
-    },
-    // 更改当前页
-    handleCurrentChange(val) {
-      this.currentPage = val
-      this.getDataList()
     }
   }
 }
 </script>
 
-<style lang="scss" scoped>
-.dateStyle {
-  width: 100%;
-}
-</style>
+<style lang="scss" scoped></style>

File diff suppressed because it is too large
+ 269 - 685
src/views/finance/rebate_list.vue


Some files were not shown because too many files changed in this diff