Browse Source

Merge branch 'dev' of http://git.echepei.com/caojunjie/Smart_platform_ui into dev

QuKatie 3 years ago
parent
commit
04a03e1c2f

+ 3 - 0
src/App.vue

@@ -34,4 +34,7 @@ export default {
   color: #000000 !important;
   background-color: #fafafa !important;
 }
+.el-dialog__headerbtn {
+  top: 9px !important;
+}
 </style>

+ 61 - 0
src/api/dealer/allocation.js

@@ -0,0 +1,61 @@
+import request from '@/router/axios';
+
+// 列表查询
+export function getList(data) {
+  return request({
+    url: '/api/blade-deliver-goods/allot/list',
+    method: 'get',
+    params: data
+  })
+}
+// 列表删除
+export function deleteList(data) {
+  return request({
+    url: '/api/blade-deliver-goods/allot/update',
+    method: 'post',
+    data: {
+      id:data
+    }
+  })
+}
+//详情
+export function dataDetail(data) {
+  return request({
+    url: '/api/blade-deliver-goods/allot/detail?id='+data,
+    method: 'get'
+  })
+}
+//保存&&修改
+export function typeSave(data) {
+  return request({
+    url: '/api/blade-deliver-goods/allot/submit',
+    method: 'post',
+    data: data
+  })
+}
+//明细删除
+export function removeGoods(data) {
+  return request({
+    url: '/api/blade-deliver-goods/deliveryitems/update',
+    method: 'post',
+    data: {
+      id:data
+    }
+  })
+}
+//确认调拨
+export function confirmAllot(data) {
+  return request({
+    url: '/api/blade-deliver-goods/allot/affirmAllot',
+    method: 'post',
+    data
+  })
+}
+//撤销调拨
+export function repealAllot(data) {
+  return request({
+    url: '/api/blade-deliver-goods/allot/repealAllot',
+    method: 'post',
+    data
+  })
+}

+ 24 - 0
src/api/landTransportation/antiepidemic.js

@@ -16,3 +16,27 @@ export function getAttachment(data) {
         params:data
     })
 }
+//修改附件
+export function enclosure(data) {
+    return request({
+        url: '/api/blade-land/ncp-check/file',
+        method: 'post',
+        data:data
+    })
+}
+// 保存防疫信息
+export function antiepidemicSave(data) {
+    return request({
+        url: '/api/blade-land/ncp-check/save',
+        method: 'post',
+        data
+    })
+}
+// 删除防疫信息
+export function remove(data) {
+    return request({
+        url: '/api/blade-land/ncp-check/remove',
+        method: 'post',
+        params:data
+    })
+}

+ 3 - 0
src/page/index/tags.vue

@@ -375,6 +375,9 @@ export default {
         if (tag.label == "报销") {
           this.$store.commit('BX_OUT_DETAIL');
         }
+        if (tag.label == "销售订单(D)") {
+          this.$store.commit('JXSSALE_OUT_DETAIL');
+        }
         this.$store.commit("DEL_TAG", tag);
         if (tag.value === this.tag.value) {
           tag = this.tagList[key === 0 ? key : key - 1]; //如果关闭本标签让前推一个

+ 15 - 0
src/router/views/index.js

@@ -1319,4 +1319,19 @@ export default [{
       component: () => import( /* webpackChunkName: "views" */ '@/views/workManagement/handoverSheet/index')
     }]
   },
+  //经销商产品调拨
+  {
+    path: '/dealer/allocation/index',
+    component: Layout,
+    hidden: true,
+    children: [{
+      path: '/dealer/allocation/index',
+      name: '产品调拨',
+      meta: {
+        i18n: '/dealer/allocation/index',
+        keepAlive: true,
+      },
+      component: () => import( /* webpackChunkName: "views" */ '@/views/dealer/allocation/index')
+    }]
+  },
 ]

+ 1 - 0
src/store/getters.js

@@ -50,5 +50,6 @@ const getters = {
   officeLyStatus: state => state.ifdetail.officeLyStatus,
   handOverStatus: state => state.ifdetail.handOverStatus,
   reimbursementStatus: state => state.ifdetail.reimbursementStatus,
+  dealerSaleStatus: state => state.ifdetail.dealerSaleStatus,
 }
 export default getters

+ 20 - 0
src/store/modules/ifdetail.js

@@ -24,6 +24,7 @@ const ifdetail = {
     officeLyStatus: false, //办公领用
     handOverStatus: false, // 交接单
     reimbursementStatus: false, // 报销
+    dealerSaleStatus: false, //经销商销售
   },
   actions: {},
   mutations: {
@@ -212,6 +213,13 @@ const ifdetail = {
     BX_OUT_DETAIL(state) {
       state.reimbursementStatus = false;
     },
+    // 经销商销售
+    JXSSALE_IN_DETAIL(state) {
+      state.dealerSaleStatus = true;
+    },
+    JXSSALE_OUT_DETAIL(state) {
+      state.dealerSaleStatus = false;
+    },
     //关闭所有
     DEL_ALL_DETAIL(state) {
       for (let item in state) {
@@ -286,6 +294,18 @@ const ifdetail = {
       if (tag.label == '采购申请') {
         state.officePurchaseStatus = true
       }
+      if (tag.label == '领用') {
+        state.officeLyStatus = true
+      }
+      if (tag.label == '交接单') {
+        state.handOverStatus = true
+      }
+      if (tag.label == '报销') {
+        state.reimbursementStatus = true
+      }
+      if (tag.label == '销售订单(D)') {
+        state.dealerSaleStatus = true
+      }
     }
   }
 

+ 1 - 0
src/views/businessManagement/salesOrder/detailsPageEdit.vue

@@ -921,6 +921,7 @@ export default {
           const newTime = new Date().toLocaleString('chinese',{hour12:false})
           policyColumn({newTime: newTime,parentId: parentId,corps: this.form.corpId}).then(res => {
             resolve(res.data.data.map(item => {
+              console.log(item)
               return {
                 ...item,
                 leaf: !item.hasChildren

+ 10 - 12
src/views/dealer/allocation/config/customerContact.json

@@ -15,12 +15,17 @@
   "summaryText": "合计",
   "sumColumnList": [
     {
-      "name": "orderQuantity",
+      "name": "inventoryNumber",
       "type": "sum",
       "decimals": 0
     },
     {
-      "name": "amount",
+      "name": "actualQuantity",
+      "type": "sum",
+      "decimals": 0
+    },
+    {
+      "name": "deliveryAmount",
       "type": "sum"
     }
   ],
@@ -76,23 +81,16 @@
     },
     {
       "label": "结余库存",
-      "prop": "balance",
+      "prop": "inventoryNumber",
       "index": 8,
       "width": 140,
       "overHidden": true
     },
     {
       "label": "调拨件数",
-      "prop": "orderQuantity",
-      "index": 9,
-      "width": 140,
-      "overHidden": true
-    },
-    {
-      "label": "金额",
-      "prop": "amount",
+      "prop": "actualQuantity",
       "index": 10,
-      "width": 100,
+      "width": 140,
       "overHidden": true
     },
     {

+ 7 - 7
src/views/dealer/allocation/config/mainList.json

@@ -28,28 +28,28 @@
     },
     {
       "label": "原仓库",
-      "prop": "origWarehouse",
+      "prop": "storageName",
       "overHidden": true,
       "minWidth": 120,
       "search": true
     },
     {
-      "label": "仓库",
-      "prop": "warehouse",
+      "label": "仓库",
+      "prop": "allotStorageName",
       "overHidden": true,
       "minWidth": 120,
       "search": true
     },
     {
       "label": "数量",
-      "prop": "quantity",
+      "prop": "totalQuantity",
       "overHidden": true,
       "minWidth": 120,
       "search": false
     },
     {
       "label": "金额",
-      "prop": "amount",
+      "prop": "deliveryAmount",
       "overHidden": true,
       "minWidth": 120,
       "search": false
@@ -68,7 +68,7 @@
     },
     {
       "label": "仓管员",
-      "prop": "keeper",
+      "prop": "freightUser",
       "overHidden": true,
       "minWidth": 120,
       "search": false
@@ -82,7 +82,7 @@
     },
     {
       "label": "制单人",
-      "prop": "createName",
+      "prop": "createUserName",
       "overHidden": true,
       "minWidth": 120,
       "search": false

+ 203 - 125
src/views/dealer/allocation/detail.vue

@@ -32,14 +32,22 @@
           type="primary"
           size="small"
         >审核进度</el-button>
-<!--        <el-button-->
-<!--          type="primary"-->
-<!--          v-if="!checkDisabled"-->
-<!--          :disabled="!form.id || disabled"-->
-<!--          size="small"-->
-<!--          @click="pleaseCheck"-->
-<!--          :loading="btnLoading"-->
-<!--        >请核</el-button>-->
+        <el-button
+          v-if="confirmDisabled"
+          :disabled="disabled"
+          size="small"
+          type="primary"
+          @click="repealAllot"
+          :loading="btnLoading"
+        >撤销调拨</el-button>
+        <el-button
+          v-if="!confirmDisabled"
+          :disabled="!form.id || disabled"
+          size="small"
+          type="primary"
+          @click="confirmAllot"
+          :loading="btnLoading"
+        >确认调拨</el-button>
         <el-button
           type="success"
           :disabled="!form.id"
@@ -65,6 +73,23 @@
           v-model="form"
           :option="option"
         >
+          <template slot="freightUser">
+            <el-select
+              v-model="form.freightUser"
+              filterable
+              clearable
+              size="small"
+              placeholder="请选择"
+              :disabled="disabled || confirmDisabled"
+            >
+              <el-option
+                v-for="(item,index) in userList"
+                :key="index"
+                :label="item.realName"
+                :value="item.realName"
+              ></el-option>
+            </el-select>
+          </template>
           <template slot="createUser">
             <el-select
               v-model="form.createUser"
@@ -72,8 +97,6 @@
               clearable
               size="small"
               placeholder="请选择"
-              @change="userHandle"
-              @clear="form.userName == null"
               disabled
             >
               <el-option
@@ -84,13 +107,13 @@
               ></el-option>
             </el-select>
           </template>
-          <template slot="deptId">
+          <template slot="createDept">
             <avue-input-tree
               leaf-only
               style="width: 100%;"
               size="small"
               :props="{ label: 'title' }"
-              v-model="form.deptId"
+              v-model="form.createDept"
               placeholder=" "
               type="tree"
               :dic="dic"
@@ -98,15 +121,19 @@
               disabled=""
             ></avue-input-tree>
           </template>
-          <template slot="origWarehouse">
+          <template slot="storageId">
             <warehouse-select
-              v-model="form.origWarehouse"
-              :configuration="configurationWarehouse"/>
+              v-model="form.storageId"
+              :configuration="configurationWarehouse"
+              :disabled="disabled || confirmDisabled"
+            />
           </template>
-          <template slot="warehouse">
+          <template slot="allotStorageId">
             <warehouse-select
-              v-model="form.warehouse"
-              :configuration="configurationWarehouse"/>
+              v-model="form.allotStorageId"
+              :configuration="configurationWarehouse"
+              :disabled="disabled || confirmDisabled"
+            />
           </template>
         </avue-form>
       </basic-container>
@@ -126,7 +153,7 @@
               icon="el-icon-plus"
               size="small"
               @click.stop="newDetails"
-              :disabled="disabled || checkDisabled"
+              :disabled="disabled || confirmDisabled"
             >录入明细</el-button>
             <el-button
               type="info"
@@ -141,14 +168,14 @@
               icon="el-icon-edit"
               type="text"
               @click="rowCell(row, index)"
-              :disabled="disabled || checkDisabled"
+              :disabled="disabled || confirmDisabled"
             >{{ row.$cellEdit ? "保存" : "修改" }}</el-button>
             <el-button
               size="small"
               icon="el-icon-delete"
               type="text"
               @click="rowDel(row, index)"
-              :disabled="disabled || checkDisabled"
+              :disabled="disabled || confirmDisabled"
             >删除</el-button>
           </template>
           <template slot="code" slot-scope="{ row, index }">
@@ -203,16 +230,28 @@
             </span>
             <span v-else> {{ row.cname }}</span>
           </template>
-          <template slot="orderQuantity" slot-scope="{ row, index }">
+          <template slot="actualQuantity" slot-scope="{ row, index }">
             <el-input-number
               v-if="row.$cellEdit"
-              v-model="row.orderQuantity"
+              v-model="row.actualQuantity"
               size="small"
               :controls="false"
               :precision="0"
               style="width: 100%"
+              @change="actualQuantityChange(row)"
+            />
+            <span v-else>{{ row.actualQuantity | IntegerFormat }}</span>
+          </template>
+          <template slot="deliveryAmount" slot-scope="{ row, index }">
+            <el-input-number
+              v-if="row.$cellEdit"
+              v-model="row.deliveryAmount"
+              size="small"
+              :controls="false"
+              :precision="2"
+              style="width: 100%"
             />
-            <span v-else>{{ row.orderQuantity | IntegerFormat }}</span>
+            <span v-else>{{ row.deliveryAmount | decimalFormat }}</span>
           </template>
         </avue-crud>
       </basic-container>
@@ -259,7 +298,7 @@
     <report-dialog
       :switchDialog="switchDialog"
       :reportId="form.id"
-      reportName="事务-报销单"
+      reportName=""
       @onClose="onClose()"
     />
     <!--    商品弹窗-->
@@ -363,14 +402,14 @@ import { gainUser } from "@/api/basicData/customerInquiry";
 import {getUserInfo} from "@/api/system/user";
 import {getDeptTree} from "@/api/system/dept";
 import { getCurrentDate } from "@/util/date";
-import {dataDetail, typeSave, removeGoods, pleaseCheck} from "@/api/standAlone/reimbursement";
+import {dataDetail, typeSave, removeGoods, confirmAllot, repealAllot} from "@/api/dealer/allocation";
 import { contrastObj, contrastList } from "@/util/contrastData";
 import check from "@/components/check/check";
 import checkSchedule from "@/components/check/checkSchedule";
 import reportDialog from "@/components/report-dialog/main";
 import {getDeptLazyTree,
   getGoods,} from "@/api/basicData/customerInquiry";
-
+import {selectGoodsNum} from "@/api/basicData/inventoryAccount";
 
 export default {
   name: "detail",
@@ -389,14 +428,16 @@ export default {
       disabled: false,
       pageLoading: false,
       btnLoading: false,
-      form: {},
+      form: {
+        deliveryStatus: '录入'
+      },
       option: {
         menuBtn: false,
         labelWidth: 100,
         column: [
           {
             label: "原仓库",
-            prop: "origWarehouse",
+            prop: "storageId",
             rules: [
               {
                 required: true,
@@ -408,8 +449,8 @@ export default {
             slot: true,
           },
           {
-            label: "仓库",
-            prop: "warehouse",
+            label: "仓库",
+            prop: "allotStorageId",
             rules: [
               {
                 required: true,
@@ -426,18 +467,19 @@ export default {
             span: 8,
             type: "date",
             format: "yyyy-MM-dd",
-            valueFormat: "yyyy-MM-dd 00:00:00",
+            valueFormat: "yyyy-MM-dd HH:mm:ss",
             rules: [
               {
                 required: true,
                 message: " ",
                 trigger: "blur"
               }
-            ]
+            ],
+            disabled: false
           },
           {
             label: "仓管员",
-            prop: "keeper",
+            prop: "freightUser",
             rules: [
               {
                 required: true,
@@ -457,7 +499,7 @@ export default {
           },
           {
             label: "制单部门",
-            prop: "deptId",
+            prop: "createDept",
             span: 8,
             slot: true,
             disabled: true
@@ -480,6 +522,13 @@ export default {
             disabled: true,
           },
           {
+            label: "单据状态",
+            prop: "deliveryStatus",
+            span: 8,
+            slot: true,
+            disabled: true,
+          },
+          {
             label: "备注",
             prop: "remarks",
             type: "textarea",
@@ -538,7 +587,6 @@ export default {
       },
       oldForm: {},
       oldDataList: [],
-      checkDisabled: false, // 审核状态
       checker: false,
       checkId: '',
       batchNo:'',
@@ -561,6 +609,7 @@ export default {
         currentPage: 1,
         total: 0
       },
+      confirmDisabled: false, // 调拨状态禁用
     }
   },
   async created() {
@@ -577,15 +626,6 @@ export default {
     gainUser().then(res => {
       this.userList = res.data.data;
     });
-    getUserInfo().then(res => {
-      this.$set(this.form, 'createUser', res.data.data.id);
-      this.$set(this.form, 'userName', res.data.data.realName);
-      this.$set(this.form, 'deptId', res.data.data.deptId);
-      this.$set(this.form, 'deptName', res.data.data.deptName);
-      this.$set(this.form, 'postId', res.data.data.postId.split(',')[0]);
-      this.$set(this.form, 'postName', res.data.data.postName.split(',')[0]);
-      this.loginUser = res.data.data.realName;
-    })
     getDeptTree().then(res => {
       this.dic = res.data.data
     })
@@ -614,6 +654,18 @@ export default {
       this.checker = true;
       this.batchNo = this.detailData.check.batchNo
       this.queryData(this.detailData.id);
+    } else {
+      getUserInfo().then(res => {
+        this.$set(this.form, 'createUser', res.data.data.id);
+        // this.$set(this.form, 'userName', res.data.data.realName);
+        this.$set(this.form, 'createDept', res.data.data.deptId);
+        // this.$set(this.form, 'deptName', res.data.data.deptName);
+        // this.$set(this.form, 'postId', res.data.data.postId.split(',')[0]);
+        // this.$set(this.form, 'postName', res.data.data.postName.split(',')[0]);
+        this.loginUser = res.data.data.realName;
+        this.oldForm = this.deepClone(this.form);
+        this.oldDataList = this.deepClone(this.dataList);
+      })
     }
   },
   filters: {
@@ -628,36 +680,32 @@ export default {
     // 查询
     queryData(id) {
       this.pageLoading = true;
-      dataDetail({id: id}).then(res => {
-        this.form = res.data.data;
-        this.dataList = this.form.itemList? this.form.itemList: [];
-        this.oldForm = {...this.form};
-        this.oldDataList = [...this.dataList];
-        delete this.form.itemList;
-        this.checkDisabled = this.form.status > 0? true: false;
-        if (this.form.status > 0) {
-          this.option.column.map(e => {
-            this.$set(e, 'disabled', true)
-          })
-        }
+      dataDetail(id).then(res => {
+        this.$set(this,'form',res.data.data)
+        this.confirmDisabled = this.form.deliveryStatus === '确认调拨'? true: false;
+        this.dataList = this.form.deliveryItemsList? this.form.deliveryItemsList: [];
+        this.oldForm = this.deepClone(this.form);
+        this.oldDataList = this.deepClone(this.dataList);
       }).finally(() => {
         this.pageLoading = false;
       })
     },
     //返回列表
     backToList() {
-      this.$emit("goBack");
+      if (this.verification()) {
+        this.$emit("goBack");
+      }
     },
     // 编辑按钮触发
     openEdit() {
       this.disabled = false;
       this.option.column.map(e => {
-        if (this.checkDisabled) {
-          this.$set(e, 'disabled', true)
-        } else {
-          if (e.prop != 'serialNo') {
-            this.$set(e, 'disabled', false)
+        if (!this.confirmDisabled) {
+          if (e.prop != 'sysNo' && e.prop != 'createTime' && e.prop != 'deliveryStatus') {
+            this.$set(e, 'disabled', false);
           }
+        } else {
+          this.$set(e, 'disabled', true);
         }
       })
     },
@@ -670,14 +718,22 @@ export default {
       this.$refs["form"].validate((valid, done) => {
         done();
         if (valid) {
-          if (this.form.origWarehouse == this.form.warehouse) {
-            return this.$message.error('原仓库与调拨仓库不能一致')
+          if (this.form.storageId == this.form.allotStorageId) {
+            return this.$message.error('原仓库与仓库不能一致')
           }
-          this.$set(this.form, 'itemList', this.dataList)
+          let totalQuantity = 0; //总数量
+          let deliveryAmount = 0; //总金额
+          this.dataList.forEach(item => {
+            deliveryAmount += Number(item.deliveryAmount);
+            totalQuantity += Number(item.actualQuantity);
+          })
+          this.$set(this.form, 'deliveryAmount', deliveryAmount);
+          this.$set(this.form, 'totalQuantity', totalQuantity);
+          this.$set(this.form, 'deliveryItemsList', this.dataList)
           this.btnLoading = true;
           typeSave(this.form).then(res => {
             this.$message({type: "success", message: this.form.id ? "修改成功!" : "新增成功!"});
-            this.queryData(res.data.data);
+            this.queryData(res.data.data.id);
           }).finally(() => {
             this.btnLoading = false;
           })
@@ -760,9 +816,6 @@ export default {
       });
     },
     getKHData(row) {},
-    userHandle() {
-      this.form.userName = this.userList.find(item => item.id == this.form.createUser).realName;
-    },
     // 验证新旧值对比
     verification() {
       if (contrastObj(this.form, this.oldForm) ||
@@ -795,28 +848,6 @@ export default {
     choceScheduleFun(){
       this.checkScheduleDialog = false
     },
-    // 请核
-    pleaseCheck() {
-      if (this.verification()) {
-        const data = {
-          id : this.form.id,
-          checkType: 'fybx',
-          url: '/reimbursement/index',
-          pageStatus:"this.$store.getters.reimbursementStatus",
-          pageLabel:"报销",
-          checkFlag: 1,
-        }
-        this.btnLoading = true;
-        pleaseCheck(data).then(res => {
-          this.$message.success('请核成功')
-          this.queryData(this.form.id)
-        }).catch(() => {
-          this.$message.error('请核失败')
-        }).finally(() => {
-          this.btnLoading = false;
-        })
-      }
-    },
     // 报表
     openReport() {
       this.switchDialog =! this.switchDialog;
@@ -835,6 +866,13 @@ export default {
     codeChange(row) {
       this.goodsoptions.forEach(async e => {
         if (e.code == row.code) {
+          await selectGoodsNum({
+            goodsId: e.id,
+            tradeType: 'JXS',
+            storageId: this.form.storageId
+          }).then(res => {
+            row.inventoryNumber = res.data.data;
+          })
           row.itemId = e.id;
           row.storageQuantity =  e.storageQuantity;
           row.cname = e.cname;
@@ -847,19 +885,20 @@ export default {
           row.typeno = e.typeno;
           row.unit = e.unit;
           row.size = e.size;
-          row.arr = e.arr;
           row.priceCategory = e.goodsTypeName;
-          row.purchaseAmount = e.purchaseAmount;
-          row.batch = e.batch;
-          row.newJob = e.newJob;
-          row.newDate = e.newDate;
-          row.price = e.price;
         }
       });
     },
     cnameChange(row) {
       this.goodsoptions.forEach(async e => {
         if (e.id == row.itemId) {
+          await selectGoodsNum({
+            goodsId: e.id,
+            tradeType: 'JXS',
+            storageId: this.form.storageId
+          }).then(res => {
+            row.inventoryNumber = res.data.data;
+          })
           row.storageQuantity =  e.storageQuantity
           row.cname = e.cname;
           row.code = e.code;
@@ -871,13 +910,7 @@ export default {
           row.typeno = e.typeno;
           row.unit = e.unit;
           row.size = e.size;
-          row.arr = e.arr;
           row.priceCategory = e.goodsTypeName;
-          row.purchaseAmount = e.purchaseAmount;
-          row.batch = e.batch;
-          row.newDate = e.newDate;
-          row.newJob = e.newJob;
-          row.price = e.price;
         }
       });
     },
@@ -888,6 +921,13 @@ export default {
         } else {
           this.selectionList.forEach(e => {
             this.dataList.forEach(async (item, index) => {
+              await selectGoodsNum({
+                goodsId: e.id,
+                tradeType: 'JXS',
+                storageId: this.form.storageId
+              }).then(res => {
+                e.inventoryNumber = res.data.data;
+              })
               if (index == this.reData.index) {
                 item.itemId = e.id;
                 item.code = e.code;
@@ -901,11 +941,7 @@ export default {
                 item.unit = e.unit;
                 item.size = e.size;
                 item.priceCategory = e.goodsTypeName;
-                item.purchaseAmount = e.purchaseAmount;
-                item.batch = e.batch;
-                item.newDate = e.newDate;
-                item.newJob = e.newJob;
-                item.price = e.price;
+                item.inventoryNumber = e.inventoryNumber;
                 item.$cellEdit = true;
               }
             });
@@ -914,6 +950,13 @@ export default {
       } else {
         if (this.goodsListSave.length > 0) { // 暂存的有数据
           this.goodsListSave.forEach(async e => {
+            await selectGoodsNum({
+              goodsId: e.id,
+              tradeType: 'JXS',
+              storageId: this.form.storageId
+            }).then(res => {
+              e.inventoryNumber = res.data.data;
+            })
             this.dataList.push({
               itemId: e.id,
               code: e.code,
@@ -927,19 +970,22 @@ export default {
               unit: e.unit,
               size: e.size,
               price: e.price,
-              amount: 0,
-              orderQuantity: 0,
+              deliveryAmount: 0,
+              actualQuantity: 0,
               storageQuantity: e.storageQuantity,
-              purchaseAmount: e.purchaseAmount,
-              batch: e.batch,
-              arr: e.arr,
-              newJob:e.newJob,
-              newDate: e.newDate,
+              inventoryNumber: e.inventoryNumber,
               $cellEdit: true
             });
           });
         } else {
           this.selectionList.forEach(async e => {
+            await selectGoodsNum({
+              goodsId: e.id,
+              tradeType: 'JXS',
+              storageId: this.form.storageId
+            }).then(res => {
+              e.inventoryNumber = res.data.data;
+            })
             this.dataList.push({
               itemId: e.id,
               code: e.code,
@@ -952,15 +998,9 @@ export default {
               corpName: e.corpName,
               unit: e.unit,
               size: e.size,
-              amount: 0,
-              orderQuantity: 0,
-              storageQuantity: e.storageQuantity,
-              purchaseAmount: e.purchaseAmount,
-              batch: e.batch,
-              arr: e.arr,
-              newJob: e.newJob,
-              newDate: e.newDate,
-              price: e.price,
+              deliveryAmount: 0,
+              actualQuantity: 0,
+              inventoryNumber: e.inventoryNumber,
               $cellEdit: true
             });
           });
@@ -1057,6 +1097,44 @@ export default {
     importStagList(row, index) {
       this.goodsListSave.push(row);
     },
+    actualQuantityChange(row) {
+      if (Number(row.actualQuantity) > Number(row.inventoryNumber)) {
+        this.$set(row, 'actualQuantity', '0');
+        this.$message.error('调拨件数不能超过结余库存')
+      }
+    },
+    // 确认调拨
+    confirmAllot() {
+      if (this.verification()) {
+        this.btnLoading = true;
+        this.$set(this.form, 'deliveryItemsList', this.dataList);
+        confirmAllot(this.form).then(res => {
+          this.queryData(this.form.id);
+          this.$message.success('调拨成功');
+          this.option.column.map(e => {
+            this.$set(e, 'disabled', true);
+          })
+        }).finally(() => {
+          this.btnLoading = false;
+        })
+      }
+    },
+    // 撤销调拨
+    repealAllot() {
+      this.btnLoading = true;
+      this.$set(this.form, 'deliveryItemsList', this.dataList);
+      repealAllot(this.form).then(res => {
+        this.queryData(this.form.id);
+        this.$message.success('撤销成功');
+        this.option.column.map(e => {
+          if (e.prop != 'sysNo' && e.prop != 'createTime' && e.prop != 'deliveryStatus') {
+            this.$set(e, 'disabled', false);
+          }
+        })
+      }).finally(() => {
+        this.btnLoading = false;
+      })
+    },
   },
 }
 </script>

+ 24 - 6
src/views/dealer/allocation/index.vue

@@ -42,10 +42,20 @@
             icon="el-icon-delete"
             size="small"
             @click.stop="rowDel(scope.row, scope.index)"
-            :disabled="scope.row.status == 3"
+            :disabled="scope.row.deliveryStatus === '确认调拨'"
           >删除
           </el-button>
         </template>
+        <template slot="storageNameSearch">
+          <warehouse-select
+            v-model="search.storageId"
+            :configuration="configurationWarehouse"/>
+        </template>
+        <template slot="allotStorageNameSearch">
+          <warehouse-select
+            v-model="search.allotStorageId"
+            :configuration="configurationWarehouse"/>
+        </template>
         <template slot-scope="scope" slot="sysNo">
           <span style="color: #409EFF;cursor: pointer" @click.stop="beforeOpenPage(scope.row,scope.index)">{{ scope.row.sysNo }}</span>
         </template>
@@ -64,7 +74,7 @@
 import option from "./config/mainList.json";
 import detailPage from "./detail";
 import { gainUser } from "@/api/basicData/customerInquiry";
-import {getList, deleteList} from "@/api/standAlone/reimbursement";
+import {getList, deleteList} from "@/api/dealer/allocation";
 
 export default {
   name: "index",
@@ -88,6 +98,14 @@ export default {
       selection: [],
       detailData: {},
       userOption: [],
+      // 仓库配置
+      configurationWarehouse: {
+        multipleChoices: false,
+        multiple: false,
+        collapseTags: false,
+        placeholder: "请点击右边按钮选择",
+        dicData: [],
+      },
     }
   },
   async created() {
@@ -147,14 +165,14 @@ export default {
         size: page.pageSize,
         current: page.currentPage,
       })
-      if (queryParams.claimDate && queryParams.claimDate.length > 0) {
+      if (queryParams.businessDate && queryParams.businessDate.length > 0) {
         queryParams = {
           ...queryParams,
-          beginClaimDate: queryParams.claimDate[0] + ' 00:00:00',
-          endClaimDate: queryParams.claimDate[1] + ' 23:59:59',
+          businessStartDate: queryParams.businessDate[0] + ' 00:00:00',
+          businessEndDate: queryParams.businessDate[1] + ' 23:59:59',
         }
       }
-      delete queryParams.claimDate;
+      delete queryParams.businessDate;
       this.loading = true;
       getList(queryParams).then(res => {
         this.dataList = res.data.data.records;

+ 8 - 7
src/views/dealer/stock/index.vue

@@ -63,7 +63,7 @@
           </el-button>
         </template>
       </avue-crud>
-      <el-dialog title="导入价格"
+      <el-dialog title="导入库存"
                  append-to-body
                  :visible.sync="excelBox"
                  width="555px">
@@ -141,7 +141,7 @@ export default {
     }
   },
   created() {
-    this.search.createTime = defaultDate(1)
+    // this.search.createTime = defaultDate(1)
     let i = 0;
     this.option.column.forEach(item => {
       if (item.search) i++
@@ -166,7 +166,6 @@ export default {
       });
     },
     uploadAfter(res, done, loading, column) {
-      console.log(res)
       window.console.log(column);
       this.excelBox = false;
       this.page.currentPage = 1;
@@ -267,10 +266,12 @@ export default {
       // this.show = false;
     },
     statement() {
-      this.statementData = {...this.search}
-      this.statementData.createStartTime = this.statementData.createTime[0]+ " " + "00:00:00"
-      this.statementData.createEndTime = this.statementData.createTime[1]+ " " + "23:59:59"
-      delete this.statementData.createTime
+      this.statementData = {...this.search};
+      if (this.statementData.createTime && this.statementData.createTime.length > 0) {
+        this.statementData.createStartTime = this.statementData.createTime[0]+ " " + "00:00:00"
+        this.statementData.createEndTime = this.statementData.createTime[1]+ " " + "23:59:59"
+        delete this.statementData.createTime
+      }
       this.switchDialog = !this.switchDialog;
     },
     onClose(val) {

+ 107 - 11
src/views/landTransportation/antiepidemic/index.vue

@@ -6,16 +6,21 @@
           :option="goodsOptionCrud"
           :table-loading="loading"
           :page.sync="page"
+          v-model="form"
           ref="crud"
+          @row-save="rowSave"
+          @row-del="rowDel"
           @on-load="onLoad"
           @resetColumn="resetColumn"
           @saveColumn="saveColumn"
+          @row-update="(form,index,done,loading)=>{rowSave(form,done)}"
           @search-change="searchChange"
           @search-criteria-switch="searchCriteriaSwitch">
         <template slot-scope="{row,index}" slot="menu">
           <el-button
               size="small"
               type="text"
+              icon="el-icon-picture-outline"
               @click="annexOpen(row, index)"
           >附 件
           </el-button>
@@ -24,6 +29,7 @@
       <el-dialog
           title="附件"
           :visible.sync="dialogVisible"
+          :close-on-click-modal="false"
           append-to-body
           width="80%">
 <!--        <c-upload-->
@@ -38,8 +44,12 @@
             class="hide"
             list-type="picture-card"
             :on-preview="handlePictureCardPreview"
+            :action="action"
             :file-list="orderList"
-            disabled>
+            :headers="headers"
+            :on-remove="onRemove"
+            :on-success="onSuccess"
+            >
           <i class="el-icon-plus"></i>
         </el-upload>
         <el-dialog :visible.sync="visible" append-to-body>
@@ -47,7 +57,7 @@
         </el-dialog>
         <span slot="footer" class="dialog-footer">
           <el-button @click="dialogVisible = false" size="small">取 消</el-button>
-<!--          <el-button type="primary" @click="saveAnnex" size="small" :disabled="form.status===4">保 存</el-button>-->
+          <el-button type="primary" @click="saveAnnex" size="small">保 存</el-button>
         </span>
       </el-dialog>
     </basic-container>
@@ -57,8 +67,12 @@
 <script>
 import {
   driverQueryCollection,
-  getAttachment
+  getAttachment,
+  enclosure, antiepidemicSave,remove
 } from "@/api/landTransportation/antiepidemic";
+import {getToken} from "@/util/auth";
+import {sharedDeletion} from "@/api/user";
+import {deleteDetails} from "@/api/basicData/configuration";
 
 export default {
   name: "index",
@@ -69,6 +83,8 @@ export default {
       key:0,
       form: {},
       orderList:[],
+      action: "/api/blade-resource/oss/endpoint/put-file",
+      headers: { "Blade-Auth": "Bearer " + getToken() },
       dialogVisible: false,
       loading: false,
       activeName:'',
@@ -84,11 +100,11 @@ export default {
       optionList: {
         stripe:true,
         index: true,
-        addBtn: false,
-        delBtn: false,
+        addBtn: true,
+        delBtn: true,
         cellBtn: false,
         cancelBtn: false,
-        editBtn: false,
+        // editBtn: false,
         addRowBtn: false,
         searchIcon: true,
         searchIndex: 2,
@@ -113,10 +129,31 @@ export default {
           search: true,
         },{
           label: '制单日期',
+          type: "date",
+          searchRange: true,
+          defaultTime: ['00:00:00', '23:59:59'],
+          format: "yyyy-MM-dd HH:mm:ss",
+          valueFormat: "yyyy-MM-dd HH:mm:ss",
           prop: 'createTime',
           overHidden: true,
+          display:false,
+          search: true,
           index: 3,
           width: 150
+        },{
+          label: '箱号一',
+          prop: 'ctnOne',
+          overHidden: true,
+          index: 4,
+          search: true,
+          width: 150
+        },{
+          label: '箱号二',
+          prop: 'ctnTwo',
+          overHidden: true,
+          index: 5,
+          search: true,
+          width: 150
         }
         ],
       },
@@ -136,6 +173,65 @@ export default {
     }
   },
   methods: {
+    //删除
+    rowDel(form,index){
+      this.$confirm("确定将选择数据删除?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(() => {
+        return remove({ids:form.id});
+      }).then(() => {
+        this.$message({
+          type: "success",
+          message: "操作成功!"
+        });
+        this.page.currentPage = 1;
+        this.onLoad(this.page, {})
+      });
+    },
+    //新增
+    rowSave(form,done,loading){
+      // console.log(this.deepClone(this.form))
+      antiepidemicSave({
+        ...this.deepClone(this.form),
+        fileList:[]
+      }).then(res=>{
+        if (res.data.code === 200){
+          if (this.form.id){
+            this.$message.success("修改成功");
+          }else {
+            this.$message.success("新增成功");
+          }
+          this.onLoad(this.page, {})
+        }
+        done()
+      })
+    },
+    //保存修改附件
+    saveAnnex(){
+      enclosure(this.orderList).then(res=>{
+        if (res.data.code === 200){
+          this.$message.success("保存成功");
+          this.dialogVisible = false
+        }
+      })
+    },
+    onSuccess(response, file, fileList) {
+      this.orderList.push({
+        fileName:response.data.originalName,
+        url:response.data.link,
+        pid:this.form.id
+      })
+    },
+    onRemove(file, fileList) {
+      sharedDeletion('/api/blade-client/common-file/remove', file.id).then(res => {
+        if (res.data.success) {
+          this.$message.success("操作成功!");
+          this.orderList = fileList
+        }
+      });
+    },
     handlePictureCardPreview(file) {
       this.dialogImageUrl = file.url;
       this.visible = true;
@@ -166,9 +262,9 @@ export default {
     // 获得高度
     searchCriteriaSwitch(type) {
       if (type) {
-        this.goodsOptionCrud.height = this.goodsOptionCrud.height - 230
+        this.goodsOptionCrud.height = this.goodsOptionCrud.height - 51
       } else {
-        this.goodsOptionCrud.height = this.goodsOptionCrud.height + 230
+        this.goodsOptionCrud.height = this.goodsOptionCrud.height + 51
       }
       this.$refs.crud.getTableHeight()
     },
@@ -221,9 +317,9 @@ export default {
 </script>
 
 <style lang="scss" scoped>
-::v-deep .hide .el-upload--picture-card {
-  display: none;
-}
+//::v-deep .hide .el-upload--picture-card {
+//  display: none;
+//}
 .home-container {
   padding: 0px 5px 5px 5px;
   box-sizing: border-box;

+ 24 - 6
src/views/maintenance/salesPolicy/configuration/mainList.json

@@ -34,12 +34,30 @@
       "index": 2,
       "width": 100,
       "overHidden": true
+    },{
+      "label": "政策类型",
+      "prop": "type",
+      "search": true,
+      "index": 3,
+      "width": 100,
+      "type": "select",
+      "dicData": [
+        {
+          "label": "正常",
+          "value": 0
+        },
+        {
+          "label": "特价",
+          "value": 1
+        }
+      ],
+      "overHidden": true
     },
     {
       "label": "品牌",
       "prop": "brand",
       "search": true,
-      "index": 3,
+      "index": 4,
       "width": 100,
       "overHidden": true
     },
@@ -58,7 +76,7 @@
         }
       ],
       "search": true,
-      "index": 4,
+      "index": 5,
       "width": 100,
       "overHidden": true
     },
@@ -69,7 +87,7 @@
       "unlinkPanels": true,
       "searchRange": true,
       "search": true,
-      "index": 5,
+      "index": 6,
       "width": 100,
       "format": "yyyy-MM-dd",
       "valueFormat": "yyyy-MM-dd",
@@ -83,7 +101,7 @@
       "unlinkPanels": true,
       "searchRange": true,
       "search": true,
-      "index": 6,
+      "index": 7,
       "width": 100,
       "format": "yyyy-MM-dd",
       "valueFormat": "yyyy-MM-dd",
@@ -97,7 +115,7 @@
       "unlinkPanels": true,
       "searchRange": true,
       "search": false,
-      "index": 7,
+      "index": 8,
       "width": 100,
       "format": "yyyy-MM-dd",
       "valueFormat": "yyyy-MM-dd",
@@ -108,7 +126,7 @@
       "label": "备注",
       "prop": "remarks",
       "search": false,
-      "index": 8,
+      "index": 9,
       "width": 100,
       "overHidden": true
     }

+ 27 - 2
src/views/maintenance/salesPolicy/detailsPageEdit.vue

@@ -69,8 +69,8 @@
                 <crop-select
                   v-else-if="item.prop === 'corps'"
                   v-model="form[item.prop]"
-                  :multiple="true"
                   :collapseTags="true"
+                  :multiple="true"
                   corpType="KH"
                   style="width: 100%"
                   @getCorpList="getCorpList"
@@ -449,6 +449,29 @@ export default {
                 trigger: "blur"
               }
             ]
+          },{
+            //多选
+            label: "政策类型",
+            prop: "type",
+            span: 8,
+            type: "select",
+            dicData: [
+              {
+                label: "正常",
+                value: '正常'
+              },
+              {
+                label: "特价",
+                value: '特价'
+              }
+            ],
+            rules: [
+              {
+                required: true,
+                message: " ",
+                trigger: "blur"
+              }
+            ]
           },
           {
             label: "备注",
@@ -518,7 +541,9 @@ export default {
     if (this.detailData.id) {
       this.queryData(this.detailData.id);
     } else {
-      this.form = {};
+      this.form = {
+        type:0
+      };
       this.contactsData = [];
     }
   },

+ 1 - 1
src/views/reimbursement/detail.vue

@@ -343,7 +343,7 @@ export default {
             span: 8,
             type: "date",
             format: "yyyy-MM-dd",
-            valueFormat: "yyyy-MM-dd 00:00:00",
+            valueFormat: "yyyy-MM-dd HH:mm:ss",
             rules: [
               {
                 required: true,

+ 12 - 0
src/views/resource/oss.vue

@@ -116,6 +116,18 @@
               }]
             },
             {
+              label: "租户号",
+              prop: "tenantId",
+              span: 24,
+              width: 120,
+              search: true,
+              rules: [{
+                required: true,
+                message: "请输入租户号",
+                trigger: "blur"
+              }]
+            },
+            {
               label: "资源编号",
               prop: "ossCode",
               span: 24,

+ 1 - 1
src/views/saleLeads/detail.vue

@@ -283,7 +283,7 @@ export default {
             span: 8,
             type: "date",
             format: "yyyy-MM-dd",
-            valueFormat: "yyyy-MM-dd 00:00:00",
+            valueFormat: "yyyy-MM-dd HH:mm:ss",
             rules: [
               {
                 required: true,

+ 7 - 12
src/views/wel/home/landTransportation/components/sales-trend.vue

@@ -62,11 +62,12 @@
     <el-dialog
         title="车辆轨迹"
         append-to-body
+        custom-class="dialog_two"
         :visible.sync="dialogVisible"
-        fullscreen
+        lock-scroll
         width="80%">
       <div id="container"></div>
-      <div class="input-card" v-if="this.lineArr.length>0">
+      <div class="input-card" style="right: 10.3%" v-if="this.lineArr.length>0">
         <h4>轨迹回放控制</h4>
         <div class="input-item">
           <input type="button" class="btn" value="开始动画" id="start" @click="startAnimation()"/>
@@ -77,7 +78,7 @@
           <input type="button" class="btn" value="停止动画" id="stop" @click="stopAnimation()"/>
         </div>
       </div>
-      <div class="input-card" v-else>
+      <div class="input-card" style="right: 10.3%;bottom: 10.3%" v-else>
         <span style="color: red">暂无该车辆轨迹信息</span>
       </div>
     </el-dialog>
@@ -185,13 +186,6 @@ export default {
       this.loading = true;
       active().then(res => {
         this.tableData = res.data.data
-        this.tableData = this.tableData.concat(res.data.data)
-        this.tableData = this.tableData.concat(res.data.data)
-        this.tableData = this.tableData.concat(res.data.data)
-        this.tableData = this.tableData.concat(res.data.data)
-        this.tableData = this.tableData.concat(res.data.data)
-        this.tableData = this.tableData.concat(res.data.data)
-        this.tableData = this.tableData.concat(res.data.data)
         this.loading = false;
       })
     },
@@ -205,7 +199,7 @@ export default {
 <style scoped Lang="less">
 @import url('https://a.amap.com/jsapi_demos/static/demo-center/css/demo-center.css');
 #container {
-  height: 93vh;
+  height: 80vh;
   width: 100%;
 }
 
@@ -245,7 +239,8 @@ export default {
 }
 
 ::v-deep .el-dialog {
-  margin-top: 0vh !important;
+  margin-top: 5vh !important;
+  margin-bottom: 0 !important;
 }
 
 ::v-deep .el-dialog__body {

+ 1 - 1
src/views/workManagement/handoverSheet/detail.vue

@@ -305,7 +305,7 @@ export default {
             span: 8,
             type: "date",
             format: "yyyy-MM-dd",
-            valueFormat: "yyyy-MM-dd 00:00:00",
+            valueFormat: "yyyy-MM-dd HH:mm:ss",
             rules: [
               {
                 required: true,

+ 1 - 1
src/views/workManagement/purchaseApply/detail.vue

@@ -464,7 +464,7 @@ export default {
             span: 6,
             type: "date",
             format: "yyyy-MM-dd",
-            valueFormat: "yyyy-MM-dd 00:00:00",
+            valueFormat: "yyyy-MM-dd HH:mm:ss",
             rules: [
               {
                 required: true,

+ 1 - 1
src/views/workManagement/requisition/detail.vue

@@ -458,7 +458,7 @@ export default {
             span: 8,
             type: "date",
             format: "yyyy-MM-dd",
-            valueFormat: "yyyy-MM-dd 00:00:00",
+            valueFormat: "yyyy-MM-dd HH:mm:ss",
             rules: [
               {
                 required: true,

+ 1 - 1
src/views/workManagement/warehousing/detail.vue

@@ -435,7 +435,7 @@ export default {
             span: 8,
             type: "date",
             format: "yyyy-MM-dd",
-            valueFormat: "yyyy-MM-dd 00:00:00",
+            valueFormat: "yyyy-MM-dd HH:mm:ss",
             rules: [
               {
                 required: true,