Forráskód Böngészése

修改国内、财务部分

lichao 3 éve
szülő
commit
badeb7f1c0

+ 7 - 0
src/api/basicData/configuration.js

@@ -151,3 +151,10 @@ export const getlistBankBy = (corpsId) => {
     }
   })
 }
+// 下载模板
+export function downLoadTemplate() {
+  return request({
+    url: '/api/blade-purchase-sales/orderitems/exportPrice',
+    method: 'get'
+  })
+}

+ 7 - 3
src/views/businessManagement/deliveryNotice/detailsPageEdit.vue

@@ -9,8 +9,13 @@
       </div>
       <div class="add-customer-btn">
         <el-button
+          v-if="detailData.seeDisabled"
+          size="small"
+          @click="detailData.seeDisabled = false"
+          type="primary"
+        >编辑</el-button>
+        <el-button
           class="el-button--small-yh"
-          style="right: 245px;"
           type="primary"
           @click="revokeOutGoods"
           size="small"
@@ -19,7 +24,6 @@
         >撤销发货</el-button>
         <el-button
           class="el-button--small-yh"
-          style="right: 245px;"
           type="primary"
           @click="sendOutGoods"
           size="small"
@@ -29,7 +33,7 @@
         <el-button
           class="el-button--small-yh"
           size="small"
-          type="success" style="right: 140px;" @click="copyOrder"
+          type="success" @click="copyOrder"
           :disabled="detailData.seeDisabled || !form.id">
           复制新单
         </el-button>

+ 5 - 0
src/views/businessManagement/deliveryNotice/index.vue

@@ -7,6 +7,7 @@
                  v-model="form"
                  :page.sync="page"
                  :search.sync="search"
+                 :table-loading="loading"
                  @row-del="rowDel"
                  @row-update="rowUpdate"
                  :before-open="beforeOpen"
@@ -122,6 +123,7 @@ export default {
       },
       form: {},
       search: {},
+      loading: false,
       option: {},
       parentId: 0,
       dataList: [],
@@ -338,9 +340,12 @@ export default {
         current: page.currentPage,
         billType:"FH"
       })
+      this.loading = true;
       customerList(queryParams).then(res => {
         this.dataList = res.data.data.records
         this.page.total = res.data.data.total
+      }).finally(() => {
+        this.loading = false;
       })
     },
     //树桩列点击展开触发

+ 5 - 0
src/views/businessManagement/inventoryAccount/index.vue

@@ -7,6 +7,7 @@
         :page.sync="page"
         @search-change="searchChange"
         :search.sync="search"
+        :table-loading="loading"
         @on-load="onLoad"
         @row-update="rowUpdate">
       <template slot-scope="{row,index}" slot="menu">
@@ -65,6 +66,7 @@ export default {
     return {
       data: [],
       search:{},
+      loading: false,
       excelForm: {},
       excelOption: {
         submitBtn: false,
@@ -171,9 +173,12 @@ export default {
         size: page.pageSize,
         current: page.currentPage,
       })
+      this.loading = true;
       customerList(queryParams).then(res => {
         this.data = res.data.data.records
         this.page.total = res.data.data.total
+      }).finally(() => {
+        this.loading = false;
       })
     },
     rowUpdate(form, index, done) {

+ 18 - 2
src/views/businessManagement/purchaseOrder/detailsPageEdit.vue

@@ -9,10 +9,16 @@
       </div>
       <div class="add-customer-btn">
         <el-button
+          v-if="detailData.seeDisabled"
+          size="small"
+          @click="detailData.seeDisabled = false"
+          type="primary"
+        >编辑</el-button>
+        <el-button
           size="small"
           class="el-button--small-yh"
           :disabled="detailData.seeDisabled || !this.form.id"
-          type="warning" style="right: 140px;"
+          type="warning"
           @click="applyPayment"
         >
           申请货款
@@ -20,7 +26,7 @@
         <el-button
           size="small"
           class="el-button--small-yh"
-          type="success" style="right: 140px;"
+          type="success"
           @click="copyOrder"
           :disabled="detailData.seeDisabled || !this.form.id"
         >
@@ -618,6 +624,16 @@ export default {
                 trigger: 'blur'
               }
             ]
+          }, {
+            label: '已付金额',
+            prop: 'a',
+            rules: [
+              {
+                required: false,
+                message: ' ',
+                trigger: 'blur'
+              }
+            ]
           },{
             label: "备注",
             span: 24,

+ 5 - 0
src/views/businessManagement/purchaseOrder/index.vue

@@ -7,6 +7,7 @@
                  v-model="form"
                  :page.sync="page"
                  :search.sync="search"
+                 :table-loading="loading"
                  @row-del="rowDel"
                  :before-open="beforeOpen"
                  :before-close="beforeClose"
@@ -100,6 +101,7 @@ export default {
         clearable: true,
       },
       search: {},
+      loading: false,
       form: {},
       option: {},
       parentId: 0,
@@ -282,9 +284,12 @@ export default {
         // billType:'CG',
         // corpsTypeId: this.treeDeptId
       })
+      this.loading = true;
       customerList(queryParams).then(res => {
         this.dataList = res.data.data.records
         this.page.total = res.data.data.total
+      }).finally(() => {
+        this.loading = false;
       })
     },
     //树桩列点击展开触发

+ 7 - 3
src/views/businessManagement/receipt/detailsPageEdit.vue

@@ -9,8 +9,13 @@
       </div>
       <div class="add-customer-btn">
         <el-button
+          v-if="detailData.seeDisabled"
+          size="small"
+          @click="detailData.seeDisabled = false"
+          type="primary"
+        >编辑</el-button>
+        <el-button
           class="el-button--small-yh"
-          style="right: 245px;"
           type="primary"
           @click="revokeInGoods"
           size="small"
@@ -19,7 +24,6 @@
         >撤销收货</el-button>
         <el-button
           class="el-button--small-yh"
-          style="right: 245px;"
           type="primary"
           @click="sendInGoods"
           size="small"
@@ -29,7 +33,7 @@
         <el-button
           class="el-button--small-yh"
           size="small"
-          type="success" style="right: 140px;" @click="copyOrder"
+          type="success" @click="copyOrder"
           :disabled="detailData.seeDisabled || !this.form.id">
           复制新单
         </el-button>

+ 5 - 1
src/views/businessManagement/receipt/index.vue

@@ -7,6 +7,7 @@
                  v-model="form"
                  :page.sync="page"
                  :search.sync="search"
+                 :table-loading="loading"
                  @row-del="rowDel"
                  @row-update="rowUpdate"
                  :before-open="beforeOpen"
@@ -124,6 +125,7 @@ export default {
       },
       form: {},
       search: {},
+      loading: false,
       option: {},
       parentId: 0,
       dataList: [],
@@ -337,7 +339,6 @@ export default {
         this.$delete(params,'businessDate')
       }
       if (params) {
-
       }
       let queryParams = Object.assign({}, params, {
         size: page.pageSize,
@@ -345,9 +346,12 @@ export default {
         billType:'SH',
         corpsTypeId: this.treeDeptId
       })
+      this.loading = true;
       customerList(queryParams).then(res => {
         this.dataList = res.data.data.records
         this.page.total = res.data.data.total
+      }).finally(() => {
+        this.loading = false;
       })
     },
     //树桩列点击展开触发

+ 8 - 0
src/views/businessManagement/salesOrder/configuration/mainList.json

@@ -153,6 +153,14 @@
       "overHidden": true
     },
     {
+      "label": "生产工厂",
+      "prop": "productionPlantName",
+      "search": false,
+      "index": 13,
+      "width": 100,
+      "overHidden": true
+    },
+    {
       "label": "发货地址",
       "prop": "shippingAddress",
       "search": true,

+ 118 - 3
src/views/businessManagement/salesOrder/detailsPageEdit.vue

@@ -9,6 +9,12 @@
       </div>
       <div class="add-customer-btn">
         <el-button
+          v-if="detailData.seeDisabled"
+          size="small"
+          @click="detailData.seeDisabled = false"
+          type="primary"
+        >编辑</el-button>
+        <el-button
           class="el-button--small-yh"
           type="warning"
           :disabled="detailData.seeDisabled"
@@ -59,10 +65,16 @@
                 />
 <!--                所属公司带出银行信息-->
                 <selectComponent v-else-if="item.prop === 'belongToCorpId'"
-                                 v-model="form[item.prop]" :configuration="configuration"
+                                 v-model="form[item.prop]" :configuration="companyConfiguration"
                                  style="width: 100%"
                                  :disabled="detailData.seeDisabled"
                                  @returnBack="returnBack"/>
+<!--                生产工厂-->
+                <selectComponent v-else-if="item.prop === 'productionPlant'"
+                                 v-model="form[item.prop]" :configuration="plantConfiguration"
+                                 style="width: 100%"
+                                 :disabled="detailData.seeDisabled"
+                                 @getRow="getPlantRow"/>
                 <el-select v-else-if="item.prop === 'paymentType'" v-model="form[item.prop]" placeholder="请选择" clearable filterable style="width: 100%" size="small" :disabled="detailData.seeDisabled">
                   <el-option v-for="(item,index) in paymentOption" :key="index" :label="item.dictValue" :value="item.dictValue"></el-option>
                 </el-select>
@@ -255,6 +267,29 @@
                          :disabled="detailData.seeDisabled"
                          @click.stop="openReport()"
               >报 表</el-button>
+              <el-button
+                type="primary"
+                size="small"
+                icon="el-icon-download"
+                @click="downloadHandle"
+              >下载模板</el-button>
+              <el-upload
+                :action="baseURL"
+                :headers="headers"
+                :disabled="detailData.seeDisabled"
+                :on-progress="uploading"
+                :show-file-list=false
+                accept=".xls,.xlsx"
+                multiple
+                :on-success="importTemplate"
+                style="float: right"
+              >
+                <el-button
+                  type="primary"
+                  size="small"
+                  icon="el-icon-upload"
+                >导 入</el-button>
+              </el-upload>
             </template>
           </avue-crud>
         </basic-container>
@@ -562,6 +597,8 @@ import customerDialog from "@/components/customer-dialog/main";
 //账单组件
 import ApplyPayment from "../../../components/finance/applyPayment";
 import reportDialog from "@/components/report-dialog/main";
+import { getToken } from "@/util/auth";
+import Cookies from 'js-cookie'
 
 export default {
   name: "detailsPage",
@@ -597,6 +634,20 @@ export default {
         placeholder: '请点击右边按钮选择',
         dicData: []
       },
+      plantConfiguration: {
+        multipleChoices: false,
+        multiple: false,
+        collapseTags: false,
+        placeholder: '请点击右边按钮选择',
+        dicData: []
+      },
+      companyConfiguration: {
+        multipleChoices: false,
+        multiple: false,
+        collapseTags: false,
+        placeholder: '请点击右边按钮选择',
+        dicData: []
+      },
       data: [],
       policyForm: {},
       dataPolicy: [],
@@ -983,7 +1034,7 @@ export default {
             ]
           }, {
             label: '生产工厂',
-            prop: 'a',
+            prop: 'productionPlant',
             span: 16,
             rules: [
               {
@@ -1152,6 +1203,8 @@ export default {
       // 查询时loading页面
       pageLoading: false,
       switchDialog: false,
+      baseURL: '/api/blade-purchase-sales/orderitems/importPrice',
+      headers: { "Blade-Auth": 'Bearer ' + getToken()},
     }
   },
   mounted() {
@@ -1210,7 +1263,10 @@ export default {
         this.bankOfDepositData = this.form.orderFilesList
         this.configuration.dicData = this.form.corpName
         if (this.form.belongToCorpList) {
-          this.configuration.dicData = this.configuration.dicData.concat(this.form.belongToCorpList)
+          this.companyConfiguration.dicData = this.form.belongToCorpList
+        }
+        if (this.form.productionPlantList) {
+          this.plantConfiguration.dicData = this.form.productionPlantList
         }
         let feesData = []
         this.form.orderFeesList.forEach(item => {
@@ -1393,6 +1449,62 @@ export default {
     openReport() {
       this.switchDialog =! this.switchDialog;
     },
+    // 下载模板
+    downloadHandle() {
+      this.$confirm('是否下载模板文件?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        window.open(
+          `/api/blade-purchase-sales/orderitems/exportPrice?${
+            this.website.tokenHeader
+          }=${getToken()}`
+        );
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消'
+        });
+      })
+    },
+    //文件上传时
+    uploading(event, file, fileList) {
+      this.pageLoading = true;
+      // this.openFullScreen(false, '文件正在解析中');
+    },
+    importTemplate(res, file) {
+      console.log(res)
+      this.pageLoading = false
+      let goodsData = []
+      res.data.forEach(item => {
+        this.$set(item, 'priceType', '一般')
+        this.$set(item, 'actualQuantity', '0')
+        this.$set(item, 'purchaseAmount', '0')
+        this.$set(item, 'price', '0')
+        this.$set(item, 'amount', '0')
+        this.$set(item, 'sort', this.maxFeeNum + 1)
+        this.maxFeeNum++
+        let a = {
+          cname: item.cname,
+        }
+        goodsData.push(a)
+      })
+      this.goodsConfiguration.dicData = this.goodsConfiguration.dicData.concat(goodsData)
+      this.removeGoodsRepeat()
+      this.contactsData = this.contactsData.concat(res.data)
+
+    },
+    //遮罩层
+    openFullScreen(res, text) {
+      const loading = this.$loading({
+        lock: true,
+        text: text,
+        spinner: 'el-icon-loading',
+        background: 'rgba(0, 0, 0, 0.7)'
+      });
+      if (res === true) loading.close();
+    },
     onClose(val) {
       this.switchDialog = val;
     },
@@ -1539,6 +1651,9 @@ export default {
       this.$set(this.form, 'packageRemarks', data.remarks)
       this.$set(this.form, 'arrivalAddress', data.storageAddr)
     },
+    getPlantRow(data) {
+      this.$set(this.form, 'shippingAddress', data.storageAddr)
+    },
     getRow(event,row) {
       row.priceCategory = event[0].goodsTypeName
       this.$set(row, 'priceType', '一般')

+ 5 - 0
src/views/businessManagement/salesOrder/index.vue

@@ -23,6 +23,7 @@
                  @on-load="onLoad"
                  @tree-load="treeLoad"
                  :cell-style="tableRowClassName"
+                 :table-loading="loading"
       >
         <template slot-scope="scope" slot="orgOrderNo">
           <span style="color: #409EFF;cursor: pointer" @click.stop="beforeOpenPage(scope.row,scope.index)">{{ scope.row.orgOrderNo }}</span>
@@ -92,6 +93,7 @@ export default {
   },
   data() {
     return {
+      loading: false,
       configuration: {
         multipleChoices: false,
         multiple: false,
@@ -355,9 +357,12 @@ export default {
         billType:'XS',
         corpsTypeId: this.treeDeptId
       })
+      this.loading = true;
       customerList(queryParams).then(res => {
         this.dataList = res.data.data.records
         this.page.total = res.data.data.total
+      }).finally(() => {
+        this.loading = false;
       })
     },
     //树桩列点击展开触发

+ 2 - 2
src/views/financialManagement/paymentSettle/paymentSettleDetailsPage.vue

@@ -9,7 +9,7 @@
           <el-button type="warning"
                      class="el-button--small-yh"
                      @click.stop="confirmSettlement"
-          >结算
+          >付费
           </el-button>
           <el-button class="el-button--small-yh"
                      type="primary"
@@ -412,7 +412,7 @@
         this.$refs["form"].validate((valid,done) => {
           done();
           if(valid){
-            this.$confirm("是否确认结算?", "提示", {
+            this.$confirm("是否确认付费?", "提示", {
               confirmButtonText: "确认",
               cancelButtonText: "取消",
               type: "warning",

+ 2 - 2
src/views/financialManagement/receiptSettle/receiptSettleDetailsPage.vue

@@ -11,7 +11,7 @@
                      class="el-button--small-yh"
                      :disabled="financeDisabled"
                      @click.stop="confirmSettlement"
-          >结算
+          >收费
           </el-button>
           <el-button class="el-button--small-yh"
                      type="primary"
@@ -417,7 +417,7 @@
         this.$refs["form"].validate((valid,done) => {
           done();
           if(valid){
-            this.$confirm("是否确认结算?", "提示", {
+            this.$confirm("是否确认收费?", "提示", {
               confirmButtonText: "确认",
               cancelButtonText: "取消",
               type: "warning",