Browse Source

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

QuKatie 3 years ago
parent
commit
f7c2f5ca50

+ 1 - 1
src/api/basicData/customerInquiry.js

@@ -174,4 +174,4 @@ export function getCode(query) {
     method: 'get',
     params:query
   })
-}
+}

+ 2 - 2
src/api/maintenance/salesPolicy.js

@@ -46,7 +46,7 @@ export function corpsattn(data) {
 //明细分页
 export function getItemdetail(query) {
     return request({
-        url: '/api/blade-mocha-item/salespolicyitem/page',
+        url: '/api/blade-mocha-item/salespolicyitem/list',
         method: 'get',
         params:query
     })
@@ -58,4 +58,4 @@ export function itemSubmit(data) {
         method: 'post',
         data: data
     })
-}
+}

+ 12 - 0
src/api/system/user.js

@@ -12,6 +12,18 @@ export const getList = (current, size, params, deptId) => {
     }
   })
 }
+export const userList = (current, size, params, deptId) => {
+  return request({
+    url: '/api/blade-user/userList',
+    method: 'get',
+    params: {
+      ...params,
+      current,
+      size,
+      deptId,
+    }
+  })
+}
 
 export const remove = (ids) => {
   return request({

+ 3 - 3
src/components/messageSend/main.vue

@@ -42,7 +42,7 @@
 </template>
 
 <script>
-import { getList } from "@/api/system/user";
+import { userList } from "@/api/system/user";
 import { sendMessage,sendManyMessage } from "@/api/basicData/message"
 
 export default {
@@ -63,8 +63,8 @@ export default {
     }
   },
   created() {
-    getList().then(res => {
-      this.userOption = res.data.data.records;
+    userList().then(res => {
+      this.userOption = res.data.data;
     })
   },
   methods: {

+ 16 - 0
src/views/businessManagement/purchaseOrder/configuration/mainList.json

@@ -212,6 +212,22 @@
       "index": 18,
       "width": 100,
       "overHidden": true
+    },
+    {
+      "label": "是否生成发货",
+      "prop": "createReceiving",
+      "search": false,
+      "index": 19,
+      "width": 100,
+      "overHidden": true
+    },
+    {
+      "label": "生成发货时间",
+      "prop": "createReceivingTime",
+      "search": false,
+      "index": 20,
+      "width": 100,
+      "overHidden": true
     }
   ]
 }

+ 15 - 0
src/views/businessManagement/purchaseOrder/detailsPageEdit.vue

@@ -753,6 +753,19 @@ export default {
           //   ]
           // },
           {
+            label: '应付金额',
+            prop: 'debitAmount',
+            type: 'number',
+            disabled: true,
+            rules: [
+              {
+                required: false,
+                message: ' ',
+                trigger: 'blur'
+              }
+            ]
+          },
+          {
             label: '已付金额',
             prop: 'settlmentAmount',
             type: 'number',
@@ -1406,8 +1419,10 @@ export default {
             }
           }
           this.form.orderAmount = 0;
+          this.$set(this.form, 'debitAmount', 0)
           this.contactsData.forEach(item => {
             this.form.orderAmount = Number(this.form.orderAmount) + Number(item.amount)
+            this.form.debitAmount = Number(this.form.debitAmount) + Number(item.amount)
           })
           //商品信息
           this.form.itemsVOList = this.contactsData

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

@@ -46,6 +46,9 @@
         <template slot-scope="scope" slot="createUser">
           {{ scope.row.createUserName }}
         </template>
+        <template slot-scope="scope" slot="createReceiving">
+          {{ scope.row.createReceiving == 1? '是': '否' }}
+        </template>
         <template slot-scope="scope" slot="menu">
 <!--          <el-button-->
 <!--            type="text"-->

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

@@ -331,6 +331,38 @@
       "index": 27,
       "width": 100,
       "overHidden": true
+    },
+    {
+      "label": "是否生成采购",
+      "prop": "createPurchase",
+      "search": false,
+      "index": 28,
+      "width": 100,
+      "overHidden": true
+    },
+    {
+      "label": "生成采购时间",
+      "prop": "createPurchaseTime",
+      "search": false,
+      "index": 29,
+      "width": 100,
+      "overHidden": true
+    },
+    {
+      "label": "是否生成收货",
+      "prop": "createReceiving",
+      "search": false,
+      "index": 30,
+      "width": 100,
+      "overHidden": true
+    },
+    {
+      "label": "生成收货时间",
+      "prop": "createReceivingTime",
+      "search": false,
+      "index": 31,
+      "width": 100,
+      "overHidden": true
     }
   ]
 }

+ 8 - 4
src/views/businessManagement/salesOrder/detailsPageEdit.vue

@@ -524,9 +524,9 @@
         </el-col>
       </el-row>
       <span slot="footer" class="dialog-footer">
-          <el-button @click="dialogVisible = false">取 消</el-button>
-          <el-button type="primary" @click="importGoods" v-if="commodityData !== true">导入</el-button>
-          <el-button type="primary" @click="importChoice" v-if="commodityData === true" :disabled="tableData.length !== 1">导入</el-button>
+          <el-button @click="dialogVisible = false" :loading="saveLoading">取 消</el-button>
+          <el-button type="primary" @click="importGoods" v-if="commodityData !== true" :loading="saveLoading">导入</el-button>
+          <el-button type="primary" @click="importChoice" v-if="commodityData === true" :loading="saveLoading" :disabled="tableData.length !== 1">导入</el-button>
         </span>
     </el-dialog>
     <el-dialog
@@ -2360,6 +2360,7 @@ export default {
     },
     //确认导入触发
     async importGoods() {
+      this.saveLoading = true;
       if (this.goodsListSave.length > 0) {
         this.goodsListSaveHandle()
       } else {
@@ -2433,6 +2434,7 @@ export default {
           // this.$refs.crudContact.rowCell(this.goodsListSave[item], this.goodsListSave.length - 1)
         })
       }
+      this.saveLoading = false;
       this.dialogVisible = false
     },
     tableDataHandle() {
@@ -2498,6 +2500,7 @@ export default {
           // this.$refs.crudContact.rowCell(this.tableData[item], this.tableData.length - 1)
         })
       }
+      this.saveLoading = false;
       this.dialogVisible = false
     },
     closeGoods() {
@@ -2600,6 +2603,7 @@ export default {
             this.$set(list[item], 'price', list[item].specialOffer)
           }
           this.$set(list[item], 'inputMold', 1)
+          this.$set(list[item], 'goodType', 0)
         } else {
           if (!list[item].salePrice) {
             getMarketPrice({code: list[item].code, isFreight: this.form.isFreight, isLabel: this.form.isLabel}).then(response => {
@@ -2957,7 +2961,7 @@ export default {
                 });
               })
             } else if (type == '采购') {
-              this.$confirm("是否生成采购单?", {
+              this.$confirm(this.form.createPurchase == 1? "已经生成过采购单,是否继续生成?": "是否生成采购单?", {
                 confirmButtonText: "确定",
                 cancelButtonText: "取消",
                 type: "warning"

+ 8 - 1
src/views/businessManagement/salesOrder/index.vue

@@ -59,6 +59,12 @@
         <template slot-scope="scope" slot="createUser">
           {{ scope.row.createUserName }}
         </template>
+        <template slot-scope="scope" slot="createPurchase">
+          {{ scope.row.createPurchase == 1? '是': '否' }}
+        </template>
+        <template slot-scope="scope" slot="createReceiving">
+          {{ scope.row.createReceiving == 1? '是': '否' }}
+        </template>
         <template slot="menuLeft" slot-scope="{size}">
           <el-button type="success" :size="size" @click="copyOrder" :disabled="single">复制单据</el-button>
           <el-button type="info" :size="size" icon="el-icon-printer">报表打印</el-button>
@@ -552,7 +558,7 @@ export default {
     },
     // 生成采购
     saveSell(row) {
-      this.$confirm("是否生成采购单?", {
+      this.$confirm(row.createPurchase == 1? "已经生成过采购单,是否继续生成?": "是否生成采购单?", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
         type: "warning"
@@ -560,6 +566,7 @@ export default {
         saveSell(row.id).then(res => {
           if (res.data.code == 200) {
             this.$message.success("生成成功");
+            this.onLoad(this.page, this.search)
           }
         })
       })

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

@@ -169,7 +169,7 @@
               </el-upload>
             </template>
             <template slot-scope="{ row, index }" slot="menu">
-              <el-button type="text" size="small" @click="rowCell(row, index)"
+              <el-button type="text" size="small" @click="rowCell(row, index)" :disabled="!form.id"
                 >{{ row.$cellEdit ? "保存" : "修改" }}
               </el-button>
               <el-button
@@ -554,6 +554,7 @@ export default {
         .then(res => {
           this.contactsData = res.data.data.records;
           this.contactPage.total = res.data.data.total;
+          this.customerContact.height = window.innerHeight - 240;
         })
         .finally(() => {
           this.contactLoading = false;
@@ -771,7 +772,14 @@ export default {
     //商品编辑
     rowCell(row, index) {
       console.log(row);
-      this.$refs.crudContact.rowCell(row, index);
+      if (row.$cellEdit) {
+        itemSubmit({...row,pid: this.form.id}).then(res => {
+          this.$message.success('保存成功')
+          this.$refs.crudContact.rowCell(row, index);
+        })
+      } else {
+        this.$refs.crudContact.rowCell(row, index);
+      }
     },
     //买赠编辑
     rowCellE(row, index) {