Browse Source

修改bug

Qukatie 2 years ago
parent
commit
d6c4332667

BIN
src/assets/img/advanceCollectionBg.png


BIN
src/assets/img/contractAmountBg.png


BIN
src/assets/img/deliveredBg.png


BIN
src/assets/img/receivableBg.png


BIN
src/assets/img/uncollectedBg.png


+ 46 - 1
src/enums/column-name.js

@@ -870,7 +870,52 @@ const columnName = [{
   name: '港杂费-运费明细表'
 }, {
   code: 207,
-  name: '港杂费-杂费明细表'
+  name: '客户(Y)-列表页'
+}, {
+  code: 208,
+  name: '客户(Y)-杂费明细表'
+}, {
+  code: 209,
+  name: '供应商(Y)-列表页'
+}, {
+  code: 210,
+  name: '供应商(Y)-杂费明细表'
+}, {
+  code: 211,
+  name: '销售单(Y)-列表页'
+}, {
+  code: 212,
+  name: '销售单(Y)-杂费明细表'
+}, {
+  code: 213,
+  name: '采购单(Y)-列表页'
+}, {
+  code: 214,
+  name: '采购单(Y)-杂费明细表'
+}, {
+  code: 215,
+  name: '退货单(Y)-列表页'
+}, {
+  code: 216,
+  name: '退货单(Y)-杂费明细表'
+}, {
+  code: 217,
+  name: '产品(Y)-列表页'
+}, {
+  code: 218,
+  name: '产品(Y)-杂费明细表'
+}, {
+  code: 219,
+  name: '库存(Y)-列表页'
+}, {
+  code: 220,
+  name: '库存(Y)-杂费明细表'
+}, {
+  code: 221,
+  name: '费用收入(Y)-列表页'
+}, {
+  code: 222,
+  name: '费用收入(Y)-杂费明细表'
 }
 ]
 export const getColumnName = (key) => {

+ 311 - 0
src/views/basicData/client/detailsPage.vue

@@ -0,0 +1,311 @@
+<template>
+  <div>
+    <div class="borderless">
+      <div class="customer-head">
+        <div class="customer-back">
+          <el-button type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left"
+            @click="backToList">返回列表
+          </el-button>
+        </div>
+        <div class="add-customer-btn">
+          <el-button type="primary" size="small" @click="editCustomer">
+            保存数据
+          </el-button>
+        </div>
+      </div>
+      <containerTitle title="基础资料" style="margin-top: 60px"></containerTitle>
+      <basic-container v-loading="loadingBtn">
+        <avue-form ref="form" class="trading-form" v-model="form" :option="option">
+        </avue-form>
+      </basic-container>
+      <containerTitle title="地址管理"></containerTitle>
+      <basic-container v-loading="loadingBtn">
+        <avue-crud ref="crud" :option="optionList" :data="dataList" :table-loading="loading" @saveColumn="saveColumn"
+          @resetColumn="resetColumn" :cell-style="cellStyle" @row-save="rowSave" @row-update="addUpdate">
+          <template slot="menuLeft">
+            <el-button type="primary" @click="addRow" size="small" :disabled="detailData.status == 1">新增
+            </el-button>
+          </template>
+          <template slot="menu" slot-scope="{ row, index }">
+            <el-button size="small" type="text" @click="rowCell(row, index)">{{
+            row.$cellEdit ? "保存" : "修改" }}</el-button>
+            <el-button size="small" type="text" @click="rowDel(row, index)">删除
+            </el-button>
+          </template>
+        </avue-crud>
+      </basic-container>
+      <containerTitle title="上传附件"></containerTitle>
+      <c-upload typeUpload="CD" deleteUrl="/api/trade-purchase/woodHarvestingCloud/removeByFileId"
+        :data="orderFilesList" display :enumerationValue="35.1" :disabled="detailData.status == 1"></c-upload>
+      <el-dialog :title="addressTitle" v-dialogDrag :visible.sync="addressVisible" class="avue-dialog avue-dialog--top"
+        width="50%" append-to-body>
+        <span>
+          <div class="">
+            <span>
+              客户地址
+            </span>
+            <span>
+              仓库地址
+            </span>
+          </div>
+        </span>
+        <div class="avue-dialog__footer">
+          <el-button @click="type1=false">取 消</el-button>
+          <el-button @click="type1=false" type="primary">确 定</el-button>
+        </div>
+      </el-dialog>
+    </div>
+  </div>
+</template>
+
+<script>
+import { optionList } from "./js/optionList";
+import { getDetail, submit, itemDel } from "@/api/maintenance/landFreight";
+import { areaTypeTree } from "@/api/basicData/customerInformation";
+import { getCode } from "@/api/basicData/customerInquiry";
+export default {
+  name: "index",
+  data() {
+    return {
+      activeName: 'first',
+      loadingBtn: false,
+      addressTitle: null,
+      addressVisible: false,
+      form: {},
+      dataList: [],
+      option: {
+        menuBtn: false,
+        labelWidth: 130,
+        column: [
+          {
+            label: "客户名称",
+            prop: "a",
+            type: "select",
+            rules: [
+              {
+                required: true,
+                message: "",
+                trigger: "blur"
+              }
+            ],
+            span: 8,
+          },
+          {
+            label: "客户分类",
+            prop: "b",
+            type: "select",
+            span: 8,
+          },
+          {
+            label: "期初欠款",
+            prop: "c",
+            span: 8,
+          },
+          {
+            label: "电话",
+            prop: "d",
+            span: 8,
+          },
+          {
+            label: "备用电话",
+            prop: "e",
+            span: 8,
+          },
+          {
+            label: "传真",
+            prop: "f",
+            span: 8,
+          },
+          {
+            label: "邮箱",
+            prop: "g",
+            span: 8,
+          },
+          {
+            label: "备注",
+            prop: "remarks",
+            type: "textarea",
+            minRows: 2,
+            span: 24,
+          }
+        ]
+      },
+      optionList: {},
+    };
+  },
+  props: {
+    detailData: {
+      type: Object
+    }
+  },
+  async created() {
+    this.optionList = await this.getColumnData(
+      this.getColumnName(208),
+      optionList
+    );
+    if (this.detailData.id) {
+      this.getDetail(this.detailData.id);
+    }
+    if (this.detailData.status == 1) {
+      this.option.disabled = true;
+    }
+    // getCode().then(res => {
+    //   this.currencyList = res.data.data;
+    // });
+    this.getAllWorkDicts()
+  },
+  methods: {
+    getAllWorkDicts() {
+      this.findObject(this.optionList.column, "departureId").dicData = JSON.parse(localStorage.getItem('areaTypeTree'));
+    },
+    cellStyle() {
+      return "padding:0;height:40px;";
+    },
+    selectValue(value, row) {
+      console.log(value, row)
+      if (row.feesId) {
+        row.feesName = value.cname
+      } else {
+        row.feesName = ""
+      }
+    },
+    getDetail(id) {
+      this.loadingBtn = true
+      getDetail(id)
+        .then(res => {
+          this.form = res.data.data;
+          this.dataList = res.data.data.orderCostItemList;
+        })
+        .finally(() => {
+          this.loadingBtn = false;
+        });
+    },
+    getCorpData(row) {
+      this.form.corpName = row.cname
+    },
+    addRow() {
+      this.addressTitle = '新增地址'
+      this.addressVisible = true
+    },
+    rowCell(row, index) {
+      this.$refs.crud.rowCell(row, index)
+    },
+    rowSave(form, done) {
+      done()
+    },
+    addUpdate(form, index, done, loading) {
+      done()
+    },
+    rowDel(row, index) {
+      this.$confirm("确定删除数据?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(() => {
+        if (row.id) {
+          itemDel(row.id).then(res => {
+            this.$message({
+              type: "success",
+              message: "删除成功!"
+            });
+            this.dataList.splice(index, 1);
+          });
+        } else {
+          this.$message({
+            type: "success",
+            message: "删除成功!"
+          });
+          this.dataList.splice(index, 1);
+        }
+      });
+    },
+    //修改提交触发
+    editCustomer() {
+      this.$refs["form"].validate((valid, done) => {
+        done();
+        if (valid) {
+          this.dataList.forEach(e => {
+            e.departure = e.departureId ? e.departureId.replace(/,/g, "/") : ''
+          })
+          this.loadingBtn = true;
+          submit({ ...this.form, feesType: 1, orderCostItemList: this.dataList })
+            .then(res => {
+              this.$message.success("保存成功");
+              this.form = res.data.data;
+              this.dataList = res.data.data.orderCostItemList;
+            })
+            .finally(() => {
+              this.loadingBtn = false;
+            });
+        } else {
+          return false;
+        }
+      });
+    },
+    async saveColumn() {
+      const inSave = await this.saveColumnData(
+        this.getColumnName(208),
+        this.optionList
+      );
+      if (inSave) {
+        this.$nextTick(() => {
+          this.$refs.crud.doLayout();
+        });
+        this.$message.success("保存成功");
+        //关闭窗口
+        this.$refs.crud.$refs.dialogColumn.columnBox = false;
+      }
+    },
+    async resetColumn() {
+      this.optionList = optionList;
+      const inSave = await this.delColumnData(
+        this.getColumnName(208),
+        optionList
+      );
+      if (inSave) {
+        this.$nextTick(() => {
+          this.$refs.crud.doLayout();
+        });
+        this.getAllWorkDicts()
+        this.$message.success("重置成功");
+        this.$refs.crud.$refs.dialogColumn.columnBox = false;
+      }
+    },
+    //返回列表
+    backToList() {
+      this.$emit("goBack");
+    }
+  }
+};
+</script>
+
+<style lang="scss" scoped>
+.trading-form ::v-deep .el-form-item {
+  margin-bottom: 8px !important;
+}
+
+::v-deep .el-form-item__error {
+  display: none !important;
+}
+
+.img-form ::v-deep .el-form-item {
+  height: 150px;
+  line-height: 150px;
+  margin-bottom: 8px !important;
+}
+
+.img-form ::v-deep .avue-upload__icon {
+  font-size: 20px;
+  width: 150px;
+  height: 150px;
+  line-height: 150px;
+}
+
+::v-deep .el-table .cell {
+  padding: 0 2px !important;
+}
+
+::v-deep .avue-crud .el-table .el-form-item__label {
+  left: -1px;
+}
+</style>

+ 175 - 0
src/views/basicData/client/index.vue

@@ -0,0 +1,175 @@
+<template>
+    <div>
+
+      <basic-container v-show="show" class="page-crad">
+        <avue-crud ref="crud" :option="option" :data="dataList" :page.sync="page" :search.sync="search"
+          @search-change="searchChange" @current-change="currentChange" @size-change="sizeChange"
+          @refresh-change="refreshChange" @on-load="onLoad" :table-loading="loading" @saveColumn="saveColumn"
+          @resetColumn="resetColumn" :cell-style="cellStyle" @search-criteria-switch="searchCriteriaSwitch">
+          <template slot="menuLeft">
+            <el-button type="primary" icon="el-icon-plus" size="small" @click.stop="newAdd()">新增
+            </el-button>
+          </template>
+          <template slot-scope="{ row, index }" slot="menu">
+            <el-button type="text" size="small" @click.stop="editOpen(row,2)">
+              查看
+            </el-button>
+            <el-button type="text" size="small" @click.stop="rowDel(row, index)">
+              删除
+            </el-button>
+          </template>
+        </avue-crud>
+      </basic-container>
+      <details-page v-if="!show" @goBack="backToList" :detailData="detailData" />
+    </div>
+  </template>
+  
+  <script>
+  import detailsPage from "./detailsPage";
+  import { option } from "./js/optionList";
+  import { getList, remove } from "@/api/maintenance/landFreight";
+  import { areaTypeTree } from "@/api/basicData/customerInformation";
+  export default {
+    name: "index",
+    data() {
+      return {
+        show: true,
+        loading: false,
+        form: {},
+        search: {},
+        detailData: {},
+        dataList: [],
+        selectionList: [],
+        page: {
+          pageSize: 10,
+          currentPage: 1,
+          total: 0,
+          pageSizes: [10, 50, 100, 200, 300, 400, 500]
+        },
+        option: {},
+      };
+    },
+    components: {
+      detailsPage
+    },
+    async created() {
+      this.option = await this.getColumnData(this.getColumnName(207), option);
+      this.option.height = window.innerHeight - 210;
+      this.getAllWorkDicts()
+    },
+    methods: {
+      getAllWorkDicts() {
+        this.$refs.crud.init();
+      },
+      searchCriteriaSwitch(type) {
+        if (type) {
+          this.option.height = this.option.height - 97;
+        } else {
+          this.option.height = this.option.height + 97;
+        }
+        this.$refs.crud.getTableHeight();
+      },
+      cellStyle() {
+        return "padding:0;height:40px;";
+      },
+      //点击搜索按钮触发
+      searchChange(params, done) {
+        this.page.currentPage = 1;
+        this.onLoad(this.page, params);
+        done();
+      },
+      refreshChange() {
+        this.onLoad(this.page, this.search);
+      },
+      newAdd() {
+        this.show = false;
+      },
+      onLoad(page, params={}) {
+        // this.loading = true;
+        let data = this.deepClone(Object.assign(params, this.search));
+        // getList(
+        //   page.currentPage,
+        //   page.pageSize,
+        //   data
+        // )
+        //   .then(res => {
+        //     this.dataList = res.data.data.records ? res.data.data.records : [];
+        //     this.page.total = res.data.data.total;
+        //   })
+        //   .finally(() => {
+        //     this.loading = false;
+        //   });
+      },
+      editOpen(row, status) {
+        this.detailData = {
+          id: row.id,
+          status: status
+        };
+        this.show = false;
+      },
+      currentChange(val) {
+        this.page.currentPage = val;
+      },
+      sizeChange(val) {
+        this.page.currentPage = 1;
+        this.page.pageSize = val;
+      },
+      rowDel(row, index, done) {
+        this.$confirm("确定删除数据?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(() => {
+          remove(row.id).then(res => {
+            if (res.data.code == 200) {
+              this.$message({
+                type: "success",
+                message: "删除成功!"
+              });
+              this.onLoad(this.page, this.search);
+            }
+          });
+        });
+      },
+      async saveColumn() {
+        const inSave = await this.saveColumnData(
+          this.getColumnName(207),
+          this.option
+        );
+        if (inSave) {
+          this.$nextTick(() => {
+            this.$refs.crud.doLayout();
+          });
+          this.$message.success("保存成功");
+          //关闭窗口
+          this.$refs.crud.$refs.dialogColumn.columnBox = false;
+        }
+      },
+      async resetColumn() {
+        this.option = option;
+        const inSave = await this.delColumnData(this.getColumnName(207), option);
+        if (inSave) {
+          this.$nextTick(() => {
+            this.$refs.crud.doLayout();
+          });
+          this.getAllWorkDicts()
+          this.$message.success("重置成功");
+          this.$refs.crud.$refs.dialogColumn.columnBox = false;
+        }
+      },
+      //返回列表
+      backToList() {
+        this.detailData = this.$options.data().detailData;
+        this.show = true;
+        this.onLoad(this.page, this.search);
+      }
+    }
+  };
+  </script>
+  
+  <style scoped>
+  .page-crad ::v-deep .basic-container__card {
+    height: 94.2vh;
+  }
+  </style>
+  

+ 114 - 0
src/views/basicData/client/js/optionList.js

@@ -0,0 +1,114 @@
+import { number } from "echarts"
+
+export const option = {
+  searchShow: true,
+  searchMenuSpan: 24,
+  align: "center",
+  searchSpan: 8,
+  tip: false,
+  border: true,
+  index: true,
+  addBtn: false,
+  viewBtn: false,
+  editBtn: false,
+  delBtn: false,
+  menuWidth: 120,
+  searchIcon: true,
+  searchIndex: 2,
+  column: [
+    {
+      label: "客户名称",
+      prop: "corpName",
+      type: 'select',
+      overHidden: true,
+      search: true
+    },
+    {
+      label: "电话",
+      prop: "1",
+      overHidden: true,
+      search: true
+    },
+    {
+      label: "合同金额",
+      prop: "2",
+      overHidden: true,
+    },
+    {
+      label: "已送货",
+      prop: "3",
+      overHidden: true,
+    },
+    {
+      label: "预收款",
+      prop: "4",
+      overHidden: true,
+    },
+    {
+      label: "未收款",
+      prop: "5",
+      overHidden: true,
+    },
+    {
+      label: "已收款",
+      prop: "6",
+      overHidden: true,
+    },
+    {
+      label: "状态",
+      prop: "7",
+      type: 'select',
+      hide: true,
+      search: true,
+      showColumn: false,
+      overHidden: true,
+    },
+    {
+      label: "客户分类",
+      prop: "8",
+      type: 'select',
+      hide: true,
+      search: true,
+      showColumn: false,
+      overHidden: true,
+    },
+    {
+      label: "日期",
+      prop: "9",
+      hide: true,
+      search: true,
+      showColumn: false,
+      overHidden: true,
+    },
+    {
+      label: "附件",
+      prop: "10",
+      hide: true,
+      search: true,
+      showColumn: false,
+      overHidden: true,
+    }
+  ]
+}
+export const optionList = {
+  align: "center",
+  addBtn: false,
+  refreshBtn: false,
+  editBtn: false,
+  delBtn: false,
+  border: true,
+  menuWidth: 120,
+  stripe: true,
+  column: [
+    {
+      label: "地址类型",
+      prop: "departureId",
+      overHidden: true
+    },
+    {
+      label: "详细地址",
+      prop: "address",
+      overHidden: true
+    }
+  ]
+}

+ 1 - 0
src/views/exportTrade/customerInquiry/config/customerContact.json

@@ -14,6 +14,7 @@
     "indexSlot": true,
     "dialogDrag": true,
     "summaryText": "合计",
+    "dialogWidth":"80%",
     "sumColumnList": [
         {
             "name": "orderQuantity",

+ 1 - 0
src/views/exportTrade/salesContract/config/customerContact.json

@@ -15,6 +15,7 @@
     "indexSlot": true,
     "tip": false,
     "summaryText": "合计",
+    "dialogWidth":"80%",
     "sumColumnList": [
         {
             "name": "orderQuantity",