Browse Source

进口页面

qinbai 3 years ago
parent
commit
159aab5ce0

+ 165 - 4
src/components/bill/billApplication.vue

@@ -1,11 +1,172 @@
 <template>
-$END$
+  <basic-container>
+    <avue-crud :option="option"
+               :data="dataList"
+               ref="crud"
+               v-model="form"
+               :page.sync="page"
+               :search.sync="search"
+               :table-loading="loading"
+               @search-change="searchChange"
+               @search-reset="searchReset"
+               @selection-change="selectionChange"
+               @current-change="currentChange"
+               @size-change="sizeChange"
+               @refresh-change="refreshChange"
+               @on-load="onLoad">
+      <template slot="corpIdSearch">
+        <select-component
+          v-model="search.corpId"
+          :configuration="configuration"
+        ></select-component>
+      </template>
+      <template slot="costTypeSearch">
+        <breakdown-select
+          v-model="search.costType"
+          :configuration="breakConfiguration"
+        ></breakdown-select>
+      </template>
+    </avue-crud>
+    <div style="margin-left: 92%;padding: 7px">
+       <span slot="footer" class="dialog-footer" >
+           <el-button @click="$emit('choceApplication')">关闭</el-button>
+       </span>
+    </div>
+  </basic-container>
 </template>
 
 <script>
-export default {
-name: "billApplication"
-}
+  import option from "./config/application.json";
+  import { getBillList } from "@/api/financialManagement/paymentRequest";
+
+  export default {
+    name: "billApplication",
+    props:{
+      billType:{
+        type:String
+      },
+      choceApplication: {
+        type: Function
+      }
+    },
+    data() {
+      return {
+        loading : false,
+        form: {},
+        search:{},
+        show:true,
+        detailData:{},
+        option: option,
+        parentId:0,
+        dataList: [],
+        page: {
+          pageSize: 10,
+          pagerCount: 5,
+          total: 0,
+        },
+        query:{},
+        configuration:{
+          multipleChoices:false,
+          multiple:false,
+          disabled:false,
+          searchShow:true,
+          collapseTags:false,
+          clearable:true,
+          placeholder:'请点击右边按钮选择',
+          dicData:[]
+        },
+        breakConfiguration:{
+          multipleChoices:false,
+          multiple:false,
+          disabled:false,
+          searchShow:true,
+          collapseTags:false,
+          clearable:true,
+          placeholder:'请点击右边按钮选择',
+          dicData:[]
+        },
+      }
+    },
+    created() {
+
+    },
+    mounted() {
+      option.height = window.innerHeight - 200 ;
+    },
+    methods: {
+      //新单打开
+      addReceipt(row){
+        this.detailData = {
+          id: row.id,
+          status: 1
+        };
+        this.show = false;
+      },
+      //编辑打开
+      editOpen(row, status){
+        this.detailData = {
+          id: row.id,
+          status: status
+        };
+        this.show = false;
+      },
+      rowDel(row, index, done) {
+        if(row.id){
+          this.$confirm("确定将选择数据删除?", {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning"
+          }).then(() => {
+            remove(row.id).then(res =>{
+              if(res.data.success){
+                this.$message.success("操作成功!");
+                this.onLoad(this.page);
+              }
+            })
+          });
+        }
+      },
+      //点击搜索按钮触发
+      searchChange(params, done) {
+        this.query = params;
+        this.page.currentPage = 1;
+        this.onLoad(this.page, params);
+        done()
+      },
+      searchReset() {
+        console.log('1')
+      },
+      selectionChange() {
+        console.log('1')
+      },
+      currentChange() {
+        console.log('1')
+      },
+      sizeChange() {
+        console.log('1')
+      },
+      refreshChange() {
+        console.log('1')
+      },
+      onLoad(page, params = {}) {
+        this.loading = true;
+        if (params.createTime != undefined) {  //合同
+          params.createStartDate = params.createTime[0]+ " " + "00:00:00";
+          params.createEndDate = params.createTime[1] + " " + "23:59:59";
+          this.$delete(params,'createTime')
+        }
+        getBillList(page.currentPage, page.pageSize,params).then(res=>{
+          this.dataList = res.data.data.records
+          this.page.total = res.data.data.total
+          this.loading = false;
+        })
+      },
+      goBack() {
+        this.detailData=this.$options.data().detailData
+        this.show = true;
+      }
+    }
+  }
 </script>
 
 <style scoped>

+ 105 - 33
src/components/bill/config/application.json

@@ -3,85 +3,157 @@
   "tip": false,
   "simplePage": true,
   "searchShow": true,
-  "addBtn":false,
-  "editBtn":false,
-  "addRowBtn":false,
-  "cellBtn":false,
-  "cancelBtn":false,
-  "refreshBtn": false,
-  "searchMenuPosition": "right",
   "searchMenuSpan": 24,
-  "searchSpan": 8,
-  "align": "center",
-  "delBtn":true,
   "dialogWidth": "60%",
-  "tree": true,
+  "align": "center",
+  "searchSpan": 8,
+  "searchMenuPosition": "right",
   "border": true,
   "index": true,
-  "selection": true,
+  "selection": false,
+  "viewBtn": false,
+  "editBtn": false,
+  "delBtn": false,
+  "menuWidth": 180,
   "menu": false,
-  "menuWidth": 0,
   "dialogClickModal": false,
+  "searchLabelWidth": 120,
+  "searchIcon": true,
+  "searchIndex": 2,
+  "addBtn":false,
+  "headerAlign": "center",
   "column": [
     {
       "label": "合同号",
       "prop": "accSysNo",
-      "overHidden": true,
       "search": true,
-      "width": 150,
+      "overHidden": true,
+      "width": 120,
       "index": 2
     },
     {
       "label": "提单号",
       "prop": "srcBillNo",
+      "search": true,
       "overHidden": true,
+      "width": 120,
+      "index": 3
+    },
+    {
+      "label": "客户名称",
+      "prop": "corpId",
       "search": true,
-      "width": 150,
-      "index": 2
+      "hide": true,
+      "overHidden": true
     },
     {
       "label": "客户名称",
       "prop": "corpName",
       "overHidden": true,
-      "hide": true,
-      "search": false,
-      "width": 150,
-      "index": 2
+      "width": 200,
+      "index": 4
     },
     {
-      "label": "费用名称",
-      "prop": "costType",
+      "label": "单据状态",
+      "prop": "billType",
+      "type": "select",
+      "search": true,
       "overHidden": true,
-      "hide": true,
-      "search": true
+      "index": 1,
+      "width": 120,
+      "dicData": [
+        {
+          "label": "申请",
+          "value": "申请"
+        },
+        {
+          "label": "销售",
+          "value":"销售"
+        }
+      ]
     },
     {
       "label": "费用名称",
       "prop": "itemName",
       "overHidden": true,
       "width": 150,
-      "index": 4
+      "index": 5
     },
     {
-      "label": "金额",
-      "prop": "amount",
+      "label": "费用名称",
+      "prop": "costType",
+      "search": true,
+      "hide": true,
+      "overHidden": true
+    },
+    {
+      "label": "数量",
+      "prop": "quantity",
+      "overHidden": true,
+      "width": 120,
+      "index": 6
+    },
+    {
+      "label": "单价",
+      "prop": "price",
+      "width": 120,
       "overHidden": true,
-      "width": 150,
       "index": 7
     },
     {
+      "label": "账单金额",
+      "prop": "amount",
+      "overHidden": true,
+      "width": 120,
+      "index": 8
+    },
+    {
       "label": "结算金额",
       "prop": "settlementAmount",
-      "width": 150,
+      "width": 120,
       "overHidden": true,
-      "index": 8
+      "index": 9
+    },
+    {
+      "label": "币别",
+      "prop": "currency",
+      "width": 120,
+      "overHidden": true,
+      "index": 10
+    },
+    {
+      "label": "汇率",
+      "prop": "exchangeRate",
+      "width": 120,
+      "overHidden": true,
+      "index": 11
+    },
+    {
+      "label": "录入人",
+      "prop": "createUserName",
+      "overHidden": true,
+      "index": 12,
+      "width": 120
+    },
+    {
+      "label": "录入日期",
+      "prop": "createTime",
+      "type": "date",
+      "search": true,
+      "unlinkPanels": true,
+      "searchRange": true,
+      "overHidden": true,
+      "format": "yyyy-MM-dd",
+      "valueFormat": "yyyy-MM-dd",
+      "width": 200,
+      "index": 13
     },
     {
       "label": "备注",
       "prop": "remark",
       "overHidden": true,
-      "index": 13,
-      "width": 250
+      "index": 14,
+      "width": 200
     }
   ]
 }

+ 78 - 137
src/views/purchase/stockBill/config/mainList.json

@@ -1,13 +1,11 @@
 {
   "lazy": true,
   "tip": false,
+  "searchMenuPosition": "right",
   "simplePage": true,
   "searchShow": true,
-  "searchMenuSpan": 6,
   "dialogWidth": "60%",
-  "align": "center",
-  "searchSpan": 8,
-  "searchMenuPosition": "right",
+  "addBtn": false,
   "tree": true,
   "border": true,
   "index": true,
@@ -20,179 +18,122 @@
   "searchLabelWidth": 120,
   "searchIcon": true,
   "searchIndex": 2,
-  "addBtnText": "新单",
-  "expand": true,
-  "expandWidth": 38,
-  "selectionWidth": 40,
-  "column":[
+  "searchSpan": 8,
+  "column": [
     {
-      "label": "合同号",
-      "prop": "orderNo",
+      "label": "大字(规格编码)",
+      "prop": "code",
       "search": true,
-      "searchOrder": 1,
       "index": 1,
-      "overHidden": true,
-      "width":150
+      "width": 120
     },
     {
-      "label": "提单号",
-      "prop": "billNo",
+      "label": "名称",
+      "prop": "cname",
       "search": true,
-      "searchOrder": 2,
-      "overHidden": true,
-      "index": 2,
-      "width":150
-    },
-    {
-      "label": "供应商",
-      "prop": "strCorpName",
-      "overHidden": true,
-      "index": 3,
-      "width":200
+      "index": 1,
+      "width": 100
     },
     {
-      "label": "供应商",
-      "prop": "corpId",
+      "label": "花纹",
+      "prop": "brandItem",
       "search": true,
-      "hide": true,
-      "searchOrder": 3
-    },
-    {
-      "label": "采购商",
-      "prop": "strPurchaserName",
-      "overHidden": true,
-      "searchOrder": 4,
-      "index": 4,
-      "width":200
+      "index": 1,
+      "width": 100
     },
     {
-      "label": "合同日期",
-      "prop": "businesDate",
-      "type": "date",
-      "format": "yyyy-MM-dd",
-      "valueFormat": "yyyy-MM-dd",
-      "unlinkPanels": true,
-      "searchRange": true,
-      "searchOrder": 5,
+      "label": "产地",
+      "prop": "placeProduction",
       "search": true,
-      "overHidden": true,
-      "index": 5,
-      "width":150
+      "index": 1,
+      "width": 100
     },
     {
-      "label": "数量",
-      "prop": "orderQuantity",
-      "overHidden": true,
-      "index": 6,
-      "width":100
+      "label": "规格",
+      "prop": "typeno",
+      "search": true,
+      "index": 1,
+      "width": 100
     },
     {
-      "label": "码单重量",
-      "prop": "billWeight",
-      "overHidden": true,
-      "index": 7,
-      "width":100
+      "label": "规格1",
+      "prop": "typenoOne",
+      "search": true,
+      "index": 1,
+      "width": 100
     },
     {
-      "label": "发票净重",
-      "prop": "invoiceWeight",
-      "overHidden": true,
-      "index": 8,
-      "width":100
+      "label": "品牌",
+      "prop": "brand",
+      "search": true,
+      "index": 1,
+      "width": 100
     },
     {
-      "label": "已收数量",
-      "prop": "actualQuantity",
-      "overHidden": true,
-      "index": 9,
-      "width":100
+      "label": "总库存",
+      "prop": "balanceQuantity",
+      "search": false,
+      "index": 1,
+      "width": 100,
+      "cell": true
     },
     {
-      "label": "合同金额",
-      "prop": "orderAmount",
-      "overHidden": true,
-      "index": 10,
-      "width":100
+      "label": "内贸锁定",
+      "prop": "lockingQuantity",
+      "search": false,
+      "index": 1,
+      "width": 100,
+      "cell": true
     },
     {
-      "label": "已付金额",
-      "prop": "settlmentAmount",
-      "overHidden": true,
-      "index": 11,
-      "width":100
+      "label": "可用库存",
+      "prop": "surplusRouteQuantity",
+      "search": false,
+      "index": 1,
+      "width": 100,
+      "cell": true
     },
     {
-      "label": "业务员",
-      "prop": "salesName",
-      "overHidden": true,
-      "searchOrder": 6,
-      "search": true,
-      "index": 12,
-      "width":100
+      "label": "供应商",
+      "prop": "corpName",
+      "search": false,
+      "index": 1,
+      "width": 100
     },
     {
-      "label": "要求发货日期",
-      "prop": "requiredDeliveryDate",
+      "label": "创建日期",
       "type": "date",
-      "format": "yyyy-MM-dd",
-      "valueFormat": "yyyy-MM-dd",
       "unlinkPanels": true,
       "searchRange": true,
-      "overHidden": true,
+      "prop": "createTime",
       "search": true,
-      "searchOrder": 7,
-      "index": 13,
-      "width":150
-    },
-    {
-      "label": "要求到货日期",
-      "prop": "requiredArrivalDate",
-      "type": "date",
+      "index": 1,
+      "width": 100,
       "format": "yyyy-MM-dd",
       "valueFormat": "yyyy-MM-dd",
-      "unlinkPanels": true,
-      "searchRange": true,
       "overHidden": true,
-      "search": true,
-      "searchOrder": 8,
-      "index": 14,
-      "width":150
+      "pickerOptions": {}
     },
-     {
-      "label": "付款/开证日期",
-      "prop": "accountsCollectionDate",
-      "type": "date",
-      "format": "yyyy-MM-dd",
-      "valueFormat": "yyyy-MM-dd",
-      "unlinkPanels": true,
-      "searchRange": true,
-       "overHidden": true,
-       "search": true,
-       "searchOrder": 10,
-      "index": 16,
-      "width":150
+    {
+      "label": "创建人",
+      "prop": "createUserName",
+      "search": false,
+      "index": 1,
+      "width": 100
     },
     {
-      "label": "信用证到期日",
-      "prop": "creditDate",
-      "type": "date",
-      "format": "yyyy-MM-dd",
-      "valueFormat": "yyyy-MM-dd",
-      "unlinkPanels": true,
-      "searchRange": true,
-      "overHidden": true,
-      "search": true,
-      "searchOrder": 11,
-      "index": 17,
-      "width":150
+      "label": "更新日期",
+      "prop": "updateTime",
+      "search": false,
+      "index": 1,
+      "width": 100
     },
     {
-      "label": "备注",
-      "prop": "orderRemark",
-      "overHidden": true,
-      "searchOrder": 12,
-      "index": 18,
-      "width":200
+      "label": "更新人",
+      "prop": "updateUserName",
+      "search": false,
+      "index": 1,
+      "width": 100
     }
   ]
 }

+ 102 - 4
src/views/purchase/stockBill/index.vue

@@ -1,11 +1,109 @@
 <template>
-$END$
+  <basic-container>
+    <avue-crud :option="option"
+               :data="dataList"
+               ref="crud"
+               v-model="form"
+               :page.sync="page"
+               :search.sync="search"
+               :table-loading="loading"
+               @search-change="searchChange"
+               @search-reset="searchReset"
+               @selection-change="selectionChange"
+               @current-change="currentChange"
+               @size-change="sizeChange"
+               @refresh-change="refreshChange"
+               @on-load="onLoad">
+    </avue-crud>
+  </basic-container>
 </template>
 
 <script>
-export default {
-name: "index"
-}
+  import option from "./config/mainList.json";
+  import { getBillList } from "@/api/financialManagement/paymentRequest";
+
+  export default {
+    data() {
+      return {
+        loading : false,
+        form: {},
+        search:{},
+        show:true,
+        detailData:{},
+        option: option,
+        parentId:0,
+        dataList: [],
+        page: {
+          pageSize: 10,
+          pagerCount: 5,
+          total: 0,
+        },
+        query:{},
+      }
+    },
+    created() {
+
+    },
+    mounted() {
+      option.height = window.innerHeight - 200 ;
+    },
+    methods: {
+      //新单打开
+      addReceipt(row){
+
+      },
+      //编辑打开
+      editOpen(row, status){
+
+      },
+      rowDel(row, index, done) {
+        if(row.id){
+          this.$confirm("确定将选择数据删除?", {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning"
+          }).then(() => {
+
+          });
+        }
+      },
+      //点击搜索按钮触发
+      searchChange(params, done) {
+        this.query = params;
+        this.page.currentPage = 1;
+        this.onLoad(this.page, params);
+        done()
+      },
+      searchReset() {
+        console.log('1')
+      },
+      selectionChange() {
+        console.log('1')
+      },
+      currentChange() {
+        console.log('1')
+      },
+      sizeChange() {
+        console.log('1')
+      },
+      refreshChange() {
+        console.log('1')
+      },
+      onLoad(page, params = {}) {
+        // this.loading = true;
+        // if (params.createTime != undefined) {  //合同
+        //   params.createStartDate = params.createTime[0]+ " " + "00:00:00";
+        //   params.createEndDate = params.createTime[1] + " " + "23:59:59";
+        //   this.$delete(params,'createTime')
+        // }
+        // getBillList(page.currentPage, page.pageSize,params).then(res=>{
+        //   this.dataList = res.data.data.records
+        //   this.page.total = res.data.data.total
+        //   this.loading = false;
+        // })
+      },
+    }
+  }
 </script>
 
 <style scoped>