Selaa lähdekoodia

Merge branch 'feature/Feature-basic_data' of https://gogs.zfire.top/zfire-front/supply-front into feature/Feature-basic_data

chen 3 vuotta sitten
vanhempi
commit
c0d6ea048a
51 muutettua tiedostoa jossa 2457 lisäystä ja 912 poistoa
  1. 1 10
      src/App.vue
  2. 4 4
      src/api/policy_list.js
  3. 19 1
      src/api/supply/engin.js
  4. 20 12
      src/layout/components/Navbar.vue
  5. 7 2
      src/router/index.js
  6. 2 1
      src/store/getters.js
  7. 3 3
      src/store/modules/sales.js
  8. 130 178
      src/views/basic_data/material/components/material_list-detail.vue
  9. 31 32
      src/views/basic_data/material/components/modify_list-apply.vue
  10. 2 2
      src/views/basic_data/material/modify_list.vue
  11. 38 31
      src/views/engin_deposit/deposit_list.vue
  12. 32 0
      src/views/external/open_engin.vue
  13. 11 1
      src/views/login/index.vue
  14. 12 16
      src/views/sales_policy/codealer_list.vue
  15. 31 34
      src/views/sales_policy/components/AddCondition.vue
  16. 58 58
      src/views/sales_policy/components/AddPolicy.vue
  17. 776 0
      src/views/sales_policy/components/EditCondition.vue
  18. 846 260
      src/views/sales_policy/components/Examine.vue
  19. 17 13
      src/views/sales_policy/policy_list.vue
  20. 15 19
      src/views/sales_rebate/rebate_list.vue
  21. 5 11
      src/views/sales_rebate/salestype_list.vue
  22. 1 0
      src/views/supply/apply/apply_list.vue
  23. 2 1
      src/views/supply/apply/components/apply_detail.vue
  24. 2 1
      src/views/supply/apply/components/apply_examine.vue
  25. 22 1
      src/views/supply/deliver/commerce_list.vue
  26. 5 0
      src/views/supply/deliver/components/commerce_detail.vue
  27. 5 0
      src/views/supply/deliver/components/deliver_detail.vue
  28. 5 0
      src/views/supply/deliver/components/home_detail.vue
  29. 14 1
      src/views/supply/deliver/deliver_list.vue
  30. 22 1
      src/views/supply/deliver/home_list.vue
  31. 2 2
      src/views/supply/engin/commerce_list.vue
  32. 52 54
      src/views/supply/engin/components/commerce_form.vue
  33. 65 65
      src/views/supply/engin/components/home_form.vue
  34. 2 2
      src/views/supply/engin/home_list.vue
  35. 1 1
      src/views/supply/pickup/check.vue
  36. 2 2
      src/views/supply/pickup/components/pickup_form.vue
  37. 21 5
      src/views/supply/pickup/components/pickup_print.vue
  38. 12 10
      src/views/supply/policy/components/retail_detail.vue
  39. 22 14
      src/views/supply/policy/components/retail_examine.vue
  40. 24 16
      src/views/supply/policy/components/retail_form2.vue
  41. 7 3
      src/views/supply/policy/components/retail_return.vue
  42. 72 7
      src/views/supply/policy/policy_list.vue
  43. 3 3
      src/views/supply/retail/components/retail_detail.vue
  44. 1 1
      src/views/supply/retail/components/retail_examine.vue
  45. 24 22
      src/views/supply/retail/components/retail_form.vue
  46. 1 1
      src/views/supply/retail/components/retail_return.vue
  47. 1 4
      src/views/supply/retail/retail_list.vue
  48. 2 2
      src/views/supply/return/return_list.vue
  49. 1 1
      src/views/supply/sales/components/sales_detail.vue
  50. 1 1
      src/views/supply/sales/components/sales_examine.vue
  51. 3 3
      src/views/supply/sales/sales_list.vue

+ 1 - 10
src/App.vue

@@ -1,13 +1,4 @@
-<!--
- * @Author: howie
- * @Date: 2022-06-02 09:55:42
- * @LastEditors: howie
- * @LastEditTime: 2022-07-08 16:40:44
- * @FilePath: \supply-front\src\App.vue
- * @Description:
- *
- * Copyright (c) 2022, All Rights Reserved.
--->
+
 <template>
   <div id="app">
     <router-view />

+ 4 - 4
src/api/policy_list.js

@@ -286,7 +286,7 @@ export function getProductList(params) {
 //获取轮播图列表
 export function getImgCarouseList(params) {
   return request({
-    url:'/record/list',
+    url: '/record/list',
     method: 'get',
     params
   })
@@ -295,7 +295,7 @@ export function getImgCarouseList(params) {
 //轮播图显示与隐藏
 export function handleImgIsShow(params) {
   return request({
-    url:'/record/updateImgStatus',
+    url: '/record/updateImgStatus',
     method: 'post',
     params
   })
@@ -304,7 +304,7 @@ export function handleImgIsShow(params) {
 //增加轮播图
 export function addImgCarousel(params) {
   return request({
-    url:'/record/carousel/add',
+    url: '/record/carousel/add',
     method: 'post',
     data: params
   })
@@ -313,7 +313,7 @@ export function addImgCarousel(params) {
 //修改轮播图
 export function editImgCarousel(params) {
   return request({
-    url:'/record/update',
+    url: '/record/update',
     method: 'post',
     data: params
   })

+ 19 - 1
src/api/supply/engin.js

@@ -194,6 +194,15 @@ export function editHome(params) {
   })
 }
 
+// 家用工程订单 - 编辑日期
+export function editDateHome(params) {
+  return request({
+    url: '/engin-order/home-upd-date',
+    method: 'post',
+    data: params
+  })
+}
+
 // 家用工程订单 - 提交审核
 export function submitHome(params) {
   return request({
@@ -273,7 +282,7 @@ export function getComLoginList(params) {
 // 商用工程订单 - 获取工程登录详情
 export function getComLoginDetail(params) {
   return request({
-    url: '/engin-info/detail',
+    url: '/engin-info/ref/detail',
     method: 'get',
     params
   })
@@ -297,6 +306,15 @@ export function editCom(params) {
   })
 }
 
+// 商用工程订单 - 编辑日期
+export function editDateCom(params) {
+  return request({
+    url: '/engin-order/trade-upd-date',
+    method: 'post',
+    data: params
+  })
+}
+
 // 商用工程订单 - 提交审核
 export function submitCom(params) {
   return request({

+ 20 - 12
src/layout/components/Navbar.vue

@@ -55,12 +55,12 @@
         <el-button type="primary" @click="submitForm">确 定</el-button>
       </div>
     </el-dialog>
-    <form v-show="false" :action="userInfo.enginSysUrl" method="POST">
-      <input type="hidden" :value="userInfo.enginUserName" name="username" />
-      <input type="hidden" :value="userInfo.enginPassword" name="password" />
-      <input type="hidden" value="zfire" name="vcode" >
-      <input type="submit" ref="engineSubmit">
-    </form>
+<!--    <form v-show="false" :action="userInfo.enginSysUrl" method="POST">-->
+<!--      <input type="hidden" :value="userInfo.enginUserName" name="username" />-->
+<!--      <input type="hidden" :value="userInfo.enginPassword" name="password" />-->
+<!--      <input type="hidden" value="zfire" name="vcode" >-->
+<!--      <input type="submit" ref="engineSubmit">-->
+<!--    </form>-->
   </div>
 </template>
 
@@ -157,7 +157,11 @@ export default {
       if (userInfoCopy && userInfoCopy.bindEngin) {
         checkEngineAccount().then(res => {
           if (res.code === 200) {
-            this.$refs.engineSubmit.click()
+            // this.$refs.engineSubmit.click()
+            const {href} = this.$router.resolve({
+              name: 'open_engin'
+            })
+            window.open(href, '_blank')
           } else {
             this.$errorMsg("账号密码错误,请重新绑定")
             this.dialogFormVisible = true
@@ -175,14 +179,18 @@ export default {
             enginPassword: this.engineForm.password
           }
           bindEngineAccount(params).then(res => {
-            console.log('-----------', res)
             if (res.code === 200) {
               this.$successMsg("绑定成功,正在打开工程机系统")
+              this.dialogFormVisible = false
               this.$store.dispatch('user/getInfo').then(() => {
-                this.userInfo.bindEngin = true
-                this.userInfo.enginUserName = this.engineForm.account
-                this.userInfo.enginPassword = this.engineForm.password
-                this.$refs.engineSubmit.click()
+                this.userInfo = JSON.parse(localStorage.getItem("supply_user"))
+                const {href} = this.$router.resolve({
+                  name: 'open_engin'
+                })
+                window.open(href, '_blank')
+                // this.userInfo.enginUserName = this.engineForm.account
+                // this.userInfo.enginPassword = this.engineForm.password
+                // this.$refs.engineSubmit.click()
               })
             } else {
               this.$errorMsg(res.message)

+ 7 - 2
src/router/index.js

@@ -36,7 +36,12 @@ export const constantRoutes = [
     component: () => import('@/views/login/index'),
     hidden: true
   },
-
+  {
+    path: '/external/open_engin',
+    name: 'open_engin',
+    component: () => import('@/views/external/open_engin'),
+    hidden: true
+  },
   {
     path: '/404',
     component: () => import('@/views/404'),
@@ -148,7 +153,7 @@ export const constantRoutes = [
   //     }
   //   ]
   // },
-  
+
   // {
   //   path: '/member',
   //   component: Layout,

+ 2 - 1
src/store/getters.js

@@ -10,6 +10,7 @@ const getters = {
   menus: state => state.user.menus,
   customerId: state => state.user.customerId,
   customerName: state => state.user.customerName,
-  showMessages: state => state.user.showMessages
+  showMessages: state => state.user.showMessages,
+  code:state =>state.sales.code
 }
 export default getters

+ 3 - 3
src/store/modules/sales.js

@@ -2,7 +2,7 @@
  * @Author: howie
  * @Date: 2022-06-18 14:33:08
  * @LastEditors: howie
- * @LastEditTime: 2022-06-29 10:03:21
+ * @LastEditTime: 2022-07-13 17:13:15
  * @FilePath: \supply-front\src\store\modules\sales.js
  * @Description:
  *
@@ -27,7 +27,7 @@ const state = {
 }
 
 const mutations = {
-  setId(state,id){
+   setId(state,id){
        state.code = id
        console.log('setId',id);
   }
@@ -40,7 +40,7 @@ const actions = {
   }) {
     return new Promise((resolve, reject) => {
       getId().then(res=>{
-          commit('setId',res.data)
+          // commit('setId',res.data)
           resolve()
       })
     })

+ 130 - 178
src/views/basic_data/material/components/material_list-detail.vue

@@ -16,7 +16,7 @@
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
             <el-form-item label="使用组织" size="small">
-              <el-input v-model="detail.useOrgId" size="small"></el-input>
+              <el-input v-model="detail.useOrgName" size="small"></el-input>
             </el-form-item>
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
@@ -55,7 +55,7 @@
               </el-col>
 
               <el-col>
-                <el-form-item label="旧物料编码" size="small">
+                <el-form-item label="金蝶编码" size="small">
                   <el-input v-model="detail.number"></el-input>
                 </el-form-item>
               </el-col>
@@ -177,7 +177,7 @@
 
                 <el-col :span="24">
                   <el-form-item label="存货类别" size="small">
-                    <el-input v-model="detail.categoryId"></el-input>
+                    <el-input v-model="detail.categoryName"></el-input>
                   </el-form-item>
                 </el-col>
 
@@ -309,68 +309,53 @@
               <span>存储</span>
             </div>
             <el-row>
-              <el-col :span="24"
-                >
-                   <el-form-item label="库存单位" size="small">
-                      <el-select v-model="value">
-                        <el-option label="普通仓库"> </el-option>
-                      </el-select>
-                    </el-form-item>
-
-             </el-col
-              >
+              <el-col :span="24">
+                <el-form-item label="库存单位" size="small">
+                  <el-select v-model="value">
+                    <el-option label="普通仓库"> </el-option>
+                  </el-select>
+                </el-form-item>
+              </el-col>
             </el-row>
             <el-row>
-              <el-col :span="24"
-                >
-                   <el-form-item label="换算方向" size="small">
-                      <el-select v-model="value">
-                        <el-option label="普通仓库"> </el-option>
-                      </el-select>
-                    </el-form-item>
-
-              </el-col
-              >
+              <el-col :span="24">
+                <el-form-item label="换算方向" size="small">
+                  <el-select v-model="value">
+                    <el-option label="普通仓库"> </el-option>
+                  </el-select>
+                </el-form-item>
+              </el-col>
             </el-row>
             <el-row>
-              <el-col :span="24"
-                >
-                     <el-form-item label="仓库" size="small">
-                <el-input v-model="value" ></el-input>
-
-                  </el-form-item>
-
+              <el-col :span="24">
+                <el-form-item label="仓库" size="small">
+                  <el-input v-model="value"></el-input>
+                </el-form-item>
               </el-col>
             </el-row>
             <el-row>
-              <el-col :span="24"
-                >
-                  <el-form-item label="仓位" size="small">
-                <el-input v-model="value" ></el-input>
-
-                  </el-form-item>
-
+              <el-col :span="24">
+                <el-form-item label="仓位" size="small">
+                  <el-input v-model="value"></el-input>
+                </el-form-item>
               </el-col>
             </el-row>
             <el-row>
-              <el-col :span="24"
-                >
-                 <el-form-item label="单箱标准数量" size="small">
-                <el-input v-model="value" ></el-input>
-
-                  </el-form-item>
-                </el-col>
+              <el-col :span="24">
+                <el-form-item label="单箱标准数量" size="small">
+                  <el-input v-model="value"></el-input>
+                </el-form-item>
+              </el-col>
             </el-row>
             <div class="base-header">
               <span>库存控制</span>
             </div>
             <el-row>
-              <el-col :span="24"
-                >
+              <el-col :span="24">
                 <el-form-item label="可锁库" size="small">
-                    <el-checkbox v-model="value" label="" ></el-checkbox>
-                  </el-form-item>
-               </el-col>
+                  <el-checkbox v-model="value" label=""></el-checkbox>
+                </el-form-item>
+              </el-col>
             </el-row>
           </div>
           <div>
@@ -378,94 +363,72 @@
               <span>管理</span>
             </div>
             <el-row>
-              <el-col :span="24"
-                >
-                      <el-form-item label="启用批号管理" size="small">
-                <el-input v-model="value" ></el-input>
-
-                  </el-form-item>
-               </el-col>
+              <el-col :span="24">
+                <el-form-item label="启用批号管理" size="small">
+                  <el-input v-model="value"></el-input>
+                </el-form-item>
+              </el-col>
             </el-row>
             <el-row>
-              <el-col :span="24"
-                >
-                    <el-form-item label="批号编码规则" size="small">
-                <el-input v-model="value" ></el-input>
-
-                  </el-form-item>
-               </el-col>
+              <el-col :span="24">
+                <el-form-item label="批号编码规则" size="small">
+                  <el-input v-model="value"></el-input>
+                </el-form-item>
+              </el-col>
             </el-row>
             <el-row>
-              <el-col :span="24"
-                >
-
-                 <el-form-item label="启用保质期管理" size="small">
-                <el-input v-model="value" ></el-input>
-
-                  </el-form-item>
-               </el-col>
+              <el-col :span="24">
+                <el-form-item label="启用保质期管理" size="small">
+                  <el-input v-model="value"></el-input>
+                </el-form-item>
+              </el-col>
             </el-row>
             <el-row>
-              <el-col :span="24"
-                >
-                   <el-form-item label="批号附属信息" size="small">
-                <el-input v-model="value" ></el-input>
-
-                  </el-form-item>
+              <el-col :span="24">
+                <el-form-item label="批号附属信息" size="small">
+                  <el-input v-model="value"></el-input>
+                </el-form-item>
               </el-col>
             </el-row>
             <el-row>
-              <el-col :span="24"
-                >
-                 <el-form-item label="保质期单位" size="small">
-                      <el-select v-model="value">
-                        <el-option label="普通仓库"> </el-option>
-                      </el-select>
-                    </el-form-item>
-
-              </el-col
-              >
+              <el-col :span="24">
+                <el-form-item label="保质期单位" size="small">
+                  <el-select v-model="value">
+                    <el-option label="普通仓库"> </el-option>
+                  </el-select>
+                </el-form-item>
+              </el-col>
             </el-row>
             <el-row>
-              <el-col :span="24"
-                >
-
-                 <el-form-item label="在架寿命期" size="small">
-                <el-input v-model="value" ></el-input>
-
-                  </el-form-item>
+              <el-col :span="24">
+                <el-form-item label="在架寿命期" size="small">
+                  <el-input v-model="value"></el-input>
+                </el-form-item>
               </el-col>
             </el-row>
             <div class="base-header">
               <span>库存成本</span>
             </div>
             <el-row>
-              <el-col :span="24"
-                >
-                   <el-form-item label="参考成本" size="small">
-                <el-input v-model="value" ></el-input>
-
-                  </el-form-item>
-               </el-col>
+              <el-col :span="24">
+                <el-form-item label="参考成本" size="small">
+                  <el-input v-model="value"></el-input>
+                </el-form-item>
+              </el-col>
             </el-row>
             <el-row>
-              <el-col :span="24"
-                >
-                  <el-form-item label="成本单位" size="small">
-                <el-input v-model="value" ></el-input>
-
-                  </el-form-item>
-               </el-col>
+              <el-col :span="24">
+                <el-form-item label="成本单位" size="small">
+                  <el-input v-model="value"></el-input>
+                </el-form-item>
+              </el-col>
             </el-row>
             <el-row>
-              <el-col :span="24"
-                >
-                      <el-form-item label="币别" size="small">
-                <el-input v-model="value" ></el-input>
-
-                  </el-form-item>
-
-               </el-col>
+              <el-col :span="24">
+                <el-form-item label="币别" size="small">
+                  <el-input v-model="value"></el-input>
+                </el-form-item>
+              </el-col>
             </el-row>
           </div>
           <div>
@@ -474,65 +437,47 @@
             </div>
             <el-row>
               <el-col :span="24">
-
-                  <el-form-item label="启用" size="small">
-                  </el-form-item>
-                  <el-form-item label="最小库存预警" size="small">
-                    <el-checkbox v-model="value" label="" ></el-checkbox>
-                  </el-form-item>
-                   <el-form-item label="安全库存预警" size="small">
-                    <el-checkbox v-model="value" label="" ></el-checkbox>
-                  </el-form-item>
-                   <el-form-item label="最大库存预警" size="small">
-                    <el-checkbox v-model="value" label="" ></el-checkbox>
-                  </el-form-item>
-                   <el-form-item label="在订货点预警" size="small">
-                    <el-checkbox v-model="value" label="" ></el-checkbox>
-                  </el-form-item>
-
+                <el-form-item label="启用" size="small"> </el-form-item>
+                <el-form-item label="最小库存预警" size="small">
+                  <el-checkbox v-model="value" label=""></el-checkbox>
+                </el-form-item>
+                <el-form-item label="安全库存预警" size="small">
+                  <el-checkbox v-model="value" label=""></el-checkbox>
+                </el-form-item>
+                <el-form-item label="最大库存预警" size="small">
+                  <el-checkbox v-model="value" label=""></el-checkbox>
+                </el-form-item>
+                <el-form-item label="在订货点预警" size="small">
+                  <el-checkbox v-model="value" label=""></el-checkbox>
+                </el-form-item>
               </el-col>
             </el-row>
             <el-row>
-              <el-col :span="24"
-                >
-                 <el-form-item label="最小库存" size="small">
-                <el-input v-model="value" ></el-input>
-
-                  </el-form-item>
-
-                </el-col>
+              <el-col :span="24">
+                <el-form-item label="最小库存" size="small">
+                  <el-input v-model="value"></el-input>
+                </el-form-item>
+              </el-col>
             </el-row>
             <el-row>
-              <el-col :span="24"
-                >
-                  <el-form-item label="再定货点" size="small">
-                <el-input v-model="value" ></el-input>
-
-                  </el-form-item>
-
-
+              <el-col :span="24">
+                <el-form-item label="再定货点" size="small">
+                  <el-input v-model="value"></el-input>
+                </el-form-item>
               </el-col>
             </el-row>
             <el-row>
-              <el-col :span="24"
-                >
-                      <el-form-item label="经济订货批量" size="small">
-                <el-input v-model="value" ></el-input>
-
-                  </el-form-item>
-
-
+              <el-col :span="24">
+                <el-form-item label="经济订货批量" size="small">
+                  <el-input v-model="value"></el-input>
+                </el-form-item>
               </el-col>
             </el-row>
             <el-row>
-              <el-col :span="24"
-                >
-                      <el-form-item label="最大库存" size="small">
-                <el-input v-model="value" ></el-input>
-
-                  </el-form-item>
-
-
+              <el-col :span="24">
+                <el-form-item label="最大库存" size="small">
+                  <el-input v-model="value"></el-input>
+                </el-form-item>
               </el-col>
             </el-row>
           </div>
@@ -620,11 +565,11 @@
           <br />
           <el-row>
             <el-col :span="6">
-                <el-form-item label="商城分类" size="small">
-                      <el-select v-model="value">
-                        <el-option label="挂式空调"> </el-option>
-                      </el-select>
-                    </el-form-item>
+              <el-form-item label="商城分类" size="small">
+                <el-select v-model="value">
+                  <el-option label="挂式空调"> </el-option>
+                </el-select>
+              </el-form-item>
             </el-col>
           </el-row>
           <div>
@@ -656,12 +601,17 @@
           <el-row>
             <el-col :span="6">
               <el-form-item label="是否允许订货" size="small">
-                      <el-select v-model="value1">
-                        <el-option label="是"> </el-option>
-                        <el-option label="否"> </el-option>
-                      </el-select>
-                    </el-form-item>
-
+                <el-select v-model="dinghuo">
+                  <el-option label="是" :value="true"> </el-option>
+                  <el-option label="否" :value="false"> </el-option>
+                </el-select>
+              </el-form-item>
+              <el-form-item label="是否允许置换" size="small">
+                <el-select v-model="zhihuan">
+                  <el-option label="是" :value="true"> </el-option>
+                  <el-option label="否" :value="false"> </el-option>
+                </el-select>
+              </el-form-item>
             </el-col>
           </el-row>
           <!-- <el-button >保存</el-button> -->
@@ -681,8 +631,10 @@ export default {
   },
   data() {
     return {
-      value1:'是'
-    }
+      value1: "是",
+      dinghuo: true,
+      zhihuan: true,
+    };
   },
   created() {
     console.log(this.detail);
@@ -797,7 +749,7 @@ export default {
     margin-bottom: 0;
   }
 }
-::v-deep .el-select{
+::v-deep .el-select {
   width: 100%;
 }
 </style>

+ 31 - 32
src/views/basic_data/material/components/modify_list-apply.vue

@@ -99,7 +99,7 @@
                 <el-button
                   type="text"
                   class="textColor"
-                  @click="hanleDeleInd(scope.$index,scope.row.cid)"
+                  @click="hanleDeleInd(scope.$index, scope.row.cid)"
                   >删除</el-button
                 >
               </template>
@@ -115,13 +115,15 @@
                 <el-form-item>
                   <el-select
                     placeholder="请选择销售类型"
-                    @change="handleSale($event, scope.$index,scope.row.saleTypes)"
+                    @change="
+                      handleSale($event, scope.$index, scope.row.saleTypes)
+                    "
                     v-model="scope.row.mainId"
                   >
                     <el-option
                       v-for="item in scope.row.saleTypes"
                       :label="item.saleName"
-                      :value="item.mainId"
+                      :value="item.id"
                     ></el-option>
                   </el-select>
                   <!-- <el-select
@@ -195,7 +197,7 @@
             >
               <template slot-scope="scope">
                 <el-form-item>
-                  <el-input disabled  v-model="scope.row.unit"></el-input>
+                  <el-input disabled v-model="scope.row.unit"></el-input>
                 </el-form-item>
               </template>
             </el-table-column>
@@ -914,24 +916,22 @@ export default {
     });
   },
   methods: {
-    handleSale(e, index,saleTypes) {
-
-      let saleArr = []
-      this.rebateList = this.rebateList.filter((k) => {
+    handleSale(e, index, saleTypes) {
 
-          saleArr = saleTypes.filter((i) => {
-            return e == i.mainId;
-          })
-          return saleArr[0].id === k.saleTypeId
+      let saleArr = [];
+      let rebateList =[]
+     rebateList = this.rebateList.filter((k) => {
 
+        return e === k.saleTypeId;
       });
+        saleArr = saleTypes.filter((i) => {
+               return e == i.id;
+          });
 
-      this.items[index].mainId = saleArr[0].mainId
-      this.items[index].mainName = saleArr[0].mainName
-      this.items[index].saleTypeId = saleArr[0].id
-      this.items[index].saleTypeName = saleArr[0].saleName
-      this.$set(this.items[index], "rebateList", this.rebateList);
-      console.log(this.rebateList,this.items[index]);
+      // this.items[index].mainName = saleArr[0].mainName;
+      this.items[index].saleTypeId = saleArr[0].id;
+      this.items[index].saleTypeName = saleArr[0].saleName;
+      this.$set(this.items[index], "rebateList", rebateList);
       this.fang = false;
     },
     // xua
@@ -1015,20 +1015,19 @@ export default {
     indexMethod(index) {
       console.log(index);
     },
-    hanleDeleInd(index,id) {
-        if (id) {
-          const dataArr = JSON.parse(JSON.stringify(this.dataList))
-          for (let j = 0; j < dataArr.length; j++) {
-             if (id== dataArr[j].id) {
-
-                  dataArr[j].disabled = false
-                 this.$set(dataArr[j],'disabled',false)
-            }}
-
-            this.dataList = dataArr
-
+    hanleDeleInd(index, id) {
+      if (id) {
+        const dataArr = JSON.parse(JSON.stringify(this.dataList));
+        for (let j = 0; j < dataArr.length; j++) {
+          if (id == dataArr[j].id) {
+            dataArr[j].disabled = false;
+            this.$set(dataArr[j], "disabled", false);
+          }
         }
 
+        this.dataList = dataArr;
+      }
+
       this.items.splice(index, 1);
     },
     handleDetermine() {
@@ -1147,8 +1146,8 @@ export default {
       // row.disabled == undefined 才能被选中
       if (row.disabled == undefined || row.disabled == false) {
         return true;
-      }else{
-        return false
+      } else {
+        return false;
       }
       // 函数必须有返回值且是布尔值
       // 页面刷新后该函数会执行 N 次进行判断(N 为表格行数)

+ 2 - 2
src/views/basic_data/material/modify_list.vue

@@ -129,13 +129,13 @@
               min-width="160"
               show-overflow-tooltip
             ></el-table-column>
-            <el-table-column
+            <!-- <el-table-column
               align="center"
               label="产品品类"
               prop="mainName"
               min-width="160"
               show-overflow-tooltip
-            ></el-table-column>
+            ></el-table-column> -->
             <el-table-column
               align="center"
               label="存货编码"

+ 38 - 31
src/views/engin_deposit/deposit_list.vue

@@ -59,7 +59,7 @@
                 </el-date-picker>
               </el-form-item>
             </el-col>
-            <el-col :xs="24" :sm="12" :lg="6">
+            <!-- <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="产品名称" prop="">
                 <el-input placeholder="请输入"></el-input>
               </el-form-item>
@@ -68,19 +68,22 @@
               <el-form-item label="规格型号" prop="">
                 <el-input placeholder="请输入"></el-input>
               </el-form-item>
-            </el-col>
-
-            <el-col :xs="24" :sm="24" :lg="12">
+            </el-col> -->
+            <el-col :xs="24" :sm="24" :lg="24">
               <el-form-item label="" class="fr">
-                <el-button size="small" @click="resetScreenForm">清空</el-button>
-                <el-button size="small" type="primary" @click="submitScreenForm">搜索</el-button>
+                <el-button size="small" @click="resetScreenForm"
+                  >清空</el-button
+                >
+                <el-button size="small" type="primary" @click="submitScreenForm"
+                  >搜索</el-button
+                >
               </el-form-item>
             </el-col>
           </el-row>
         </el-form>
       </div>
       <!-- 按钮 -->
-      <div class="btn-group clearfix" style="display:flex">
+      <div class="btn-group clearfix" style="display: flex">
         <el-button type="primary" size="small" @click="hanleDownloadFiles"
           >导出</el-button
         >
@@ -108,11 +111,7 @@
             @select-all="handleSelectionAllChange"
             @selection-change="handleSelectionAllChange"
           >
-            <el-table-column
-              align="center"
-              type="selection"
-              width="55"
-            >
+            <el-table-column align="center" type="selection" width="55">
             </el-table-column>
             <el-table-column
               align="center"
@@ -241,10 +240,20 @@
               show-overflow-tooltip
             >
               <template slot-scope="scope">
-                <el-button type="text" class="textColor" @click="detailFn(scope.row)"
+                <el-button
+                  type="text"
+                  class="textColor"
+                  @click="detailFn(scope.row)"
                   >详情</el-button
                 >
-                <el-button type="text" class="textColor"  v-if="scope.row.examineStatus == 'SAVE'" @click="surrenderFn(scope.row)"
+                <el-button
+                  type="text"
+                  class="textColor"
+                  v-if="
+                    scope.row.examineStatus == 'SAVE' &&
+                    $checkBtnRole('apply', $route.meta.roles)
+                  "
+                  @click="surrenderFn(scope.row)"
                   >申请退押</el-button
                 >
                 <!-- <el-button type="text" class="textColor" slot="reference"
@@ -309,9 +318,9 @@ export default {
       listLoading: false, // 列表加载loading
       deduction: "全部",
       showPage: 1,
-      importFileList:[],
-      selectData:[],
-      baseURL:''
+      importFileList: [],
+      selectData: [],
+      baseURL: "",
     };
   },
 
@@ -322,12 +331,12 @@ export default {
     },
     //申请退押
     surrenderFn(row) {
-      this.depositManageId = row.depositManageId
+      this.depositManageId = row.depositManageId;
       this.showPage = 4;
     },
     detailFn(row) {
-      this.depositManageId = row.depositManageId
-      this.refEnginRecordNo = row.refEnginRecordNo
+      this.depositManageId = row.depositManageId;
+      this.refEnginRecordNo = row.refEnginRecordNo;
       this.showPage = 2;
     },
     getList() {
@@ -343,20 +352,19 @@ export default {
         this.listTotal = res.data.total;
       });
     },
-    handleRadio(){
-      this.getList()
+    handleRadio() {
+      this.getList();
     },
     hanleDownloadFiles() {
       if (this.selectData.length) {
-        const arr = []
+        const arr = [];
         for (let i = 0; i < this.selectData.length; i++) {
-            arr.push( this.selectData[i].depositManageId)
+          arr.push(this.selectData[i].depositManageId);
         }
-       downloadFiles("/deposit-manage/export",{id:arr});
-      }else{
-        this.$errorMsg('请选择押金项')
+        downloadFiles("/deposit-manage/export", { id: arr });
+      } else {
+        this.$errorMsg("请选择押金项");
       }
-
     },
     // 导入
     async handleImport(param) {
@@ -381,10 +389,9 @@ export default {
         });
       }
     },
-     handleSelectionAllChange(e) {
+    handleSelectionAllChange(e) {
       this.selectData = e;
     },
-
   },
 };
 </script>
@@ -393,7 +400,7 @@ export default {
 .dateStyle {
   width: 100%;
 }
-.import-btn{
+.import-btn {
   margin-left: 10px;
 }
 </style>

+ 32 - 0
src/views/external/open_engin.vue

@@ -0,0 +1,32 @@
+<template>
+  <div>
+    <form v-show="false" :action="userInfo.enginSysUrl" method="POST">
+      <input type="hidden" :value="userInfo.enginUserName" name="username" />
+      <input type="hidden" :value="userInfo.enginPassword" name="password" />
+      <input type="hidden" value="zfire" name="vcode" >
+      <input type="submit" ref="engineSubmit">
+    </form>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "OpenEngin",
+  data() {
+    return {
+      userInfo: ''
+    }
+  },
+  created() {
+    this.userInfo = JSON.parse(localStorage.getItem("supply_user"))
+    // this.$successMsg("打开工程机系统")
+    this.$nextTick(() => {
+      this.$refs.engineSubmit.click()
+    })
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 11 - 1
src/views/login/index.vue

@@ -572,7 +572,7 @@ $light_gray: #eee;
   position: relative;
   width: 360px;
   height: 50px;
-  margin-bottom: 20px;
+  margin-bottom: 25px;
   background: #ffffff;
   border: 1px solid #e6e6e6 !important;
   border-radius: 4px;
@@ -700,6 +700,16 @@ $light_gray: #eee;
   }
 }
 
+::v-deep .el-form-item__error {
+  color: #f56c6c;
+  font-size: 12px;
+  line-height: 1;
+  padding-top: 6px;
+  position: absolute;
+  top: 100%;
+  left: 0;
+}
+
 @media only screen and (max-width: 600px) {
   .image-container {
     display: none;

+ 12 - 16
src/views/sales_policy/codealer_list.vue

@@ -3,8 +3,8 @@
     <el-header height="100%" class="mg">
       <el-form
         size="small"
-        :model="searchForm"
-        ref="searchForm"
+        :model="screenForm"
+        ref="screenForm"
         :inline="false"
       >
         <el-row :gutter="20">
@@ -12,7 +12,7 @@
             <el-form-item prop="code">
               <el-input
                 size="small"
-                v-model="searchForm.code"
+                v-model="screenForm.code"
                 placeholder="销售政策编号"
               ></el-input>
             </el-form-item>
@@ -21,7 +21,7 @@
             <el-form-item prop="remark">
               <el-input
                 size="small"
-                v-model="searchForm.remark"
+                v-model="screenForm.remark"
                 placeholder="销售政策说明"
               ></el-input>
             </el-form-item>
@@ -30,7 +30,7 @@
             <el-form-item prop="title">
               <el-input
                 size="small"
-                v-model="searchForm.title"
+                v-model="screenForm.title"
                 placeholder="表头备注"
               ></el-input>
             </el-form-item>
@@ -124,7 +124,7 @@
 </template>
 
 <script>
-import { getCustomerlist,getPolicyDetail } from "@/api/policy_list";
+import { getCustomerlist, getPolicyDetail } from "@/api/policy_list";
 import Minxin from "@/mixin";
 import Distributor from "./components/Distributor";
 export default {
@@ -132,10 +132,10 @@ export default {
   data() {
     return {
       isShow: true,
-      id:'',
+      id: "",
       input: "",
       dataList: [],
-      searchForm: {
+      screenForm: {
         code: "",
         remark: "",
         title: "",
@@ -144,27 +144,23 @@ export default {
   },
   methods: {
     getList() {
-
       this.listLoading = true;
       const params = {
         pageNum: this.currentPage,
         pageSize: this.pageSize,
-        code: this.searchForm.code,
-        remark: this.searchForm.remark,
-        title: this.searchForm.title,
+        code: this.screenForm.code,
+        remark: this.screenForm.remark,
+        title: this.screenForm.title,
       };
       getCustomerlist(params).then((res) => {
         console.log(res);
         this.dataList = res.data.records;
-        this.listTotal = res.data.total
+        this.listTotal = res.data.total;
         this.listLoading = false;
       });
-
-
     },
   },
   components: {
-
     Distributor,
   },
 };

+ 31 - 34
src/views/sales_policy/components/AddCondition.vue

@@ -1,10 +1,7 @@
 <template>
   <el-container>
     <el-header height="50px" class="header">
-      <el-page-header
-        @back="handleBack"
-        :content="!id ? '添加页面' : '详情页面'"
-      >
+      <el-page-header @back="handleBack" :content="!id ? '新增' : '详情页面'">
       </el-page-header>
     </el-header>
     <div class="line">
@@ -23,6 +20,8 @@
             v-for="(item, index) in conditionBox"
             :key="index"
           >
+            <h5 v-if="index == 0">限定机型</h5>
+            <h5 v-if="index > 0">配提机型</h5>
             <el-row>
               <el-row class="pdt">
                 <el-button
@@ -107,6 +106,8 @@
             v-for="(item, index) in conditionBoxs"
             :key="index"
           >
+            <h5 v-if="index == 0">限定机型</h5>
+            <h5 v-if="index > 0">配提机型</h5>
             <el-row>
               <el-row>
                 <el-table style="width: 100%" :data="item" border>
@@ -471,6 +472,7 @@ export default {
         this.$parent.isShow = 8;
       } else {
         this.$parent.isCondition = 0;
+        Object.assign(this.$data, this.$options.data());
       }
     },
     /**
@@ -489,33 +491,28 @@ export default {
       // 页面刷新后该函数会执行 N 次进行判断(N 为表格行数)
       // 如果没有返回值则默认返回false(全部无法选中)
     },
-    getCommonApi() {
+    async getCommonApi() {
       if (this.id) {
-        getConditionMaterialDetail({ id: this.policyId }).then((res) => {
-          this.pop = res.data.pop;
-          let pop = res.data.pop.split(":");
-          for (let i = 0; i < pop.length; i++) {
-            if (i == 0) {
-              this.limit = pop[i];
-              continue;
-            }
-
-            this.$set(this.popArr, `line_${i - 1}`, pop[i]);
+        const res = await getConditionMaterialDetail({ id: this.policyId });
+        this.pop = res.data.pop;
+        let pop = res.data.pop.split(":");
+        for (let i = 0; i < pop.length; i++) {
+          if (i == 0) {
+            this.limit = pop[i];
+            continue;
           }
-          console.log(this.popArr);
+          this.$set(this.popArr, `line_${i - 1}`, pop[i]);
+        }
+        for (let k = 0; k < pop.length; k++) {
+          const { data } = await getConditionMaterialList({
+            pageNum: 1,
+            pageSize: -1,
+            policyConditionId: res.data.id,
+            popType: k + 1,
+          });
 
-          for (let k = 0; k < pop.length; k++) {
-            getConditionMaterialList({
-              pageNum: 1,
-              pageSize: -1,
-              policyConditionId: res.data.id,
-              popType: k + 1,
-            }).then((res) => {
-              this.conditionBoxs.push(res.data.records);
-            });
-          }
-          console.log(this.conditionBoxs);
-        });
+          this.conditionBoxs.push(data.records);
+        }
       }
     },
     toggleSelection(rows) {
@@ -626,12 +623,12 @@ export default {
         for (let j = 0; j < this.conditionBox.length; j++) {
           datas = [...datas, ...this.conditionBox[j]];
         }
-    /**
-     * @value newConditionBox 首页保存的所有选中者,即条件1
-     * @value res.data.records,this.conditList 每次点击添加获取的最新数据
-     * @value disabled 添加条件都进行比较上一个条件或者所有条件当中的限定机型和配提机型,
-     * 如:上一个或者所有条件中已经存在disabled
-     */
+        /**
+         * @value newConditionBox 首页保存的所有选中者,即条件1
+         * @value res.data.records,this.conditList 每次点击添加获取的最新数据
+         * @value disabled 添加条件都进行比较上一个条件或者所有条件当中的限定机型和配提机型,
+         * 如:上一个或者所有条件中已经存在disabled
+         */
         if (this.newConditionBox.length) {
           this.conditList = res.data.records;
           for (let j = 0; j < this.newConditionBox.length; j++) {

+ 58 - 58
src/views/sales_policy/components/AddPolicy.vue

@@ -4,7 +4,7 @@
       <el-header height="50px" class="header">
         <el-page-header
           @back="($parent.isShow = 1), ($parent.isFlag = '')"
-          content="详情页面"
+          content="新增"
         >
         </el-page-header>
       </el-header>
@@ -14,15 +14,14 @@
           <el-divider></el-divider>
           <el-form
             :model="searchForm"
-
-            ref="searchForm"
+            ref="form"
             label-width="120px"
             size="small"
             class="demo-searchForm"
           >
             <el-row>
               <el-col :xs="24" :ms="12" :lg="12">
-                <el-form-item label="销售政策编号" >
+                <el-form-item label="销售政策编号">
                   <el-input
                     disabled
                     v-model="searchForm.code"
@@ -56,7 +55,7 @@
                   </el-select>
                 </el-form-item>
               </el-col>
-              <el-col :xs="24" :ms="12" :lg="12">
+              <!-- <el-col :xs="24" :ms="12" :lg="12">
                 <el-form-item label="产品品类" prop="mainId">
                   <el-select
                     v-model="searchForm.mainId"
@@ -71,7 +70,7 @@
                     ></el-option>
                   </el-select>
                 </el-form-item>
-              </el-col>
+              </el-col> -->
               <el-col :xs="24" :ms="12" :lg="12">
                 <el-form-item label="生效日期" prop="startTime">
                   <el-date-picker
@@ -103,7 +102,7 @@
                 </el-form-item>
               </el-col>
               <el-col :xs="24" :ms="24" :lg="24">
-                <el-form-item label="政策封面图" >
+                <el-form-item label="政策封面图">
                   <ImageUpload :fileList="fileList" :multiple="false" />
                 </el-form-item>
               </el-col>
@@ -120,7 +119,6 @@
                 </h4>
                 <template>
                   <el-upload
-                    v-show="fang == true"
                     class="import-btn"
                     :action="baseURL + 'student/import'"
                     :http-request="handleImport"
@@ -130,13 +128,7 @@
                     <el-button size="small">导入货品价格表</el-button>
                   </el-upload>
                 </template>
-                <el-button
-                  size="small"
-                  class="import-btn"
-                  v-show="fang == false"
-                  @click="handelStop"
-                  >导入货品价格表</el-button
-                >
+
                 <el-button size="small" @click="hanleDownloadFiles"
                   >下载模板</el-button
                 >
@@ -271,7 +263,13 @@
             </el-table-column>
             <el-table-column prop="name" label="限定条件" align="center">
               <template slot-scope="scope">
-              <el-input v-model="scope.row.name" style="text-align: center;" placeholder="请输入名称" :disabled="scope.row.fang" @blur="handleConditionName(scope.row)"></el-input>
+                <el-input
+                  v-model="scope.row.name"
+                  style="text-align:center"
+                  placeholder="请输入名称"
+                  :disabled="scope.row.fang"
+                  @blur="handleConditionName(scope.row)"
+                ></el-input>
               </template>
             </el-table-column>
             <el-table-column
@@ -284,7 +282,7 @@
                 <el-button
                   type="text"
                   size="small"
-                  @click="scope.row.fang=false"
+                  @click="scope.row.fang = false"
                   >编辑</el-button
                 >
                 <el-button
@@ -319,7 +317,7 @@
 </template>
 
 <script>
-import { mapState, mapMutations } from "vuex";
+import { mapGetters, mapMutations } from "vuex";
 import Minxin from "@/mixin";
 import {
   addPoliy,
@@ -329,7 +327,7 @@ import {
   deleteCondition,
   getConditionList,
   deleteMaterialPolicy,
-  updateCondition
+  updateCondition,
 } from "@/api/policy_list";
 import { getDictList } from "@/api/common";
 import { downloadFiles, handleImport } from "@/utils/util";
@@ -378,28 +376,22 @@ export default {
       dictList: [],
     };
   },
-  computed: mapState({
-    comCode: (state) => {
-      console.log(state, "kkkk");
-      return state.sales.code;
-    },
-    // newForm:(state) => {
-    //   return state.sales.searchForm;
-    // },
-    // imgFile:(state) => {
-    //   return state.sales.fileList;
-    // },
-  }),
+  computed: {
+    ...mapGetters({
+      comCode: "code",
+    }),
+  },
+
   mounted() {
-    // console.log(this.comCode, "kkjk");
     this.searchForm.code = this.comCode;
   },
   updated() {
-    console.log(this.comCode, "kkjk");
     this.searchForm.code = this.comCode;
   },
   created() {
     this.getCommonApi();
+    // console.log(this.$store.code);
+
     if (this.$parent.isFlag) {
       // this.handletwoList()
     }
@@ -450,13 +442,12 @@ export default {
         this.dictList = res.data;
       });
     },
-    handleConditionName(row){
+    handleConditionName(row) {
       console.log(row.name);
-      updateCondition({id:row.id,name:row.name}).then(res=>{
-        this.$successMsg('修改成功')
-        row.fang = true
-      })
-
+      updateCondition({ id: row.id, name: row.name }).then((res) => {
+        this.$successMsg("修改成功");
+        row.fang = true;
+      });
     },
     handleSubmitCon() {
       const params = {
@@ -465,12 +456,9 @@ export default {
       // 获取条件政策
       getConditionList(params).then((res) => {
         for (let i = 0; i < res.data.length; i++) {
-           res.data[i].name = ''
-           res.data[i].fang = true
-
+          res.data[i].fang = true;
         }
         this.conditionList = res.data;
-
       });
     },
     handelStop() {
@@ -488,7 +476,7 @@ export default {
       const formData = new FormData();
       formData.append("file", file);
       formData.append("policyId", this.searchForm.code);
-        formData.append("mainId", this.searchForm.mainId);
+      // formData.append("mainId", this.searchForm.mainId);
       let result = await handleImport("/policy/material/import", formData);
       this.importLoading = false;
       this.importFileList = [];
@@ -496,7 +484,6 @@ export default {
         this.$alert(result.message, "导入成功", {
           confirmButtonText: "确定",
         });
-
         this.handletwoList();
       } else {
         this.$alert(result.message, "导入失败", {
@@ -532,10 +519,22 @@ export default {
     },
     // 提交审核
     handleAddPolicy(policyCustomers) {
-      // if (!this.conditionList.length) {
-      //      this.$errorMsg("请添加条件信息 ");
-      //      return
-      // }
+      if (!this.searchForm.title) {
+        this.$errorMsg("请输入说明");
+        return;
+      }
+      if (!this.searchForm.type) {
+        this.$errorMsg("请选择类型");
+        return;
+      }
+      if (!this.searchForm.startTime) {
+        this.$errorMsg("请选择生效日期");
+        return;
+      }
+      if (!this.searchForm.endTime) {
+        this.$errorMsg("请选择失效日期");
+        return;
+      }
       if (policyCustomers.length) {
         var arr = [];
         policyCustomers.forEach((el) => {
@@ -545,17 +544,16 @@ export default {
             customerNumber: el.number,
             lastOrderTime: "",
             limitTakeNum: 0,
-
             policyId: this.comCode,
             policyTitle: "",
             remark: "",
           });
         });
-        this.dictList.forEach((k) => {
-          if (k.dictCode == this.searchForm.mainId) {
-            this.searchForm.mainName = k.dictValue;
-          }
-        });
+        // this.dictList.forEach((k) => {
+        //   if (k.dictCode == this.searchForm.mainId) {
+        //     this.searchForm.mainName = k.dictValue;
+        //   }
+        // });
         const params = {
           adminCompanyId: "",
           code: "",
@@ -564,24 +562,26 @@ export default {
           examineRemark: "",
           examineStatus: "",
           id: "",
-          imgSrc: this.fileList.length ? this.fileList[0].url : "",
           policyCustomers: arr,
           remark: "",
           status: true,
           title: "",
           type: "",
           ...this.searchForm,
+          imgSrc: this.fileList[0].url || "",
         };
+        console.log(this.fileList);
         addPoliy(params).then((res) => {
           console.log(res);
           this.$successMsg("新增成功");
-          this.fileList = [];
+
           this.$parent.getList();
           this.$parent.isShow = 1;
         });
         return;
+      } else {
+        this.$errorMsg("选择经销商 ");
       }
-      this.$errorMsg("选择经销商 ");
     },
     //删除
     hanleDelete(id) {

+ 776 - 0
src/views/sales_policy/components/EditCondition.vue

@@ -0,0 +1,776 @@
+<template>
+  <el-container>
+    <el-header height="50px" class="header">
+      <el-page-header @back="handleBack" content="编辑"> </el-page-header>
+    </el-header>
+    <div class="line">
+      <el-divider></el-divider>
+      <h4>限定条件</h4>
+      <el-divider></el-divider>
+    </div>
+    <el-main v-if="id">
+      <el-row>
+        <el-row :gutter="50">
+          <el-col
+            :xs="24"
+            :sm="24"
+            :lg="24"
+            class="mgb"
+            v-for="(item, index) in conditionBox"
+            :key="index"
+          >
+            <h5 v-if="index == 0">限定机型</h5>
+            <h5 v-if="index > 0">配提机型</h5>
+            <el-row>
+              <el-row class="pdt">
+                <el-button
+                  type="primary"
+                  size="small"
+                  @click="(VisibleModle = true), getMaterialLists(index)"
+                  >添加机型</el-button
+                >
+
+                <el-button
+                  type="primary"
+                  size="small"
+                  @click="handleDeleteRow(index)"
+                  >删除机型</el-button
+                >
+              </el-row>
+              <el-row>
+                <el-table
+                  style="width: 100%"
+                  :data="item"
+                  border
+                  @select="hanleSelectAll($event, index)"
+                  @select-all="hanleSelectAll($event, index)"
+                >
+                  <el-table-column type="selection" width="55" align="center">
+                  </el-table-column>
+                  <el-table-column
+                    label="货品名称"
+                    width="300"
+                    align="center"
+                    prop="materialName"
+                  >
+                  </el-table-column>
+                  <el-table-column
+                    prop="specification"
+                    label="规格型号"
+                    align="center"
+                  >
+                  </el-table-column>
+                </el-table>
+              </el-row>
+            </el-row>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-form label-width="120px" :inline="false" size="small">
+            <el-row>
+              <el-form-item label="配置比例设置"> </el-form-item>
+            </el-row>
+            <el-col :xs="24" :sm="8" :lg="8">
+              <el-form-item label="限定机型">
+                <el-input size="small" v-model="limit"></el-input>
+              </el-form-item>
+            </el-col>
+
+            <el-col
+              :xs="24"
+              :sm="8"
+              :lg="8"
+              v-for="(len, index) in conditionBox.length - 1"
+            >
+              <el-form-item :label="'配提' + (index + 1) + '比例'">
+                <el-input
+                  size="small"
+                  v-model="popArr['line_' + index]"
+                ></el-input>
+              </el-form-item>
+            </el-col>
+          </el-form>
+        </el-row>
+        <el-divider></el-divider>
+      </el-row>
+    </el-main>
+    <el-main v-else>
+      <el-row>
+        <el-row :gutter="50">
+          <el-col
+            :xs="24"
+            :sm="24"
+            :lg="24"
+            class="mgb"
+            v-for="(item, index) in conditionBoxs"
+            :key="index"
+          >
+            <el-row>
+              <el-row>
+                <el-table style="width: 100%" :data="item" border>
+                  <el-table-column
+                    type="selection"
+                    width="55"
+                    align="center"
+                    v-if="!id"
+                  >
+                  </el-table-column>
+                  <el-table-column
+                    type="index"
+                    label="序号"
+                    width="55"
+                    align="center"
+                    v-else
+                  >
+                  </el-table-column>
+                  <el-table-column
+                    label="货品名称"
+                    width="300"
+                    align="center"
+                    prop="materialName"
+                  >
+                    <template slot-scope="scope">{{
+                      scope.row.materialName
+                    }}</template>
+                  </el-table-column>
+                  <el-table-column
+                    prop="specification"
+                    label="规格型号"
+                    align="center"
+                  >
+                  </el-table-column>
+                </el-table>
+              </el-row>
+            </el-row>
+          </el-col>
+        </el-row>
+        <el-row v-if="conditionBoxs.length">
+          <el-form label-width="120px" :inline="false" size="small">
+            <el-row>
+              <el-form-item label="配置比例设置"> </el-form-item>
+            </el-row>
+            <el-col :xs="24" :sm="8" :lg="8">
+              <el-form-item label="限定机型">
+                <el-input
+                  size="small"
+                  v-model="limit"
+                  :readonly="!id ? false : true"
+                ></el-input>
+              </el-form-item>
+            </el-col>
+
+            <el-col
+              :xs="24"
+              :sm="8"
+              :lg="8"
+              v-for="(len, index) in conditionBoxs.length - 1"
+            >
+              <el-form-item :label="'配提' + (index + 1) + '比例'">
+                <el-input
+                  size="small"
+                  :readonly="!id ? false : true"
+                  v-model="popArr['line_' + index]"
+                ></el-input>
+              </el-form-item>
+            </el-col>
+          </el-form>
+          <el-col class="text_rihgt" v-if="false">
+            <el-button type="primary" size="small" @click=""
+              >添加限定条件</el-button
+            ></el-col
+          >
+        </el-row>
+        <el-divider></el-divider>
+      </el-row>
+    </el-main>
+    <el-footer height="100px" v-if="id">
+      <el-row :gutter="20">
+        <el-col :xs="24" :sm="12" :lg="12" :offset="0">
+          <el-button type="primary" size="small" @click="handleSubmit"
+            >保存</el-button
+          >
+        </el-col>
+        <el-col :xs="24" :sm="12" :lg="12" :offset="0" class="tr">
+          <el-button type="primary" size="small" @click="hanleAddModel"
+            >添加</el-button
+          >
+          <el-button type="primary" size="small" @click="handleresale"
+            >重置</el-button
+          >
+        </el-col>
+      </el-row>
+    </el-footer>
+    <el-dialog :visible.sync="VisibleModle" width="70%" center>
+      <div>
+        <el-container>
+          <el-header height="">
+            <el-form label-width="0" :inline="false" size="small">
+              <el-col :xs="24" :sm="8" :lg="8" :offset="0">
+                <el-form-item label="">
+                  <el-input
+                    v-model="saleTypeCode"
+                    placeholder="类型编号"
+                  ></el-input>
+                </el-form-item>
+              </el-col>
+            </el-form>
+          </el-header>
+          <el-main height="">
+            <el-row>
+              <el-row :gutter="50">
+                <el-col :xs="10" :ms="10" :lg="10">
+                  <el-row>
+                    <el-row> </el-row>
+                    <el-row>
+                      <el-row class="title"> 可选产品列表 </el-row>
+                      <el-table
+                        style="width: 100%"
+                        :data="conditList"
+                        border
+                        height="400"
+                        @select-all="handleSelectionAllChange"
+                        @selection-change="handleSelectionChange"
+                      >
+                        <el-table-column
+                          type="selection"
+                          width="55"
+                          :selectable="selectable"
+                          align="center"
+                        >
+                        </el-table-column>
+                        <el-table-column
+                          label="产品编码"
+                          prop="materialNumber"
+                          width="120"
+                          align="center"
+                        >
+                        </el-table-column>
+                        <el-table-column
+                          prop="materialName"
+                          label="产品名称"
+                          align="center"
+                        >
+                        </el-table-column>
+                        <el-table-column
+                          prop="specification"
+                          label="产品型号"
+                          align="center"
+                        >
+                        </el-table-column>
+                        <el-table-column
+                          prop="price"
+                          label="产品价格"
+                          align="center"
+                        >
+                        </el-table-column>
+                      </el-table>
+                      <el-row class="mg">
+                        <div>
+                          <el-pagination
+                            @size-change="handleSizeChange"
+                            @current-change="handleCurrentChange"
+                            :current-page="currentPage"
+                            :page-sizes="[10, 20, 30, 50]"
+                            :page-size="10"
+                            layout="total, sizes, prev, pager, next, jumper"
+                            :total="listTotal"
+                          >
+                          </el-pagination>
+                        </div>
+                      </el-row>
+                    </el-row>
+                  </el-row>
+                </el-col>
+                <el-col :xs="4" :ms="4" :lg="4" class="middle">
+                  <el-row :gutter="20" justify="center" align="middle">
+                    <el-row class="btn">
+                      <el-button
+                        type="primary"
+                        size="small "
+                        @click="handleAllAdd"
+                        :disabled="type == 2"
+                        >全部添加</el-button
+                      >
+                    </el-row>
+                    <el-row class="btn">
+                      <el-button
+                        type="primary"
+                        size="small "
+                        @click="handleAdd"
+                        :disabled="type == 2"
+                        >增加</el-button
+                      >
+                    </el-row>
+                    <el-row class="btn">
+                      <el-button
+                        type="primary"
+                        size="small "
+                        @click="handleDelete"
+                        :disabled="type == 1"
+                        >删除</el-button
+                      ></el-row
+                    >
+                    <el-row class="btn"
+                      ><el-button
+                        :disabled="type == 1"
+                        type="primary"
+                        size="small  "
+                        @click="handleAllDelete"
+                        >全部删除</el-button
+                      ></el-row
+                    >
+                  </el-row>
+                </el-col>
+                <el-col :xs="10" :ms="10" :lg="10">
+                  <el-row>
+                    <el-row> </el-row>
+                    <el-row>
+                      <el-row class="title"> 已选产品列表 </el-row>
+                      <el-table
+                        style="width: 100%"
+                        :data="conditList2"
+                        @select-all="handleSelectionAllChange2"
+                        @selection-change="handleSelectionChange2"
+                        border
+                        height="400"
+                      >
+                        <el-table-column
+                          type="selection"
+                          width="55"
+                          align="center"
+                        >
+                        </el-table-column>
+                        <el-table-column
+                          label="产品编码"
+                          prop="materialNumber"
+                          width="120"
+                          align="center"
+                        >
+                        </el-table-column>
+                        <el-table-column
+                          prop="materialName"
+                          label="产品名称"
+                          align="center"
+                        >
+                        </el-table-column>
+                        <el-table-column
+                          prop="specification"
+                          label="产品型号"
+                          align="center"
+                        >
+                        </el-table-column>
+                        <el-table-column
+                          prop="price"
+                          label="产品价格"
+                          align="center"
+                        >
+                        </el-table-column>
+                      </el-table>
+                      <el-row class="mg">
+                        <!-- <Pagination /> -->
+                      </el-row>
+                    </el-row>
+                  </el-row>
+                </el-col>
+              </el-row>
+            </el-row>
+          </el-main>
+        </el-container>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="VisibleModle = false">取 消</el-button>
+        <el-button type="primary" @click="handleDiaSubmit">确 定</el-button>
+      </span>
+    </el-dialog>
+  </el-container>
+</template>
+
+<script>
+import {
+  getId,
+  addPoliyCondition,
+  getConditionMaterialList,
+  getMaterialList,
+  getConditionMaterialDetail,
+} from "@/api/policy_list";
+import TabelTransfer from "./TabelTransfer.vue";
+
+import { mapState } from "vuex";
+import AddModel from "./AddModel";
+import Minxin from "@/mixin";
+
+export default {
+  mixins: [Minxin],
+  props: {
+    id: {
+      type: String,
+      default: "",
+    },
+    policyId: {
+      type: String,
+      default: "",
+    },
+  },
+  data() {
+    return {
+      base: {
+        id: null,
+        policyConditionMaterials: [
+          {
+            id: null,
+            materialId: "",
+            materialName: "",
+            materialNumber: "",
+            policyConditionId: "",
+            policyId: "",
+            policyMaterialId: "",
+            popType: 0,
+            specification: "",
+            walletType: "",
+          },
+        ],
+        policyId: "",
+        policyName: "",
+        pop: "",
+      },
+      limit: "",
+      VisibleModle: false,
+      conditionBox: [[], []],
+      conditionBoxs: [],
+      multipleSelection: [],
+      searchForm: {
+        code: "",
+      },
+      pop: "",
+      conditList: [],
+      leftData: [],
+      rightData: [],
+      conditList2: [],
+      type: "",
+      saleTypeCode: "",
+      arrIndex: 0,
+      popArr: {},
+      fang: false,
+      newConditionBox: [],
+      currentPage: 1,
+    };
+  },
+  created() {
+    this.getCommonApi();
+  },
+  computed: mapState({
+    comCode: (state) => state.sales.code,
+  }),
+  methods: {
+    getList() {},
+    handleBack() {
+      console.log(this.id, this.policyId);
+      this.$parent.isEdit = 1;
+    },
+    /**
+     * 根据条件禁用行复选框
+     * 函数返回值为false则禁用选择(反之亦然)
+     * @param {Object} row - 行数据
+     * @param {String} index - 索引值
+     * @return Boolean
+     */
+    selectable: function (row, index) {
+      // row.disabled == undefined 才能被选中
+      if (row.disabled == undefined) {
+        return true;
+      }
+      // 函数必须有返回值且是布尔值
+      // 页面刷新后该函数会执行 N 次进行判断(N 为表格行数)
+      // 如果没有返回值则默认返回false(全部无法选中)
+    },
+    async getCommonApi() {
+      if (this.id) {
+        const res = await getConditionMaterialDetail({ id: this.id });
+        this.pop = res.data.pop;
+        let pop = res.data.pop.split(":");
+        for (let i = 0; i < pop.length; i++) {
+          if (i == 0) {
+            this.limit = pop[i];
+            continue;
+          }
+          this.$set(this.popArr, `line_${i - 1}`, pop[i]);
+        }
+        this.conditionBox = [];
+        for (let k = 0; k < pop.length; k++) {
+          const { data } = await getConditionMaterialList({
+            pageNum: 1,
+            pageSize: -1,
+            policyConditionId: res.data.id,
+            popType: k + 1,
+          });
+
+          this.conditionBox.push(data.records);
+        }
+      }
+    },
+    toggleSelection(rows) {
+      if (rows) {
+        rows.forEach((row) => {
+          this.$refs.multipleTable.toggleRowSelection(row);
+        });
+      } else {
+        this.$refs.multipleTable.clearSelection();
+      }
+    },
+    hanleAddModel() {
+      this.conditionBox.push([]);
+    },
+    handleSubmit() {
+      var tableData = [];
+
+      this.newConditionBox.push(JSON.parse(JSON.stringify(this.conditionBox)));
+      for (let i = 0; i < this.conditionBox.length; i++) {
+        for (let j = 0; j < this.conditionBox[i].length; j++) {
+          this.conditionBox[i][j].popType = i + 1;
+          this.conditionBox[i][j].policyId = this.policyId;
+
+          //  this.conditionBox[i][j].policyMaterialId =this.conditionBox[i][j].materialId
+        }
+        tableData = [...tableData, ...this.conditionBox[i]];
+      }
+
+      if (!tableData.length) {
+        this.$errorMsg("请选择机型");
+        return;
+      }
+      var pop = [this.limit];
+      for (const key in this.popArr) {
+        pop.push(this.popArr[key]);
+      }
+      console.log(pop.join(":"));
+      const params = {
+        id: this.id,
+        policyConditionMaterials: tableData,
+        policyId: this.policyId,
+        policyName: "",
+        pop: pop.join(":"),
+      };
+      addPoliyCondition(params).then((res) => {
+        this.$successMsg("添加成功");
+        this.conditionBox = [[], []];
+        this.conditionBoxs = [];
+        this.limit = "";
+        this.pop = "";
+        this.popArr = {};
+        this.$parent.isCondition = 0;
+        this.$parent.isEdit = 1;
+        // Object.assign(this.$data, this.$options.data());
+        // this.$emit("handleSubmitCon", this.policyId);
+      });
+    },
+    handleSelectionChange(val) {
+      this.multipleSelection = val;
+    },
+
+    // 筛选全部数据
+    hanleSelectAll(selection, index) {
+      this.arrIndex = index;
+      this.ids = selection.map((k) => {
+        return k.id;
+      });
+      console.log(this.ids);
+    },
+    handleDeleteRow(index) {
+      if (this.arrIndex == index && this.ids.length) {
+        var arr = [];
+        for (var i = 0; i < this.conditionBox[index].length; i++) {
+          if (this.ids.indexOf(this.conditionBox[index][i].id) == -1) {
+            arr.push(this.conditionBox[index][i]);
+          }
+        }
+        this.conditionBox[index] = [];
+        this.$set(this.conditionBox, index, arr);
+      }
+    },
+    // 更改每页数量
+    handleSizeChange(val) {
+      this.pageSize = val;
+      this.currentPage = 1;
+      this.getMaterialLists(this.arrIndex);
+    },
+    // 更改当前页
+    handleCurrentChange(val) {
+      this.currentPage = val;
+      this.getMaterialLists(this.arrIndex);
+    },
+    // 更改列表当前页
+    handleTableCurrentChange(val) {
+      this.currentPage = val;
+      this.getMaterialLists(this.arrIndex);
+    },
+    getMaterialLists(index) {
+      this.arrIndex = index;
+      getMaterialList({
+        pageNum: this.currentPage,
+        pageSize: this.pageSize,
+        saleTypeCode: this.saleTypeCode,
+        policyId: this.policyId,
+      }).then((res) => {
+        let datas = [];
+        for (let j = 0; j < this.conditionBox.length; j++) {
+          datas = [...datas, ...this.conditionBox[j]];
+        }
+        /**
+         * @value newConditionBox 首页保存的所有选中者,即条件1
+         * @value res.data.records,this.conditList 每次点击添加获取的最新数据
+         * @value disabled 添加条件都进行比较上一个条件或者所有条件当中的限定机型和配提机型,
+         * 如:上一个或者所有条件中已经存在disabled
+         */
+        if (this.newConditionBox.length) {
+          this.conditList = res.data.records;
+          for (let j = 0; j < this.newConditionBox.length; j++) {
+            for (let o = 0; o < this.newConditionBox[j].length; o++) {
+              if (o == index) {
+                console.log(this.newConditionBox[j][o], "dier");
+                for (let i = 0; i < res.data.records.length; i++) {
+                  for (let k = 0; k < this.newConditionBox[j][o].length; k++) {
+                    if (
+                      this.newConditionBox[j][o][k].id == res.data.records[i].id
+                    ) {
+                      res.data.records[i].disabled = true;
+                    }
+                  }
+                }
+              } else {
+                this.conditList = res.data.records;
+              }
+            }
+          }
+          this.conditList = res.data.records;
+        } else {
+          const newData = datas;
+          if (newData.length) {
+            for (let j = 0; j < res.data.records.length; j++) {
+              for (let i = 0; i < this.conditionBox[index].length; i++) {
+                if (
+                  this.conditionBox[index][i].policyMaterialId ==
+                  res.data.records[j].id
+                ) {
+                  res.data.records[j].disabled = true;
+                }
+              }
+            }
+          }
+          this.conditList = res.data.records;
+          this.listTotal = res.data.total;
+        }
+      });
+    },
+    handleSelectionAllChange(e) {
+      this.leftData = e;
+      this.type = 1;
+    },
+    handleSelectionChange(e) {
+      this.leftData = e;
+      this.type = 1;
+    },
+    handleSelectionAllChange2(e) {
+      this.rightData = e;
+      this.type = 2;
+    },
+    handleSelectionChange2(e) {
+      this.rightData = e;
+      this.type = 2;
+    },
+    handleAllAdd() {
+      this.conditList2 = this.leftData;
+      this.leftData = [];
+    },
+    handleAllDelete() {
+      this.conditList2 = [];
+    },
+    handleAdd() {
+      this.conditList2 = this.leftData;
+    },
+    //去掉相同数据
+    resArr(arr1, arr2) {
+      return arr1.filter((v) => arr2.every((val) => val.id != v.id));
+    },
+    handleDelete() {
+      if (this.type == 2) {
+        this.conditList2 = this.resArr(this.conditList2, this.rightData);
+        this.rightData = [];
+      }
+    },
+    handleDiaSubmit() {
+      if (this.conditList2.length) {
+        for (let i = 0; i < this.conditionBox.length; i++) {
+          if (i == this.arrIndex) {
+            this.$set(this.conditionBox, i, [
+              ...this.conditList2,
+              ...this.conditionBox[i],
+            ]);
+          }
+        }
+        this.VisibleModle = false;
+        this.conditList2 = [];
+      } else {
+        this.$errorMsg("请选择内容");
+      }
+    },
+    handleresale() {
+      Object.assign(this.$data, this.$options.data());
+    },
+  },
+  components: {
+    AddModel,
+    TabelTransfer,
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.line {
+  margin: 0 20px;
+}
+.mgb {
+  margin-bottom: 20px;
+}
+.pdt {
+  padding-bottom: 20px;
+}
+.text_rihgt {
+  text-align: right;
+}
+.header {
+  margin-bottom: 40px;
+}
+.el-main {
+  overflow: hidden;
+}
+.btn {
+  margin: 20px 0;
+  text-align: center;
+}
+.query_btn {
+  margin-left: 0;
+}
+.mg {
+  margin: 20px;
+}
+.pdt {
+  margin: 20px 0;
+}
+.el-main {
+  overflow: hidden;
+}
+.middle {
+  height: 430px;
+  display: flex;
+  align-content: center;
+  justify-content: center;
+  align-items: center;
+}
+.title {
+  padding: 10px 0;
+  text-align: center;
+  border-left: 1px solid #ebeef5;
+  border-right: 1px solid #ebeef5;
+  border-top: 1px solid #ebeef5;
+}
+</style>

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 846 - 260
src/views/sales_policy/components/Examine.vue


+ 17 - 13
src/views/sales_policy/policy_list.vue

@@ -133,7 +133,7 @@
               </el-form-item>
             </el-col>
             <el-col :xs="24" :ms="6" :lg="6"> </el-col>
-            <el-col :xs="24" :ms="6" :lg="6" class="tr">
+            <el-col :xs="24" :ms="6" :lg="12" class="tr">
               <el-form-item>
                 <el-button type="primary" size="small" @click="submitScreenForm"
                   >查询</el-button
@@ -161,15 +161,16 @@
     </div>
     <div class="mymain-container">
       <el-table :data="dataList" border style="width: 100%">
-        <el-table-column fixed="left" label="操作" width="250" align="center">
+        <el-table-column fixed="left" label="操作" min-width="150" align="center">
           <template slot-scope="scope">
-            <!-- <el-button
+            <el-button
               type="text"
               size="small"
+              v-if=" scope.row.examineStatus == 'SAVE'"
               @click="(isShow = 5), (id = scope.row.id)"
               >编辑</el-button
 
-            > -->
+            >
             <el-button
               type="text"
               size="small"
@@ -217,13 +218,13 @@
             </el-popconfirm>
           </template>
         </el-table-column>
-        <!-- <el-table-column label="状态" width="120" align="center">
+        <el-table-column label="状态" width="120" align="center">
           <template slot-scope="scope">
             <el-tag v-if="scope.row.status == '1'">已生效</el-tag>
             <el-tag v-else-if="scope.row.status == '0'">未生效 </el-tag>
           </template>
-        </el-table-column> -->
-        <el-table-column label="状态" width="120" align="center">
+        </el-table-column>
+        <el-table-column label="审核状态" width="120" align="center">
           <template slot-scope="scope">
             <el-tag v-if="scope.row.examineStatus == 'SAVE'">保存</el-tag>
             <el-tag v-else-if="scope.row.examineStatus == 'WAIT'"
@@ -247,11 +248,11 @@
           align="center"
         >
         </el-table-column>
-        <el-table-column
+        <!-- <el-table-column
           prop="mainName"
           label="产品品类"
           align="center"
-        ></el-table-column>
+        ></el-table-column> -->
         <el-table-column
           prop="remark"
           label="表头备注"
@@ -301,14 +302,13 @@
     </div>
   </div>
   <AddPolicy v-else-if="isShow == 2" />
-
   <AddCondition v-else-if="isShow == 10" :id="id" :policyId="policyId" />
-
   <Examine v-else />
 </template>
 
 <script>
 import {
+  getId,
   getList,
   getTypeList,
   deletePolicy,
@@ -394,8 +394,12 @@ export default {
   created() {},
   methods: {
     hanlenewInfo() {
-      this.isShow = 2;
-      this.$store.dispatch("sales/hanlenewInfo");
+      console.log();
+       getId().then(res=>{
+         this.$store.commit("sales/setId",res.data);
+          this.isShow = 2;
+      })
+
     },
     getList() {
       this.listLoading = true;

+ 15 - 19
src/views/sales_rebate/rebate_list.vue

@@ -190,9 +190,9 @@
               :readonly="true"
             ></el-input>
           </el-form-item>
-          <el-form-item label="产品使用品类" prop="mainName">
+          <!-- <el-form-item label="产品使用品类" prop="mainName">
             <el-input v-model="dialogForm.mainName" :readonly="true"></el-input>
-          </el-form-item>
+          </el-form-item> -->
 
           <el-form-item label="返利折扣比例" prop="rebateRate">
 
@@ -272,11 +272,7 @@ export default {
           lable: "销售类型名称",
           widht: 160,
         },
-        {
-          prop: "mainName",
-          lable: "产品大类",
-          widht: 160,
-        },
+
         {
           prop: "name",
           lable: "返利类型",
@@ -372,8 +368,8 @@ export default {
       this.typeList.find((k) => {
         if (e == k.saleCode) {
           this.dialogForm.saleTypeName = k.saleName;
-          this.dialogForm.mainId = k.mainId;
-          this.dialogForm.mainName = k.mainName;
+          // this.dialogForm.mainId = k.mainId;
+          // this.dialogForm.mainName = k.mainName;
         }
       });
     },
@@ -400,8 +396,8 @@ export default {
       console.log(item);
       this.dialogForm = {
         adminCompanyId: item.adminCompanyId,
-        mainId: item.mainId,
-        mainName: item.mainName,
+        mainId: '',
+        mainName:'',
         name: item.name,
         rebateRate: item.rebateRate,
         rabateSort: item.rabateSort,
@@ -449,7 +445,7 @@ export default {
       this.$refs.dialogForm.validate((valid) => {
         if (valid) {
           if (this.type) {
-            this.hanleScreen(this.dialogForm.mainId);
+            // this.hanleScreen(this.dialogForm.mainId);
             const params = {
               ...this.dialogForm,
             };
@@ -492,13 +488,13 @@ export default {
       this.dialogVisible = false;
     },
     hanleScreen(code) {
-      this.dictListData.find((k) => {
-        if (k.dictCode == code) {
-          this.dialogForm.mainId = k.dictCode;
-          this.dialogForm.mainName = k.dictValue;
-          return;
-        }
-      });
+      // this.dictListData.find((k) => {
+      //   if (k.dictCode == code) {
+      //     this.dialogForm.mainId = k.dictCode;
+      //     this.dialogForm.mainName = k.dictValue;
+      //     return;
+      //   }
+      // });
     },
   },
   components: {

+ 5 - 11
src/views/sales_rebate/salestype_list.vue

@@ -166,7 +166,7 @@
           <el-form-item label="销售类型名称" prop="saleName">
             <el-input v-model="dialogForm.saleName"></el-input>
           </el-form-item>
-          <el-form-item label="产品大类" prop="mainId">
+          <!-- <el-form-item label="产品大类" prop="mainId">
             <el-select v-model="dialogForm.mainId" @change="handleChange">
               <el-option
                 v-for="(item, index) in productList"
@@ -177,8 +177,8 @@
               </el-option>
             </el-select>
 
-            <!-- <el-input v-model="dialogForm.mainName"></el-input> -->
-          </el-form-item>
+            <el-input v-model="dialogForm.mainName"></el-input> -->
+          <!-- </el-form-item>  -->
           <el-form-item label="状态" prop="status">
             <el-switch
               v-model="dialogForm.status"
@@ -251,11 +251,7 @@ export default {
           widht: 160,
         },
 
-        {
-          prop: "mainName",
-          lable: "产品大类",
-          widht: 160,
-        },
+
         {
           prop: "status",
           lable: "状态",
@@ -303,9 +299,7 @@ export default {
         saleName: [
           { required: true, message: "请输入销售类型名称", trigger: "blur" },
         ],
-        mainName: [
-          { required: true, message: "请输入品类名称", trigger: "blur" },
-        ],
+
       },
       productList: [],
     };

+ 1 - 0
src/views/supply/apply/apply_list.vue

@@ -87,6 +87,7 @@
             <el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="计量单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="数量" prop="refundableQty" min-width="100" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="已退数量" prop="retiredQty" min-width="100" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="备注信息" prop="remark" min-width="160" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="制单人" prop="createBy" min-width="100" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="制单日期" prop="createTime" min-width="160" show-overflow-tooltip></el-table-column>

+ 2 - 1
src/views/supply/apply/components/apply_detail.vue

@@ -84,13 +84,14 @@
       <el-table :data="detailData.orders" element-loading-text="Loading" border fit highlight-current-row stripe max-height="400">
         <el-table-column align="center" label="序号" type="index" width="50"></el-table-column>
         <el-table-column align="center" label="销售类型" prop="saleTypeName" min-width="100" show-overflow-tooltip></el-table-column>
-        <el-table-column align="center" label="销售订单号" prop="orderId" min-width="180" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="销售订单号" prop="mainOrderId" min-width="200" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="产品编码" prop="materialCode" min-width="120" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="计量单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="申请数量" prop="invoiceNum" min-width="100" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="审批数量" prop="approvalNumber" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="已退数量" prop="retiredQty" min-width="100" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="备注" prop="remark" min-width="160" show-overflow-tooltip></el-table-column>
       </el-table>
     </div>

+ 2 - 1
src/views/supply/apply/components/apply_examine.vue

@@ -76,7 +76,7 @@
       <el-table :data="goodsList" element-loading-text="Loading" border fit highlight-current-row stripe max-height="400">
         <el-table-column align="center" label="序号" type="index" width="50"></el-table-column>
         <el-table-column align="center" label="销售类型" prop="saleTypeName" min-width="100" show-overflow-tooltip></el-table-column>
-        <el-table-column align="center" label="销售订单号" prop="orderId" min-width="180" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="销售订单号" prop="mainOrderId" min-width="200" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="产品编码" prop="materialCode" min-width="120" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
@@ -87,6 +87,7 @@
             <el-input v-model="scope.row.approvalNumber" size="small" type="number"></el-input>
           </template>
         </el-table-column>
+        <el-table-column align="center" label="已退数量" prop="retiredQty" min-width="100" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="备注" prop="remark" min-width="160" show-overflow-tooltip>
           <template slot-scope="scope">
             <el-input v-model="scope.row.remark" size="small"></el-input>

+ 22 - 1
src/views/supply/deliver/commerce_list.vue

@@ -19,6 +19,16 @@
                 <el-input v-model="screenForm.orderNum" placeholder="请输入发货单号"></el-input>
               </el-form-item>
             </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="订单号" prop="orderNo">
+                <el-input v-model="screenForm.orderNo" placeholder="请输入订单号"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="合同号" prop="contractNo">
+                <el-input v-model="screenForm.contractNo" placeholder="请输入合同号"></el-input>
+              </el-form-item>
+            </el-col>
             <!-- <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="仓库" prop="warehouse">
                 <el-input v-model="screenForm.warehouse" placeholder="请输入仓库"></el-input>
@@ -58,7 +68,7 @@
               </el-form-item>
             </el-col>
             
-            <el-col :xs="24" :sm="24" :lg="12" class="tr">
+            <el-col :xs="24" :sm="24" :lg="24" class="tr">
               <el-form-item label="">
                 <el-button size="small" @click="resetScreenForm">清空</el-button>
                 <el-button size="small" type="primary" @click="submitScreenForm">搜索</el-button>
@@ -91,6 +101,11 @@
             <el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="数量" prop="refundableQty" min-width="100" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="未出库数量" min-width="100" show-overflow-tooltip>
+              <template slot-scope="scope">
+                {{scope.row.salesStatus ? 0 : scope.row.refundableQty}}
+              </template>
+            </el-table-column>
             <el-table-column align="center" label="备注信息" prop="remark" min-width="160" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="制单人" prop="createBy" min-width="100" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="制单日期" prop="createTime" min-width="160" show-overflow-tooltip></el-table-column>
@@ -188,6 +203,8 @@ export default {
       listLoading: false, // 列表加载loading
       screenForm: { // 筛选表单数据
         orderNum: '',
+        orderNo: '',
+        contractNo: '',
         warehouse: '',
         jxsName: '',
         chName: '',
@@ -219,6 +236,8 @@ export default {
     exParams() {
       return {
         id: this.screenForm.orderNum,
+        enginOrderNo: this.screenForm.orderNo,
+        refEnginRecordNo: this.screenForm.contractNo,
         customerNumber: this.screenForm.jxsNum,
         customerName: this.screenForm.jxsName,
         materialName: this.screenForm.chName,
@@ -259,6 +278,8 @@ export default {
         pageNum: this.currentPage,
         pageSize: this.pageSize,
         id: this.screenForm.orderNum,
+        enginOrderNo: this.screenForm.orderNo,
+        refEnginRecordNo: this.screenForm.contractNo,
         customerNumber: this.screenForm.jxsNum,
         customerName: this.screenForm.jxsName,
         materialName: this.screenForm.chName,

+ 5 - 0
src/views/supply/deliver/components/commerce_detail.vue

@@ -119,6 +119,11 @@
           <el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="单位" prop="unit" min-width="160" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="数量" prop="refundableQty" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="未出库数量" min-width="100" show-overflow-tooltip>
+            <template slot-scope="scope">
+              {{scope.row.salesStatus ? 0 : scope.row.refundableQty}}
+            </template>
+          </el-table-column>
           <el-table-column align="center" label="含税单价" prop="price" min-width="160" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="无税单价" prop="afterTaxPrice" min-width="100" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="价税合计" prop="payAmount" min-width="100" show-overflow-tooltip></el-table-column>

+ 5 - 0
src/views/supply/deliver/components/deliver_detail.vue

@@ -120,6 +120,11 @@
           <el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="数量" prop="refundableQty" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="未出库数量" min-width="100" show-overflow-tooltip>
+            <template slot-scope="scope">
+              {{scope.row.salesStatus ? 0 : scope.row.refundableQty}}
+            </template>
+          </el-table-column>
           <el-table-column align="center" label="含税单价" prop="price" min-width="100" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="无税单价" prop="afterTaxPrice" min-width="100" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="价税合计" prop="payAmount" min-width="100" show-overflow-tooltip></el-table-column>

+ 5 - 0
src/views/supply/deliver/components/home_detail.vue

@@ -120,6 +120,11 @@
           <el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="数量" prop="refundableQty" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="未出库数量" min-width="100" show-overflow-tooltip>
+            <template slot-scope="scope">
+              {{scope.row.salesStatus ? 0 : scope.row.refundableQty}}
+            </template>
+          </el-table-column>
           <el-table-column align="center" label="含税单价" prop="price" min-width="100" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="无税单价" prop="afterTaxPrice" min-width="100" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="价税合计" prop="payAmount" min-width="100" show-overflow-tooltip></el-table-column>

+ 14 - 1
src/views/supply/deliver/deliver_list.vue

@@ -11,6 +11,11 @@
               </el-form-item>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="订单号" prop="orderNo">
+                <el-input v-model="screenForm.orderNo" placeholder="请输入订单号"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="经销商编号" prop="jxsNum">
                 <el-input v-model="screenForm.jxsNum" placeholder="请输入经销商编号"></el-input>
               </el-form-item>
@@ -44,7 +49,7 @@
               </el-form-item>
             </el-col>
             
-            <el-col :xs="24" :sm="24" :lg="12" class="tr">
+            <el-col :xs="24" :sm="12" :lg="6" class="tr">
               <el-form-item label="">
                 <el-button size="small" @click="resetScreenForm">清空</el-button>
                 <el-button size="small" type="primary" @click="submitScreenForm">搜索</el-button>
@@ -72,6 +77,11 @@
             <el-table-column align="center" label="无税金额" prop="noTotalAmount" min-width="100" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="无税单价" prop="afterTaxPrice" min-width="100" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="数量" prop="refundableQty" min-width="100" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="未出库数量" min-width="100" show-overflow-tooltip>
+              <template slot-scope="scope">
+                {{scope.row.salesStatus ? 0 : scope.row.refundableQty}}
+              </template>
+            </el-table-column>
             <el-table-column align="center" label="备注" prop="remark" min-width="200" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="操作" width="200" fixed="right">
               <template slot-scope="scope">
@@ -153,6 +163,7 @@ export default {
       listLoading: false, // 列表加载loading
       screenForm: { // 筛选表单数据
         orderNum: '',
+        orderNo: '',
         jxsNum: '',
         jxsName: '',
         chName: '',
@@ -175,6 +186,7 @@ export default {
     exParams() {
       return {
         id: this.screenForm.orderNum,
+        mainOrderId: this.screenForm.orderNo,
         customerNumber: this.screenForm.jxsNum,
         customerName: this.screenForm.jxsName,
         productName: this.screenForm.chName,
@@ -210,6 +222,7 @@ export default {
         pageNum: this.currentPage,
         pageSize: this.pageSize,
         id: this.screenForm.orderNum,
+        mainOrderId: this.screenForm.orderNo,
         customerNumber: this.screenForm.jxsNum,
         customerName: this.screenForm.jxsName,
         productName: this.screenForm.chName,

+ 22 - 1
src/views/supply/deliver/home_list.vue

@@ -20,6 +20,16 @@
               </el-form-item>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="订单号" prop="orderNo">
+                <el-input v-model="screenForm.orderNo" placeholder="请输入订单号"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="合同号" prop="contractNo">
+                <el-input v-model="screenForm.contractNo" placeholder="请输入合同号"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="经销商编号" prop="jxsNum">
                 <el-input v-model="screenForm.jxsNum" placeholder="请输入经销商编号"></el-input>
               </el-form-item>
@@ -53,7 +63,7 @@
               </el-form-item>
             </el-col>
             
-            <el-col :xs="24" :sm="24" :lg="12" class="tr">
+            <el-col :xs="24" :sm="24" :lg="24" class="tr">
               <el-form-item label="">
                 <el-button size="small" @click="resetScreenForm">清空</el-button>
                 <el-button size="small" type="primary" @click="submitScreenForm">搜索</el-button>
@@ -86,6 +96,11 @@
             <el-table-column align="center" label="无税金额" prop="noTotalAmount" min-width="100" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="无税单价" prop="afterTaxPrice" min-width="100" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="数量" prop="refundableQty" min-width="100" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="未出库数量" min-width="100" show-overflow-tooltip>
+              <template slot-scope="scope">
+                {{scope.row.salesStatus ? 0 : scope.row.refundableQty}}
+              </template>
+            </el-table-column>
             <el-table-column align="center" label="备注信息" prop="remark" min-width="160" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="状态" prop="examineStatus" min-width="100" show-overflow-tooltip>
               <template slot-scope="scope">
@@ -179,6 +194,8 @@ export default {
       listLoading: false, // 列表加载loading
       screenForm: { // 筛选表单数据
         orderNum: '',
+        orderNo: '',
+        contractNo: '',
         jxsName: '',
         chName: '',
         model: '',
@@ -209,6 +226,8 @@ export default {
     exParams() {
       return {
         id: this.screenForm.orderNum,
+        enginOrderNo: this.screenForm.orderNo,
+        refEnginRecordNo: this.screenForm.contractNo,
         customerNumber: this.screenForm.jxsNum,
         customerName: this.screenForm.jxsName,
         materialName: this.screenForm.chName,
@@ -249,6 +268,8 @@ export default {
         pageNum: this.currentPage,
         pageSize: this.pageSize,
         id: this.screenForm.orderNum,
+        enginOrderNo: this.screenForm.orderNo,
+        refEnginRecordNo: this.screenForm.contractNo,
         customerNumber: this.screenForm.jxsNum,
         customerName: this.screenForm.jxsName,
         materialName: this.screenForm.chName,

+ 2 - 2
src/views/supply/engin/commerce_list.vue

@@ -175,7 +175,7 @@
 </template>
 
 <script>
-import { getOrderList, applyCom, withdrawCom, deleteCom, editCom } from "@/api/supply/engin";
+import { getOrderList, applyCom, withdrawCom, deleteCom, editDateCom } from "@/api/supply/engin";
 import CommerceDetail from "@/views/supply/engin/components/commerce_detail";
 import CommerceForm from "@/views/supply/engin/components/commerce_form";
 import CommerceExamine from "@/views/supply/engin/components/commerce_examine";
@@ -420,7 +420,7 @@ export default {
 
     // 提交 修改订单日期
     submitDateForm() {
-      editCom({
+      editDateCom({
         enginOrderId: this.editId,
         orderDate: this.dateForm.date + ' 00:00:00',
       }).then(res => {

+ 52 - 54
src/views/supply/engin/components/commerce_form.vue

@@ -25,13 +25,15 @@
             </el-date-picker>
           </el-form-item>
         </el-col>
-        <el-col :xs="24" :sm="12" :lg="8">
+        <!-- <el-col :xs="24" :sm="12" :lg="8">
           <el-form-item label="产品大类" prop="type">
             <el-select v-model="mainForm.type" placeholder="选择产品大类" style="width: 100%" disabled>
               <el-option v-for="item in typeList" :key="item.dictCode" :label="item.dictValue" :value="item.dictCode"></el-option>
             </el-select>
           </el-form-item>
-        </el-col>
+        </el-col> -->
+      </el-row>
+      <el-row :gutter="20">
         <el-col :xs="24" :sm="12" :lg="8">
           <el-form-item label="经销商编码" prop="jxsNum">
             <el-input v-model="mainForm.jxsNum" placeholder="请输入经销商编码" disabled></el-input>
@@ -166,11 +168,11 @@
         </el-table-column>
         <el-table-column align="center" label="返利钱包" prop="customerWalletId2" min-width="160" show-overflow-tooltip>
           <template slot-scope="scope">
-            <el-select v-model="scope.row.customerWalletId2" placeholder="选择返利钱包" size="small" clearable @change="changeFlWallet(scope.$index)">
+            <el-select v-model="scope.row.customerWalletId2" placeholder="选择返利类型" size="small" clearable @change="changeFlWallet(scope.$index)">
               <el-option
-                v-for="item in flWalletList"
+                v-for="item in scope.row.rebateWallets"
                 :key="item.customerWalletId"
-                :label="item.name"
+                :label="item.customerWalletName"
                 :value="item.customerWalletId">
               </el-option>
             </el-select>
@@ -190,9 +192,9 @@
           <template slot-scope="scope">
             <el-select v-model="scope.row.customerWalletId" placeholder="选择现金钱包" size="small" clearable @change="changeXjWallet(scope.$index)">
               <el-option
-                v-for="item in xjWalletList"
+                v-for="item in scope.row.wallets"
                 :key="item.customerWalletId"
-                :label="item.name"
+                :label="item.customerWalletName"
                 :value="item.customerWalletId">
               </el-option>
             </el-select>
@@ -236,7 +238,7 @@
     </div>
 
     <div class="page-footer">
-      <div class="footer" :class="classObj">
+      <div class="footer">
         <el-button type="primary" @click="clickSubmitForm(1)">保 存</el-button>
         <el-button type="primary" @click="clickSubmitForm(2)">提交审核</el-button>
         <el-popconfirm title="确定关闭吗?" @onConfirm="goBack" style="margin-left: 10px;">
@@ -283,7 +285,7 @@
           max-height="270">
           <el-table-column align="center" label="" width="100">
             <template slot-scope="scope">
-              <el-button type="primary" size="small" @click="chooseItem(scope.row.enginInfoId)">选择</el-button>
+              <el-button type="primary" size="small" @click="chooseItem(scope.row.enginInfoNo)">选择</el-button>
             </template>
           </el-table-column>
           <el-table-column align="center" prop="checkTime" label="工程登录日期" show-overflow-tooltip></el-table-column>
@@ -342,7 +344,7 @@ export default {
       mainForm: {
         orderNum: '',
         orderDate: '',
-        type: '',
+        // type: '',
         jxsNum: '',
         jxsName: '',
         enginNum: '',
@@ -374,7 +376,7 @@ export default {
         // phone: [{ required: true, message: '请输入移动电话', trigger: 'blur' }],
         address: [{ required: true, message: '请输入安装地址', trigger: 'blur' }],
       },
-      typeList: [],
+      // typeList: [],
       stockList: [],
       goodsList: [],
 
@@ -392,31 +394,15 @@ export default {
 
       warehouseList: [],
       warehouseValue: '',
-
-      xjWalletList: [],
-      flWalletList: [],
     }
   },
 
-  computed: {
-    sidebar() {
-      return this.$store.state.app.sidebar
-    },
-    classObj() {
-      return {
-        hideSidebar: !this.sidebar.opened,
-        openSidebar: this.sidebar.opened
-      }
-    },
-  },
-
   beforeCreate() {
     that = this;
   },
 
   created() {
     this.getDictList();
-    this.getWalletList();
     this.getWarehouseList();
 
     if(this.listItem) {
@@ -452,27 +438,11 @@ export default {
       return currentdate;
     },
 
-    // 获取钱包列表
-    getWalletList() {
-      getWalletList({
-        customerId: JSON.parse(localStorage.getItem("supply_user")).customerId,
-        type: 'COMMONLY'
-      }).then(res => {
-        this.xjWalletList = res.data;
-      })
-      getWalletList({
-        customerId: JSON.parse(localStorage.getItem("supply_user")).customerId,
-        type: 'REBATE'
-      }).then(res => {
-        this.flWalletList = res.data;
-      })
-    },
-
     // 获取产品大类列表
     getDictList() {
-      getDictList({sysDictEnum: 'PRODUCT_TYPE'}).then(res => {
-        this.typeList = res.data;
-      })
+      // getDictList({sysDictEnum: 'PRODUCT_TYPE'}).then(res => {
+      //   this.typeList = res.data;
+      // })
       getDictList({sysDictEnum: 'STOCK_ORDER'}).then(res => {
         this.stockList = res.data;
       })
@@ -494,7 +464,7 @@ export default {
         let data = res.data;
         this.mainForm.orderNum = data.enginOrderId;
         this.mainForm.orderDate = data.orderDate;
-        this.mainForm.type = data.mainId;
+        // this.mainForm.type = data.mainId;
         this.mainForm.jxsNum = data.customerId;
         this.mainForm.jxsName = data.customerName;
         this.mainForm.enginNum = data.refEnginRecordNo;
@@ -517,6 +487,12 @@ export default {
         data.items.forEach(item => {
           item.status1 = '';
           item.status2 = '';
+          item.rebateWallets = item.customerWalletList.filter(item => {
+            return item.type === 'REBATE';
+          });
+          item.wallets = item.customerWalletList.filter(item => {
+            return item.type === 'COMMONLY';
+          });
         })
         this.goodsList = data.items;
       })
@@ -566,10 +542,12 @@ export default {
 
     // 选择工程登录
     chooseItem(id) {
-      getComLoginDetail({id}).then(res => {
+      getComLoginDetail({
+        recordNo: id
+      }).then(res => {
         this.isShowDialog = false;
         let data = res.data;
-        this.mainForm.type = data.mainId;
+        // this.mainForm.type = data.mainId;
         this.mainForm.enginNum = data.enginInfoNo;
         this.mainForm.enginName = data.projectName;
         this.mainForm.loginType = data.enginSignType;
@@ -582,6 +560,8 @@ export default {
         this.goodsList = data.items.map(item => {
           return {
             useRefCount: '',
+            saleTypeId: item.saleTypeId,
+            saleTypeCode: item.saleTypeCode,
             saleTypeName: item.saleTypeName,
             materialId: item.materialId,
             materialNumber: item.materialNumber,
@@ -603,6 +583,12 @@ export default {
             tax: item.taxRate,
             status1: '',
             status2: '',
+            rebateWallets: item.customerWalletList.filter(item => {
+              return item.type === 'REBATE';
+            }),
+            wallets: item.customerWalletList.filter(item => {
+              return item.type === 'COMMONLY';
+            }),
           }
         })
       })
@@ -616,9 +602,9 @@ export default {
     // 修改返利钱包
     changeFlWallet(index) {
       if(this.goodsList[index].customerWalletId2) {
-        let obj = this.flWalletList.find(o => o.customerWalletId == this.goodsList[index].customerWalletId2);
+        let obj = this.goodsList[index].rebateWallets.find(o => o.customerWalletId == this.goodsList[index].customerWalletId2);
         this.goodsList[index].rebateRate = obj.rebateRate;
-        this.goodsList[index].customerWalletName2 = obj.name;
+        this.goodsList[index].customerWalletName2 = obj.customerWalletName;
       }else {
         this.goodsList[index].rebateRate = '';
         this.goodsList[index].customerWalletName2 = '';
@@ -628,8 +614,8 @@ export default {
     // 修改现金钱包
     changeXjWallet(index) {
       if(this.goodsList[index].customerWalletId) {
-        let obj = this.xjWalletList.find(o => o.customerWalletId == this.goodsList[index].customerWalletId);
-        this.goodsList[index].customerWalletName = obj.name;
+        let obj = this.goodsList[index].wallets.find(o => o.customerWalletId == this.goodsList[index].customerWalletId);
+        this.goodsList[index].customerWalletName = obj.customerWalletName;
       }else {
         this.goodsList[index].customerWalletName = '';
       }
@@ -677,12 +663,24 @@ export default {
             }
           }
 
+          this.goodsList.forEach(item => {
+            delete item.rebateWallets;
+            delete item.wallets;
+          })
+
           let params = {
             enginOrderId: this.mainForm.orderNum,
             // orderDate: this.mainForm.orderDate,
-            mainId: this.mainForm.type || '',
+            // mainId: this.mainForm.type || '',
             refEnginRecordNo: this.mainForm.enginNum || '',
+            refProjectName: this.mainForm.enginName || '',
+            refPromiseStatus: this.mainForm.loginType || '',
             refFactoryNo: this.mainForm.factoryNum || '',
+            refUseUnit: this.mainForm.company || '',
+            refLinkman: this.mainForm.contactMan || '',
+            refTel: this.mainForm.tel || '',
+            refPhone: this.mainForm.phone || '',
+            refInstallAddress: this.mainForm.address || '',
             note2: this.mainForm.greeRemark || '',
             note1: this.mainForm.greeReply || '',
             remark: this.mainForm.remark || '',

+ 65 - 65
src/views/supply/engin/components/home_form.vue

@@ -25,13 +25,20 @@
             </el-date-picker>
           </el-form-item>
         </el-col>
-        <el-col :xs="24" :sm="12" :lg="8">
+        <!-- <el-col :xs="24" :sm="12" :lg="8">
           <el-form-item label="产品大类" prop="type">
             <el-input v-model="mainForm.type" disabled v-if="listItem"></el-input>
             <el-select v-model="mainForm.type" placeholder="选择产品大类" style="width: 100%" disabled v-else>
               <el-option v-for="item in typeList" :key="item.dictCode" :label="item.dictValue" :value="item.dictCode"></el-option>
             </el-select>
           </el-form-item>
+        </el-col> -->
+        <el-col :xs="24" :sm="12" :lg="8">
+          <el-form-item label="销售类型" prop="saleType">
+            <el-select v-model="mainForm.saleType" placeholder="选择销售类型" style="width: 100%" clearable @change="changeSaleType">
+              <el-option v-for="item in salesTypeList" :key="item.id" :label="item.saleName" :value="item.id"></el-option>
+            </el-select>
+          </el-form-item>
         </el-col>
         <el-col :xs="24" :sm="12" :lg="8">
           <el-form-item label="经销商编码" prop="jxsNum">
@@ -72,13 +79,6 @@
           </el-form-item>
         </el-col>
         <el-col :xs="24" :sm="12" :lg="8">
-          <el-form-item label="销售类型" prop="saleType">
-            <el-select v-model="mainForm.saleType" placeholder="选择销售类型" style="width: 100%" clearable @change="changeSaleType">
-              <el-option v-for="item in salesTypeList" :key="item.id" :label="item.saleName" :value="item.id"></el-option>
-            </el-select>
-          </el-form-item>
-        </el-col>
-        <el-col :xs="24" :sm="12" :lg="8">
           <el-form-item label="联系人" prop="contactMan">
             <el-input v-model="mainForm.contactMan" placeholder="请输入联系人" disabled></el-input>
           </el-form-item>
@@ -172,11 +172,11 @@
         </el-table-column>
         <el-table-column align="center" label="返利钱包" prop="customerWalletId2" min-width="160" show-overflow-tooltip>
           <template slot-scope="scope">
-            <el-select v-model="scope.row.customerWalletId2" placeholder="选择返利钱包" size="small" clearable @change="changeFlWallet(scope.$index)">
+            <el-select v-model="scope.row.customerWalletId2" placeholder="选择返利类型" size="small" clearable @change="changeFlWallet(scope.$index)">
               <el-option
-                v-for="item in flWalletList"
+                v-for="item in scope.row.rebateWallets"
                 :key="item.customerWalletId"
-                :label="item.name"
+                :label="item.customerWalletName"
                 :value="item.customerWalletId">
               </el-option>
             </el-select>
@@ -196,9 +196,9 @@
           <template slot-scope="scope">
             <el-select v-model="scope.row.customerWalletId" placeholder="选择现金钱包" size="small" clearable @change="changeXjWallet(scope.$index)">
               <el-option
-                v-for="item in xjWalletList"
+                v-for="item in scope.row.wallets"
                 :key="item.customerWalletId"
-                :label="item.name"
+                :label="item.customerWalletName"
                 :value="item.customerWalletId">
               </el-option>
             </el-select>
@@ -242,7 +242,7 @@
     </div>
 
     <div class="page-footer">
-      <div class="footer" :class="classObj">
+      <div class="footer">
         <el-button type="primary" @click="clickSubmitForm(1)">保 存</el-button>
         <el-button type="primary" @click="clickSubmitForm(2)">提交审核</el-button>
         <el-popconfirm title="确定关闭吗?" @onConfirm="goBack" style="margin-left: 10px;">
@@ -296,6 +296,7 @@
           <el-table-column align="center" prop="recordNo" label="工程登录编号" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" prop="projectName" label="工程项目" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" prop="useUnit" label="使用单位" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" prop="organizationName" label="经销商" show-overflow-tooltip></el-table-column>
         </el-table>
       </div>
       <div class="pagination clearfix">
@@ -384,7 +385,7 @@ export default {
         address: [{ required: true, message: '请输入安装地址', trigger: 'blur' }],
       },
       salesTypeList: [],
-      typeList: [],
+      // typeList: [],
       stockList: [],
       goodsList: [],
 
@@ -402,31 +403,15 @@ export default {
 
       warehouseList: [],
       warehouseValue: '',
-
-      xjWalletList: [],
-      flWalletList: [],
     }
   },
 
-  computed: {
-    sidebar() {
-      return this.$store.state.app.sidebar
-    },
-    classObj() {
-      return {
-        hideSidebar: !this.sidebar.opened,
-        openSidebar: this.sidebar.opened
-      }
-    },
-  },
-
   beforeCreate() {
     that = this;
   },
 
   created() {
     this.getDictList();
-    this.getWalletList();
     this.getSalesTypeList();
     this.getWarehouseList();
 
@@ -463,27 +448,11 @@ export default {
       return currentdate;
     },
 
-    // 获取钱包列表
-    getWalletList() {
-      getWalletList({
-        customerId: JSON.parse(localStorage.getItem("supply_user")).customerId,
-        type: 'COMMONLY'
-      }).then(res => {
-        this.xjWalletList = res.data;
-      })
-      getWalletList({
-        customerId: JSON.parse(localStorage.getItem("supply_user")).customerId,
-        type: 'REBATE'
-      }).then(res => {
-        this.flWalletList = res.data;
-      })
-    },
-
     // 获取产品大类列表
     getDictList() {
-      getDictList({sysDictEnum: 'PRODUCT_TYPE'}).then(res => {
-        this.typeList = res.data;
-      })
+      // getDictList({sysDictEnum: 'PRODUCT_TYPE'}).then(res => {
+      //   this.typeList = res.data;
+      // })
       getDictList({sysDictEnum: 'STOCK_ORDER'}).then(res => {
         this.stockList = res.data;
       })
@@ -538,6 +507,12 @@ export default {
         data.items.forEach(item => {
           item.status1 = '';
           item.status2 = '';
+          item.rebateWallets = item.customerWalletList.filter(item => {
+            return item.type === 'REBATE';
+          });
+          item.wallets = item.customerWalletList.filter(item => {
+            return item.type === 'COMMONLY';
+          });
         })
         this.goodsList = data.items;
       })
@@ -561,6 +536,9 @@ export default {
 
     // 工程登录列表 - 打开弹窗
     openShareDetail() {
+      if(!this.mainForm.saleType) {
+        return this.$errorMsg('请先选择销售类型');
+      }
       this.isShowDialog = true;
       this.dialogTable_currentPage = 1;
       this.getHomeLoginList();
@@ -587,12 +565,15 @@ export default {
 
     // 选择工程登录
     chooseItem(id) {
-      getHomeLoginDetail({recordNo: id}).then(res => {
+      getHomeLoginDetail({
+        recordNo: id,
+        saleTypeId: this.mainForm.saleType,
+      }).then(res => {
         this.isShowDialog = false;
         let data = res.data;
         this.mainForm.type = data.productCategory;
-        this.mainForm.loginUserId = data.userid
-        this.mainForm.saleType = '';
+        this.mainForm.loginUserId = data.userid;
+        // this.mainForm.saleType = '';
         this.mainForm.loginNum = data.recordNo;
         this.mainForm.enginName = data.projectName;
         this.mainForm.loginType = data.promiseStatus;
@@ -602,10 +583,14 @@ export default {
         this.mainForm.phone = data.buyUnitPhone;
         this.mainForm.address = data.installAddress;
 
+        let saleTypeItem = this.salesTypeList.find(o => o.id == this.mainForm.saleType);
+
         this.goodsList = data.items.map(item => {
           return {
             useRefCount: '',
-            saleTypeName: '',
+            saleTypeId: saleTypeItem.id,
+            saleTypeCode: saleTypeItem.saleCode,
+            saleTypeName: saleTypeItem.saleName,
             materialId: item.materialId,
             materialNumber: '',
             materialOldNumber: item.code,
@@ -626,6 +611,12 @@ export default {
             tax: '',
             status1: '',
             status2: '',
+            rebateWallets: item.customerWalletList.filter(item => {
+              return item.type === 'REBATE';
+            }),
+            wallets: item.customerWalletList.filter(item => {
+              return item.type === 'COMMONLY';
+            }),
           }
         })
       })
@@ -633,12 +624,9 @@ export default {
 
     // 选择销售类型
     changeSaleType() {
-      let obj = this.salesTypeList.find(o => o.id == this.mainForm.saleType);
-      this.goodsList.forEach(item => {
-        item.saleTypeId = obj.id;
-        item.saleTypeCode= obj.saleCode;
-        item.saleTypeName = obj.saleName;
-      })
+      if(this.mainForm.loginNum) {
+        this.chooseItem(this.mainForm.loginNum);
+      }
     },
 
     // 删除产品
@@ -649,9 +637,9 @@ export default {
     // 修改返利钱包
     changeFlWallet(index) {
       if(this.goodsList[index].customerWalletId2) {
-        let obj = this.flWalletList.find(o => o.customerWalletId == this.goodsList[index].customerWalletId2);
+        let obj = this.goodsList[index].rebateWallets.find(o => o.customerWalletId == this.goodsList[index].customerWalletId2);
         this.goodsList[index].rebateRate = obj.rebateRate;
-        this.goodsList[index].customerWalletName2 = obj.name;
+        this.goodsList[index].customerWalletName2 = obj.customerWalletName;
       }else {
         this.goodsList[index].rebateRate = '';
         this.goodsList[index].customerWalletName2 = '';
@@ -661,8 +649,8 @@ export default {
     // 修改现金钱包
     changeXjWallet(index) {
       if(this.goodsList[index].customerWalletId) {
-        let obj = this.xjWalletList.find(o => o.customerWalletId == this.goodsList[index].customerWalletId);
-        this.goodsList[index].customerWalletName = obj.name;
+        let obj = this.goodsList[index].wallets.find(o => o.customerWalletId == this.goodsList[index].customerWalletId);
+        this.goodsList[index].customerWalletName = obj.customerWalletName;
       }else {
         this.goodsList[index].customerWalletName = '';
       }
@@ -710,14 +698,26 @@ export default {
             }
           }
 
+          this.goodsList.forEach(item => {
+            delete item.rebateWallets;
+            delete item.wallets;
+          })
+
           let saleTypeItem = this.salesTypeList.find(o => o.id == this.mainForm.saleType);
           let params = {
             enginOrderId: this.mainForm.orderNum,
             // orderDate: this.mainForm.orderDate,
-            mainId: this.mainForm.type || '',
+            // mainId: this.mainForm.type || '',
             loginUserId: this.mainForm.loginUserId,
             refEnginRecordNo: this.mainForm.loginNum || '',
+            refProjectName: this.mainForm.enginName || '',
+            refPromiseStatus: this.mainForm.loginType || '',
             refFactoryNo: this.mainForm.factoryNum || '',
+            refUseUnit: this.mainForm.company || '',
+            refLinkman: this.mainForm.contactMan || '',
+            refTel: this.mainForm.tel || '',
+            refPhone: this.mainForm.phone || '',
+            refInstallAddress: this.mainForm.address || '',
             saleTypeId: this.mainForm.saleType,
             saleTypeCode: saleTypeItem.saleCode,
             saleTypeName: saleTypeItem.saleName,

+ 2 - 2
src/views/supply/engin/home_list.vue

@@ -175,7 +175,7 @@
 </template>
 
 <script>
-import { getOrderList, applyHome, withdrawHome, deleteHome, editHome } from "@/api/supply/engin";
+import { getOrderList, applyHome, withdrawHome, deleteHome, editDateHome } from "@/api/supply/engin";
 import HomeDetail from "@/views/supply/engin/components/home_detail";
 import HomeForm from "@/views/supply/engin/components/home_form";
 import HomeExamine from "@/views/supply/engin/components/home_examine";
@@ -414,7 +414,7 @@ export default {
 
     // 提交 修改订单日期
     submitDateForm() {
-      editHome({
+      editDateHome({
         enginOrderId: this.editId,
         orderDate: this.dateForm.date + ' 00:00:00',
       }).then(res => {

+ 1 - 1
src/views/supply/pickup/check.vue

@@ -90,7 +90,7 @@
             <el-table-column align="center" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="数量" prop="invoiceNum" min-width="100" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="数量" prop="refundableQty" min-width="100" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="单价" prop="price" min-width="100" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="金额" prop="payAmount" min-width="100" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="使用返利金额" prop="payRebateAmount" min-width="120" show-overflow-tooltip></el-table-column>

+ 2 - 2
src/views/supply/pickup/components/pickup_form.vue

@@ -96,7 +96,7 @@
           <el-table-column align="center" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="数量" prop="approvalNumber" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="数量" prop="refundableQty" min-width="100" show-overflow-tooltip></el-table-column>
         </el-table>
       </div>
     </div>
@@ -104,7 +104,7 @@
     <div class="page-footer">
       <div class="footer" :class="classObj">
         <el-button type="primary" @click="clickSubmitForm" :loading="formLoading">{{ formLoading ? '提交中 ...' : '提 交' }}</el-button>
-        <el-popconfirm title="确定重置吗?" @onConfirm="resetForm" style="margin-left: 10px;">
+        <el-popconfirm title="确定重置吗?" @onConfirm="resetForm" style="margin-left: 10px;" v-if="!listItem">
           <el-button slot="reference">重 置</el-button>
         </el-popconfirm>
       </div>

+ 21 - 5
src/views/supply/pickup/components/pickup_print.vue

@@ -9,7 +9,7 @@
           </el-col>
           <el-col :span="6" class="item">
             <div class="label">出库日期:</div>
-            <div class="value">{{detailData.createBy}}</div>
+            <div class="value">{{getDate()}}</div>
           </el-col>
           <el-col :span="6" class="item">
             <div class="label">仓库:</div>
@@ -17,7 +17,7 @@
           </el-col>
           <el-col :span="6" class="item">
             <div class="label">信息密钥:</div>
-            <div class="value">{{detailData.customerNumber}}</div>
+            <div class="value">{{detailData.informationKey}}</div>
           </el-col>
           <el-col :span="24" class="item">
             <div class="label">经销商:</div>
@@ -45,9 +45,9 @@
             <el-row :gutter="20">
               <el-col :span="3">{{ item.invoiceId || '' }}</el-col>
               <el-col :span="2">{{ item.saleTypeName || '' }}</el-col>
-              <el-col :span="3">{{ item.aaa || '' }}</el-col>
+              <el-col :span="3">{{ item.fileNo || '' }}</el-col>
               <el-col :span="6">{{ item.specification || '' }}</el-col>
-              <el-col :span="2">{{ item.qty || 0 }}</el-col>
+              <el-col :span="2">{{ item.refundableQty || 0 }}</el-col>
               <el-col :span="2">{{ item.unit || '' }}</el-col>
               <el-col :span="2">{{ item.price || 0 }}</el-col>
               <el-col :span="2">{{ item.payAmount || 0 }}</el-col>
@@ -58,7 +58,7 @@
               <el-col :span="2">发货日期</el-col>
               <el-col :span="4">{{ item.theTime || '' }}</el-col>
               <el-col :span="2">工程编号</el-col>
-              <el-col :span="3">{{ item.aaa || '' }}</el-col>
+              <el-col :span="3">{{ item.refEnginRecordNo || '' }}</el-col>
               <el-col :span="2">备注</el-col>
               <el-col :span="8">{{ item.remark || '' }}</el-col>
             </el-row>
@@ -142,6 +142,22 @@ export default {
       this.$emit('backListFormDetail');
     },
 
+    getDate() {
+      var date = new Date();
+      var seperator1 = "-";
+      var year = date.getFullYear();
+      var month = date.getMonth() + 1;
+      var strDate = date.getDate();
+      if (month >= 1 && month <= 9) {
+          month = "0" + month;
+      }
+      if (strDate >= 0 && strDate <= 9) {
+          strDate = "0" + strDate;
+      }
+      var currentdate = year + seperator1 + month + seperator1 + strDate;
+      return currentdate;
+    },
+
     // 获取详情
     getDetail() {
       getDetail({id: this.listItem.id}).then(res => {

+ 12 - 10
src/views/supply/policy/components/retail_detail.vue

@@ -127,7 +127,7 @@
         <el-table-column
           align="center"
           label="数量"
-          prop="qty"
+          prop="refundableQty"
           min-width="100"
           show-overflow-tooltip
         ></el-table-column>
@@ -141,17 +141,18 @@
         <el-table-column
           align="center"
           label="返利类型"
-          prop="rebateWallets"
+          prop="customerWalletName2"
           min-width="100"
           show-overflow-tooltip
         >
           <template slot-scope="scope">
+              <!-- v-for="item in scope.row.rebateWallets" -->
             <el-tag
               type="success"
               size="small"
-              v-for="item in scope.row.rebateWallets"
+
             >
-              {{ item.name }}
+                {{ scope.row.customerWalletName2 }}
             </el-tag>
           </template>
         </el-table-column>
@@ -172,17 +173,18 @@
         <el-table-column
           align="center"
           label="现金钱包"
-          prop="wallets"
+          prop="customerWalletName"
           min-width="100"
           show-overflow-tooltip
         >
           <template slot-scope="scope">
+              <!-- v-for="item in scope.row.wallets" -->
             <el-tag
               type="success"
               size="small"
-              v-for="item in scope.row.wallets"
+
             >
-              {{ item.name }}
+              {{ scope.row.customerWalletName }}
             </el-tag>
           </template>
         </el-table-column>
@@ -400,7 +402,7 @@
           <el-table-column
             align="center"
             label="订单数量"
-            prop="qty"
+            prop="refundableQty"
             min-width="100"
             show-overflow-tooltip
           ></el-table-column>
@@ -444,11 +446,11 @@
           <el-table-column
             align="center"
             label="返利"
-            prop="rebateAmount"
+            prop="payRebateAmount"
             min-width="100"
             show-overflow-tooltip
           ></el-table-column>
-payAmount
+
           <el-table-column
             align="center"
             label="备注"

+ 22 - 14
src/views/supply/policy/components/retail_examine.vue

@@ -117,7 +117,7 @@
         <el-table-column
           align="center"
           label="数量"
-          prop="qty"
+          prop="refundableQty"
           min-width="100"
           show-overflow-tooltip
         ></el-table-column>
@@ -131,21 +131,25 @@
         <el-table-column
           align="center"
           label="返利类型"
-          prop="rebateWallets"
+          prop="customerWalletName2"
           min-width="100"
           show-overflow-tooltip
         >
-        <template slot-scope="scope">
-          <el-tag type="success" size="small" v-for="item in scope.row.rebateWallets">
-          {{item.name}}
-          </el-tag>
+       <template slot-scope="scope">
+              <!-- v-for="item in scope.row.rebateWallets" -->
+            <el-tag
+              type="success"
+              size="small"
 
-        </template>
+            >
+                {{ scope.row.customerWalletName2 }}
+            </el-tag>
+          </template>
         </el-table-column>
         <el-table-column
           align="center"
           label="返利金额"
-          prop="rebateAmount"
+          prop="payRebateAmount"
           min-width="100"
           show-overflow-tooltip
         ></el-table-column>
@@ -159,16 +163,20 @@
         <el-table-column
           align="center"
           label="现金钱包"
-          prop="wallets"
+          prop="customerWalletName"
           min-width="100"
           show-overflow-tooltip
         >
-          <template slot-scope="scope">
-          <el-tag type="success" size="small" v-for="item in scope.row.wallets">
-          {{item.name}}
-          </el-tag>
+            <template slot-scope="scope">
+              <!-- v-for="item in scope.row.rebateWallets" -->
+            <el-tag
+              type="success"
+              size="small"
 
-        </template>
+            >
+                {{ scope.row.customerWalletName }}
+            </el-tag>
+          </template>
         </el-table-column>
         <el-table-column
           align="center"

+ 24 - 16
src/views/supply/policy/components/retail_form2.vue

@@ -12,7 +12,7 @@
     <el-form
       ref="mainForm"
       :model="mainForm"
-      :rules="mainFormRules"
+
       label-width="120px"
       size="small"
       label-position="right"
@@ -53,7 +53,7 @@
             </el-date-picker>
           </el-form-item>
         </el-col>
-        <el-col :xs="24" :sm="12" :lg="8">
+        <!-- <el-col :xs="24" :sm="12" :lg="8">
           <el-form-item label="产品大类" prop="type">
             <el-select
               v-model="mainForm.type"
@@ -68,8 +68,8 @@
               ></el-option>
             </el-select>
           </el-form-item>
-        </el-col>
-        <el-col :xs="24" :sm="16" :lg="16">
+        </el-col> -->
+        <el-col :xs="24" :sm="8" :lg="8">
           <el-form-item label="备注" prop="remark">
             <el-input
               v-model="mainForm.remark"
@@ -350,11 +350,11 @@
         </el-table-column>
         <el-table-column align="center" label="操作" width="100" fixed="right">
           <template slot-scope="scope">
-            <el-button
+            <!-- <el-button
               type="text"
               @click="(dialogVisible = true), (cid = scope.row.id)"
               >修改</el-button
-            >
+            > -->
             <el-button type="text" @click="deleteItem(scope.$index)"
               >删除</el-button
             >
@@ -663,6 +663,7 @@ import {
   getConditionList,
   getConditionDetail,
   getpolicyTypeList,
+  getMaterialTypeList ,
   getPolicyConditionList,
 } from "@/api/supply/policy";
 import { getDictList } from "@/api/common";
@@ -704,9 +705,9 @@ export default {
         policyRemark: "",
         policyId: "",
       },
-      mainFormRules: {
-        type: [{ required: true, message: "请选择品类", trigger: "change" }],
-      },
+      // mainFormRules: {
+      //   type: [{ required: true, message: "请选择品类", trigger: "change" }],
+      // },
       goodsList: [],
       warehouseList: [],
       warehouseValue: "",
@@ -886,7 +887,7 @@ export default {
       if (this.screenForm.factorId) {
         this.getConditionList(this.policyConditionId, this.cusIndex + 1);
       } else {
-        this.getpolicyTypeList();
+        this.getMaterialTypeList();
       }
     },
     // 获取某一个比例下的数据 ,查询popType 当前 this.cusIndex+1
@@ -1062,7 +1063,14 @@ export default {
         pageSize: 10,
         policyId: this.screenForm.policyId,
         saleTypeCode: this.screenForm.saleTypeCode,
-      }).then((res) => {});
+      }).then((res) => {
+          for (let i = 0; i < res.data.records.length; i++) {
+          res.data.records[i].qty = 1;
+        }
+        this.dataList = res.data.records;
+        this.total = res.data.total;
+        console.log(this.dataList, "kkkk");
+      });
     },
 
     handleShow() {
@@ -1301,14 +1309,14 @@ export default {
     clickSubmitForm() {
       this.$refs.mainForm.validate((valid) => {
         if (valid) {
-          let mainName =
-            this.typeList[
-              findElem(this.typeList, "dictCode", this.mainForm.type)
-            ].dictValue;
+          // let mainName =
+          //   this.typeList[
+          //     findElem(this.typeList, "dictCode", this.mainForm.type)
+          //   ].dictValue;
           let params = {
             theTime: this.mainForm.date,
             mainId: this.mainForm.type,
-            mainName,
+            mainName:'',
             remark: this.mainForm.remark,
             type: 2, // 1:普通零售单,2:政策零售单
             retailOrderItemList: this.goodsList,

+ 7 - 3
src/views/supply/policy/components/retail_return.vue

@@ -211,16 +211,20 @@ export default {
 
     // 提交
     clickSubmitForm() {
+        let tip = 0
       for(let i=0; i<this.detailData.retailOrderItemList.length; i++) {
-        if(this.detailData.retailOrderItemList[i].tdQty === '' || this.detailData.retailOrderItemList[i].tdQty === null) {
-          this.$errorMsg('请填写退订数量');
-          return;
+        if(this.detailData.retailOrderItemList[i].tdQty) {
+              tip+=1
         }
         if(Number(this.detailData.retailOrderItemList[i].tdQty) < 0) {
           this.$errorMsg('退订数量不可为负数');
           return;
         }
       }
+      if (tip == 0) {
+          this.$errorMsg('请填写退订数量');
+          return
+      }
 
       this.formLoading = true;
       returnData({

+ 72 - 7
src/views/supply/policy/policy_list.vue

@@ -64,6 +64,14 @@
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="订单日期" prop="date">
+                <!-- <el-date-picker
+                  v-model="screenForm.date"
+                  class="dateStyle"
+                  type="datetime"
+                  value-format="yyyy-MM-dd HH:mm:ss"
+                  placeholder="选择订单日期"
+                >
+                </el-date-picker> -->
                 <el-date-picker
                   v-model="screenForm.date"
                   type="datetimerange"
@@ -154,11 +162,19 @@
               align="center"
               label="订单日期"
               prop="theTime"
-              min-width="100"
+              min-width="150"
               show-overflow-tooltip
             >
               <template slot-scope="scope">
-                {{ scope.row.theTime | dateToDayFilter }}
+                <div>
+                  <span>{{ scope.row.theTime | dateToDayFilter }}</span>
+                  <el-button
+                    type="text"
+                    icon="el-icon-edit"
+                    style="padding: 0; margin-left: 6px"
+                    @click="editDate(scope.row)"
+                  ></el-button>
+                </div>
               </template>
             </el-table-column>
             <el-table-column
@@ -351,19 +367,28 @@
                   <el-button slot="reference" type="text">提审</el-button>
                 </el-popconfirm>
                 <el-button
-                  v-if="scope.row.examineStatus == 'WAIT'&&$checkBtnRole('examine', $route.meta.roles)"
+                  v-if="
+                    scope.row.examineStatus == 'WAIT' &&
+                    $checkBtnRole('examine', $route.meta.roles)
+                  "
                   type="text"
                   @click="toExamine(scope.row)"
                   >审核</el-button
                 >
                 <el-button
                   type="text"
-                  v-if="scope.row.examineStatus === 'SAVE'&&$checkBtnRole('edit', $route.meta.roles)"
+                  v-if="
+                    scope.row.examineStatus === 'SAVE' &&
+                    $checkBtnRole('edit', $route.meta.roles)
+                  "
                   @click="toForm(scope.row)"
                   >编辑</el-button
                 >
                 <el-popconfirm
-                  v-if="scope.row.examineStatus == 'WAIT'&&$checkBtnRole('apply', $route.meta.roles)"
+                  v-if="
+                    scope.row.examineStatus == 'WAIT' &&
+                    $checkBtnRole('apply', $route.meta.roles)
+                  "
                   style="margin-left: 10px"
                   title="确定撤回?"
                   @onConfirm="handleCancel(scope.row.id)"
@@ -379,10 +404,21 @@
                 <el-button
                   type="text"
                   @click="toReturn(scope.row)"
-                  v-if="scope.row.examineStatus === 'OK'&&$checkBtnRole('examine', $route.meta.roles)"
+                  v-if="
+                    scope.row.examineStatus === 'OK' &&
+                    $checkBtnRole('examine', $route.meta.roles)
+                  "
                   >退订</el-button
                 >
-   <el-popconfirm style="margin-left: 10px;" title="确定关闭吗?" @onConfirm="handleClose(scope.row.id)" v-if="!scope.row.closeTime&&$checkBtnRole('examine', $route.meta.roles)" >
+                <el-popconfirm
+                  style="margin-left: 10px"
+                  title="确定关闭吗?"
+                  @onConfirm="handleClose(scope.row.id)"
+                  v-if="
+                    scope.row.examineStatus === 'SAVE' &&
+                    $checkBtnRole('examine', $route.meta.roles)
+                  "
+                >
                   <el-button slot="reference" type="text">关闭</el-button>
                 </el-popconfirm>
               </template>
@@ -425,12 +461,17 @@
       v-if="isShowReturn"
       @backListFormDetail="backList"
     />
+    <EditDateDialog
+      :isShow.sync="isShowEditDateDialog"
+      :dateForm.sync="dateForm"
+    />
   </div>
 </template>
 
 <script>
 import {
   getList,
+  editData,
   closeData,
   submitData,
   submitCancel,
@@ -439,6 +480,7 @@ import RetailDetail from "./components/retail_detail";
 import RetailForm from "./components/retail_form2";
 import RetailExamine from "./components/retail_examine";
 import RetailReturn from "./components/retail_return";
+import EditDateDialog from "@/components/Common/edit-date-dialog";
 
 let that;
 export default {
@@ -447,6 +489,7 @@ export default {
     RetailForm,
     RetailExamine,
     RetailReturn,
+    EditDateDialog,
   },
   filters: {
     statusFilter(val) {
@@ -483,6 +526,10 @@ export default {
       isShowForm: false,
       isShowExamine: false,
       isShowReturn: false,
+      isShowEditDateDialog: false,
+      dateForm: {
+        date: "",
+      },
     };
   },
   computed: {
@@ -626,6 +673,24 @@ export default {
         this.getList();
       });
     },
+    // 打开 修改订单日期
+    editDate(item) {
+      this.editId = item.id;
+      this.dateForm.date = item.theTime.slice(0, 10);
+      this.isShowEditDateDialog = true;
+    },
+
+    // 提交 修改订单日期
+    submitDateForm() {
+      editData({
+        id: this.editId,
+        theTime: this.dateForm.date + " 00:00:00",
+      }).then((res) => {
+        this.isShowEditDateDialog = false;
+        this.getList();
+        this.$successMsg("修改成功");
+      });
+    },
   },
 };
 </script>

+ 3 - 3
src/views/supply/retail/components/retail_detail.vue

@@ -75,10 +75,10 @@
         <el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="单价" prop="price" min-width="100" show-overflow-tooltip></el-table-column>
-        <el-table-column align="center" label="数量" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="数量" prop="refundableQty" min-width="100" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="订单金额" prop="totalAmount" min-width="100" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="返利类型" prop="customerWalletName2" min-width="160" show-overflow-tooltip></el-table-column>
-        <el-table-column align="center" label="返利金额" prop="rebateAmount" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="返利金额" prop="payRebateAmount" min-width="100" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="格力折扣" prop="totalDiscAmount" min-width="100" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="现金钱包" prop="customerWalletName" min-width="160" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="实付金额" prop="payAmount" min-width="100" show-overflow-tooltip></el-table-column>
@@ -227,7 +227,7 @@
           <el-table-column align="center" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="数量" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="数量" prop="refundableQty" min-width="100" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="调出仓库" prop="warehouse1" min-width="100" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="调出仓位" prop="position1" min-width="100" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="调入仓库" prop="warehouse2" min-width="100" show-overflow-tooltip></el-table-column>

+ 1 - 1
src/views/supply/retail/components/retail_examine.vue

@@ -56,7 +56,7 @@
         <el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="单价" prop="price" min-width="100" show-overflow-tooltip></el-table-column>
-        <el-table-column align="center" label="数量" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="数量" prop="refundableQty" min-width="100" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="订单金额" prop="totalAmount" min-width="100" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="返利类型" prop="customerWalletName2" min-width="160" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="返利金额" prop="rebateAmount" min-width="100" show-overflow-tooltip></el-table-column>

+ 24 - 22
src/views/supply/retail/components/retail_form.vue

@@ -25,13 +25,15 @@
             </el-date-picker>
           </el-form-item>
         </el-col>
-        <el-col :xs="24" :sm="12" :lg="8">
+        <!-- <el-col :xs="24" :sm="12" :lg="8">
           <el-form-item label="产品大类" prop="type">
             <el-select v-model="mainForm.type" placeholder="选择产品大类" style="width: 100%" :disabled="goodsList.length > 0">
               <el-option v-for="item in typeList" :key="item.dictCode" :label="item.dictValue" :value="item.dictCode"></el-option>
             </el-select>
           </el-form-item>
-        </el-col>
+        </el-col> -->
+      </el-row>
+      <el-row :gutter="20">
         <el-col :xs="24" :sm="12" :lg="8">
           <el-form-item label="经销商编码" prop="jxsNum">
             <el-input v-model="mainForm.jxsNum" placeholder="请输入经销商编码" disabled></el-input>
@@ -162,13 +164,13 @@
     <el-dialog title="添加产品" :visible.sync="isShowDialog" width="80%">
       <el-form ref="screenForm" :model="screenForm" size="small" label-position="left">
         <el-row :gutter="20">
-          <el-col :xs="12" :sm="6" :lg="6">
+          <!-- <el-col :xs="12" :sm="6" :lg="6">
             <el-form-item prop="type">
               <el-select v-model="mainForm.type" placeholder="选择产品大类" style="width: 100%" clearable :disabled="goodsList.length > 0 || rightGoodsList.length > 0">
                 <el-option v-for="item in typeList" :key="item.dictCode" :label="item.dictValue" :value="item.dictCode"></el-option>
               </el-select>
             </el-form-item>
-          </el-col>
+          </el-col> -->
           <el-col :xs="12" :sm="6" :lg="6">
             <el-form-item prop="salesType">
               <el-select v-model="screenForm.salesType" placeholder="选择销售类型" style="width: 100%" clearable>
@@ -198,7 +200,7 @@
               <el-input v-model="screenForm.price2" placeholder="请输入价格" style="width: 46%"></el-input>
             </el-form-item>
           </el-col>
-          <el-col :xs="12" :sm="12" :lg="12" class="tr">
+          <el-col :xs="12" :sm="12" :lg="18" class="tr">
             <el-form-item label="">
               <el-button size="small" @click="resetScreenForm">清空</el-button>
               <el-button size="small" type="primary" @click="submitScreenForm">搜索</el-button>
@@ -285,7 +287,7 @@ export default {
       mainForm: {
         orderNum: '',
         date: '',
-        type: '',
+        // type: '',
         jxsNum: '',
         jxsName: '',
         serviceName: '',
@@ -295,9 +297,9 @@ export default {
         // date: [
         //   { required: true, message: '请选择单据日期', trigger: 'change' }
         // ],
-        type: [
-          { required: true, message: '请选择品类', trigger: 'change' }
-        ],
+        // type: [
+        //   { required: true, message: '请选择品类', trigger: 'change' }
+        // ],
       },
       goodsList: [],
 
@@ -366,7 +368,7 @@ export default {
         let data = res.data;
         this.mainForm.orderNum = data.id;
         this.mainForm.date = data.theTime.slice(0, 10);
-        this.mainForm.type = data.mainId;
+        // this.mainForm.type = data.mainId;
         this.mainForm.jxsNum = data.customerId;
         this.mainForm.jxsName = data.customerName;
         this.mainForm.remark = data.remark;
@@ -399,9 +401,9 @@ export default {
     },
 
     getDictList() {
-      getDictList({sysDictEnum: 'PRODUCT_TYPE'}).then(res => {
-        this.typeList = res.data;
-      })
+      // getDictList({sysDictEnum: 'PRODUCT_TYPE'}).then(res => {
+      //   this.typeList = res.data;
+      // })
       getDictList({sysDictEnum: 'STOCK_ORDER'}).then(res => {
         this.stockList = res.data;
       })
@@ -412,7 +414,7 @@ export default {
       getGoodsList({
         pageNum: this.currentPage,
         pageSize: 10,
-        mainId: this.mainForm.type,
+        // mainId: this.mainForm.type,
         saleId: this.screenForm.salesType,
         materialCode: this.screenForm.proNum,
         materialName: this.screenForm.proName,
@@ -465,16 +467,16 @@ export default {
     openDialog() {
       this.getSalesTypeList();
       this.isShowDialog = true;
-      if(this.mainForm.type) {
+      // if(this.mainForm.type) {
         this.getGoodsList();
-      }
+      // }
     },
 
     // 提交筛选表单
     submitScreenForm() {
-      if(!this.mainForm.type) {
-        return this.$errorMsg('请选择产品大类');
-      }
+      // if(!this.mainForm.type) {
+      //   return this.$errorMsg('请选择产品大类');
+      // }
       this.currentPage = 1;
       this.getGoodsList();
     },
@@ -623,11 +625,11 @@ export default {
             delete item.wallets;
           })
 
-          let mainName = this.typeList[findElem(this.typeList, 'dictCode', this.mainForm.type)].dictValue;
+          // let mainName = this.typeList[findElem(this.typeList, 'dictCode', this.mainForm.type)].dictValue;
           let params = {
             // theTime: this.mainForm.date + ' 00:00:00',
-            mainId: this.mainForm.type,
-            mainName,
+            // mainId: this.mainForm.type,
+            // mainName,
             remark: this.mainForm.remark,
             type: 1, // 1:普通零售单,2:政策零售单
             retailOrderItemList: this.goodsList

+ 1 - 1
src/views/supply/retail/components/retail_return.vue

@@ -56,7 +56,7 @@
         <el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="单价" prop="price" min-width="100" show-overflow-tooltip></el-table-column>
-        <el-table-column align="center" label="数量" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="数量" prop="refundableQty" min-width="100" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="订单金额" prop="totalAmount" min-width="100" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="返利钱包" prop="customerWalletName2" min-width="100" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="返利金额" prop="rebateAmount" min-width="100" show-overflow-tooltip></el-table-column>

+ 1 - 4
src/views/supply/retail/retail_list.vue

@@ -401,10 +401,7 @@
       </div>
     </div>
 
-    <EditDateDialog
-      :isShow.sync="isShowEditDateDialog"
-      :dateForm.sync="dateForm"
-    />
+    <EditDateDialog :isShow.sync="isShowEditDateDialog" :dateForm.sync="dateForm" />
 
     <RetailDetail
       :listItem="queryItem"

+ 2 - 2
src/views/supply/return/return_list.vue

@@ -6,8 +6,8 @@
         <el-form ref="screenForm" :model="screenForm" label-width="90px" size="small" label-position="left">
           <el-row :gutter="20">
             <el-col :xs="24" :sm="12" :lg="6">
-              <el-form-item label="发货单号" prop="orderNum">
-                <el-input v-model="screenForm.orderNum" placeholder="请输入发货单号"></el-input>
+              <el-form-item label="退换单号" prop="orderNum">
+                <el-input v-model="screenForm.orderNum" placeholder="请输入退换单号"></el-input>
               </el-form-item>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">

+ 1 - 1
src/views/supply/sales/components/sales_detail.vue

@@ -49,7 +49,7 @@
           <el-table-column align="center" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="数量" prop="approvalNumber" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="数量" prop="refundableQty" min-width="100" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="单价" prop="price" min-width="100" show-overflow-tooltip></el-table-column>
           <el-table-column align="center" label="订单金额" prop="payAmount" min-width="100" show-overflow-tooltip></el-table-column>
         </el-table>

+ 1 - 1
src/views/supply/sales/components/sales_examine.vue

@@ -48,7 +48,7 @@
         <el-table-column align="center" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
-        <el-table-column align="center" label="数量" prop="approvalNumber" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="数量" prop="refundableQty" min-width="100" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="单价" prop="price" min-width="100" show-overflow-tooltip></el-table-column>
         <el-table-column align="center" label="订单金额" prop="payAmount" min-width="100" show-overflow-tooltip></el-table-column>
       </el-table>

+ 3 - 3
src/views/supply/sales/sales_list.vue

@@ -90,7 +90,7 @@
             <el-table-column align="center" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="数量" prop="approvalNumber" min-width="100" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="数量" prop="refundableQty" min-width="100" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="单价" prop="price" min-width="100" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="订单金额" prop="payAmount" min-width="100" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="备注" prop="remark" min-width="160" show-overflow-tooltip></el-table-column>
@@ -180,7 +180,7 @@ export default {
   computed: {
     exParams() {
       return {
-        status: this.screenForm.status,
+        examineStatus: this.screenForm.status,
         orderNo: this.screenForm.orderNum,
         customerName: this.screenForm.jxsName,
         customerNumber: this.screenForm.jxsNum,
@@ -217,7 +217,7 @@ export default {
       let params = {
         pageNum: this.currentPage,
         pageSize: this.pageSize,
-        status: this.screenForm.status,
+        examineStatus: this.screenForm.status,
         orderNo: this.screenForm.orderNum,
         customerName: this.screenForm.jxsName,
         customerNumber: this.screenForm.jxsNum,

Kaikkia tiedostoja ei voida näyttää, sillä liian monta tiedostoa muuttui tässä diffissä