Prechádzať zdrojové kódy

Merge branch 'dev_ml' of http://121.40.253.172:3000/pengyue/jsh_erp into test

廖泽勇 1 deň pred
rodič
commit
46eb38e903
36 zmenil súbory, kde vykonal 1234 pridanie a 891 odobranie
  1. 14 4
      jshERP-web/src/components/jeecg/JEditableTable.vue
  2. 3 0
      jshERP-web/src/components/menu/SideMenu.vue
  3. 3 1
      jshERP-web/src/views/bill/OtherInList.vue
  4. 3 1
      jshERP-web/src/views/bill/OtherOutList.vue
  5. 2 0
      jshERP-web/src/views/bill/PurchaseInList.vue
  6. 2 0
      jshERP-web/src/views/bill/SaleOutList.vue
  7. 410 3
      jshERP-web/src/views/bill/dialog/BillDetail.vue
  8. 2 2
      jshERP-web/src/views/bill/mixins/BillListMixin.js
  9. 218 293
      jshERP-web/src/views/bill/mixins/BillModalMixin.js
  10. 1 1
      jshERP-web/src/views/bill/modules/AllocationOutModal.vue
  11. 1 1
      jshERP-web/src/views/bill/modules/AssembleModal.vue
  12. 1 1
      jshERP-web/src/views/bill/modules/DisassembleModal.vue
  13. 56 39
      jshERP-web/src/views/bill/modules/OtherInModal.vue
  14. 66 18
      jshERP-web/src/views/bill/modules/OtherOutModal.vue
  15. 1 1
      jshERP-web/src/views/bill/modules/PurchaseApplyModal.vue
  16. 1 1
      jshERP-web/src/views/bill/modules/PurchaseBackModal.vue
  17. 87 53
      jshERP-web/src/views/bill/modules/PurchaseInModal.vue
  18. 65 34
      jshERP-web/src/views/bill/modules/PurchaseOrderModal.vue
  19. 1 1
      jshERP-web/src/views/bill/modules/RetailBackModal.vue
  20. 1 1
      jshERP-web/src/views/bill/modules/RetailOutModal.vue
  21. 1 1
      jshERP-web/src/views/bill/modules/SaleBackModal.vue
  22. 58 11
      jshERP-web/src/views/bill/modules/SaleOrderModal.vue
  23. 86 33
      jshERP-web/src/views/bill/modules/SaleOutModal.vue
  24. 2 2
      jshERP-web/src/views/financial/AdvanceInList.vue
  25. 2 2
      jshERP-web/src/views/financial/GiroList.vue
  26. 2 2
      jshERP-web/src/views/financial/ItemInList.vue
  27. 2 2
      jshERP-web/src/views/financial/ItemOutList.vue
  28. 2 2
      jshERP-web/src/views/financial/MoneyInList.vue
  29. 2 2
      jshERP-web/src/views/financial/MoneyOutList.vue
  30. 2 2
      jshERP-web/src/views/financial/mixins/FinancialListMixin.js
  31. 6 2
      jshERP-web/src/views/material/MaterialCategoryList.vue
  32. 24 41
      jshERP-web/src/views/material/MaterialList.vue
  33. 57 300
      jshERP-web/src/views/material/modules/MaterialModal.vue
  34. 1 1
      jshERP-web/src/views/stock/components/editForm.vue
  35. 14 2
      jshERP-web/src/views/system/VendorList.vue
  36. 35 31
      jshERP-web/src/views/system/modules/VendorModal.vue

+ 14 - 4
jshERP-web/src/components/jeecg/JEditableTable.vue

@@ -1629,6 +1629,14 @@ export default {
       })
     },
     /**
+     * @des 根据行id获取rows所在的索引
+     * @param id 行id
+     * @returns index 返回行所在的索引
+    */
+    getRowIndexByRowId(id){
+      return this.rows.findIndex(row => row.id === id)
+    },
+    /**
      * 在指定位置添加一行
      * @param insertIndex 添加位置下标
      * @param num 添加的行数,默认1
@@ -1648,13 +1656,14 @@ export default {
         this.recalcSortNumber()
         this.forceUpdateFormValues()
       })
-      // 触发 insert 事件
-      this.$emit('inserted', {
-        rows: newRows.map((row) => {
+      const emitRows = newRows.map((row) => {
           let r = cloneObject(row)
           r.id = this.getCleanId(r.id)
           return r
-        }),
+        })
+      // 触发 insert 事件
+      this.$emit('inserted', {
+        rows: emitRows,
         num,
         insertIndex,
         target: this,
@@ -1662,6 +1671,7 @@ export default {
       this.$nextTick(() => {
         this.autoJumpNextInputBill()
       })
+      return emitRows
     },
     /** 删除被选中的行 */
     removeSelectedRows() {

+ 3 - 0
jshERP-web/src/components/menu/SideMenu.vue

@@ -167,5 +167,8 @@ export default {
     }
   }
 }
+.ant-menu-submenu-selected{
+  background-color: color(~`colorPalette("@{primary-color}", 3)`);
+}
 </style>
 <!-- update_end author:sunjianlei date:20190530 for: 选中首页的时候不显示背景颜色 -->

+ 3 - 1
jshERP-web/src/views/bill/OtherInList.vue

@@ -256,6 +256,7 @@ export default {
         'materialsList',
         'operTimeStr',
         'userName',
+        'auditorName',
         'materialCount',
         'totalPrice',
         'status',
@@ -283,6 +284,7 @@ export default {
         { title: '商品信息', dataIndex: 'materialsList', width: 220, ellipsis: true },
         { title: '单据日期', dataIndex: 'operTimeStr', width: 145 },
         { title: '操作员', dataIndex: 'userName', width: 80, ellipsis: true },
+        { title: '复核人员', dataIndex: 'auditorName;', width: 80, ellipsis: true },
         { title: '数量', dataIndex: 'materialCount', width: 60 },
         { title: '金额合计', dataIndex: 'totalPrice', width: 80 },
         { title: '备注', dataIndex: 'remark', width: 200 },
@@ -341,7 +343,7 @@ export default {
           }
         })
       } else {
-        this.$message.warning('抱歉,只有未审核的单据才能删除,请先进行反审核!')
+        this.$message.warning('抱歉,只有未审核的单据才能删除!')
       }
     },
     batchDel: function () {

+ 3 - 1
jshERP-web/src/views/bill/OtherOutList.vue

@@ -256,6 +256,7 @@ export default {
         'materialsList',
         'operTimeStr',
         'userName',
+        'auditorName',
         'materialCount',
         'totalPrice',
         'status',
@@ -283,6 +284,7 @@ export default {
         { title: '商品信息', dataIndex: 'materialsList', width: 220, ellipsis: true },
         { title: '单据日期', dataIndex: 'operTimeStr', width: 145 },
         { title: '操作员', dataIndex: 'userName', width: 80, ellipsis: true },
+        { title: '复核人员', dataIndex: 'auditorName;', width: 80, ellipsis: true },
         { title: '数量', dataIndex: 'materialCount', width: 60 },
         { title: '金额合计', dataIndex: 'totalPrice', width: 80 },
         { title: '备注', dataIndex: 'remark', width: 200 },
@@ -341,7 +343,7 @@ export default {
           }
         })
       } else {
-        this.$message.warning('抱歉,只有未审核的单据才能删除,请先进行反审核!')
+        this.$message.warning('抱歉,只有未审核的单据才能删除!')
       }
     },
     batchDel: function () {

+ 2 - 0
jshERP-web/src/views/bill/PurchaseInList.vue

@@ -291,6 +291,7 @@ export default {
         'materialsList',
         'operTimeStr',
         'userName',
+        'auditorName',
         'materialCount',
         'totalPrice',
         'totalTaxLastMoney',
@@ -323,6 +324,7 @@ export default {
         { title: '商品信息', dataIndex: 'materialsList', width: 220, ellipsis: true },
         { title: '单据日期', dataIndex: 'operTimeStr', width: 145 },
         { title: '操作员', dataIndex: 'userName', width: 80, ellipsis: true },
+        { title: '复核人员', dataIndex: 'auditorName;', width: 80, ellipsis: true },
         { title: '数量', dataIndex: 'materialCount', width: 60 },
         { title: '金额合计', dataIndex: 'totalPrice', width: 80 },
         {

+ 2 - 0
jshERP-web/src/views/bill/SaleOutList.vue

@@ -291,6 +291,7 @@ export default {
         'materialsList',
         'operTimeStr',
         'userName',
+        'auditorName',
         'materialCount',
         'totalPrice',
         'totalTaxLastMoney',
@@ -323,6 +324,7 @@ export default {
         { title: '商品信息', dataIndex: 'materialsList', width: 220, ellipsis: true },
         { title: '单据日期', dataIndex: 'operTimeStr', width: 145 },
         { title: '操作员', dataIndex: 'userName', width: 80, ellipsis: true },
+        { title: '复核人员', dataIndex: 'auditorName;', width: 80, ellipsis: true },
         { title: '数量', dataIndex: 'materialCount', width: 60 },
         { title: '金额合计', dataIndex: 'totalPrice', width: 80 },
         {

+ 410 - 3
jshERP-web/src/views/bill/dialog/BillDetail.vue

@@ -86,6 +86,31 @@
           <a-row class="form-row" :gutter="24">
             <a-col :lg="18" :md="12" :sm="24">
               <div :style="tableWidthRetail">
+                <div class="table-operator">
+                  <a-popover trigger="click" placement="right">
+                    <template slot="content">
+                      <a-checkbox-group @change="onColChange" v-model="settingDataIndex" :defaultValue="settingDataIndex">
+                        <a-row style="width: 500px">
+                          <template v-for="(item, index) in defColumns">
+                            <template>
+                              <a-col :span="8">
+                                <a-checkbox :value="item.dataIndex">
+                                  <j-ellipsis :value="item.title" :length="10"></j-ellipsis>
+                                </a-checkbox>
+                              </a-col>
+                            </template>
+                          </template>
+                        </a-row>
+                        <a-row style="padding-top: 10px">
+                          <a-col>
+                            恢复默认列配置:<a-button @click="handleRestDefault" type="link" size="small">恢复默认</a-button>
+                          </a-col>
+                        </a-row>
+                      </a-checkbox-group>
+                    </template>
+                    <a-button icon="setting">列设置</a-button>
+                  </a-popover>
+                </div>
                 <a-table
                   ref="table"
                   size="middle"
@@ -195,6 +220,31 @@
           <a-row class="form-row" :gutter="24">
             <a-col :lg="18" :md="12" :sm="24">
               <div :style="tableWidthRetail">
+                <div class="table-operator">
+                  <a-popover trigger="click" placement="right">
+                    <template slot="content">
+                      <a-checkbox-group @change="onColChange" v-model="settingDataIndex" :defaultValue="settingDataIndex">
+                        <a-row style="width: 500px">
+                          <template v-for="(item, index) in defColumns">
+                            <template>
+                              <a-col :span="8">
+                                <a-checkbox :value="item.dataIndex">
+                                  <j-ellipsis :value="item.title" :length="10"></j-ellipsis>
+                                </a-checkbox>
+                              </a-col>
+                            </template>
+                          </template>
+                        </a-row>
+                        <a-row style="padding-top: 10px">
+                          <a-col>
+                            恢复默认列配置:<a-button @click="handleRestDefault" type="link" size="small">恢复默认</a-button>
+                          </a-col>
+                        </a-row>
+                      </a-checkbox-group>
+                    </template>
+                    <a-button icon="setting">列设置</a-button>
+                  </a-popover>
+                </div>
                 <a-table
                   ref="table"
                   size="middle"
@@ -284,6 +334,31 @@
             <a-col :xl="6" :lg="8" :md="12" :sm="24"> </a-col>
           </a-row>
           <div :style="tableWidth">
+            <div class="table-operator">
+              <a-popover trigger="click" placement="right">
+                <template slot="content">
+                  <a-checkbox-group @change="onColChange" v-model="settingDataIndex" :defaultValue="settingDataIndex">
+                    <a-row style="width: 500px">
+                      <template v-for="(item, index) in defColumns">
+                        <template>
+                          <a-col :span="8">
+                            <a-checkbox :value="item.dataIndex">
+                              <j-ellipsis :value="item.title" :length="10"></j-ellipsis>
+                            </a-checkbox>
+                          </a-col>
+                        </template>
+                      </template>
+                    </a-row>
+                    <a-row style="padding-top: 10px">
+                      <a-col>
+                        恢复默认列配置:<a-button @click="handleRestDefault" type="link" size="small">恢复默认</a-button>
+                      </a-col>
+                    </a-row>
+                  </a-checkbox-group>
+                </template>
+                <a-button icon="setting">列设置</a-button>
+              </a-popover>
+            </div>
             <a-table
               ref="table"
               size="middle"
@@ -363,6 +438,31 @@
             </a-col>
           </a-row>
           <div style="width: 100%">
+            <div class="table-operator">
+              <a-popover trigger="click" placement="right">
+                <template slot="content">
+                  <a-checkbox-group @change="onColChange" v-model="settingDataIndex" :defaultValue="settingDataIndex">
+                    <a-row style="width: 500px">
+                      <template v-for="(item, index) in defColumns">
+                        <template>
+                          <a-col :span="8">
+                            <a-checkbox :value="item.dataIndex">
+                              <j-ellipsis :value="item.title" :length="10"></j-ellipsis>
+                            </a-checkbox>
+                          </a-col>
+                        </template>
+                      </template>
+                    </a-row>
+                    <a-row style="padding-top: 10px">
+                      <a-col>
+                        恢复默认列配置:<a-button @click="handleRestDefault" type="link" size="small">恢复默认</a-button>
+                      </a-col>
+                    </a-row>
+                  </a-checkbox-group>
+                </template>
+                <a-button icon="setting">列设置</a-button>
+              </a-popover>
+            </div>
             <a-table
               ref="table"
               size="middle"
@@ -470,6 +570,31 @@
             </a-col>
           </a-row>
           <div>
+            <div class="table-operator">
+              <a-popover trigger="click" placement="right">
+                <template slot="content">
+                  <a-checkbox-group @change="onColChange" v-model="settingDataIndex" :defaultValue="settingDataIndex">
+                    <a-row style="width: 500px">
+                      <template v-for="(item, index) in defColumns">
+                        <template>
+                          <a-col :span="8">
+                            <a-checkbox :value="item.dataIndex">
+                              <j-ellipsis :value="item.title" :length="10"></j-ellipsis>
+                            </a-checkbox>
+                          </a-col>
+                        </template>
+                      </template>
+                    </a-row>
+                    <a-row style="padding-top: 10px">
+                      <a-col>
+                        恢复默认列配置:<a-button @click="handleRestDefault" type="link" size="small">恢复默认</a-button>
+                      </a-col>
+                    </a-row>
+                  </a-checkbox-group>
+                </template>
+                <a-button icon="setting">列设置</a-button>
+              </a-popover>
+            </div>
             <a-table
               ref="table"
               size="middle"
@@ -612,6 +737,31 @@
             </a-col>
           </a-row>
           <div :style="tableWidth">
+            <div class="table-operator">
+              <a-popover trigger="click" placement="right">
+                <template slot="content">
+                  <a-checkbox-group @change="onColChange" v-model="settingDataIndex" :defaultValue="settingDataIndex">
+                    <a-row style="width: 500px">
+                      <template v-for="(item, index) in defColumns">
+                        <template>
+                          <a-col :span="8">
+                            <a-checkbox :value="item.dataIndex">
+                              <j-ellipsis :value="item.title" :length="10"></j-ellipsis>
+                            </a-checkbox>
+                          </a-col>
+                        </template>
+                      </template>
+                    </a-row>
+                    <a-row style="padding-top: 10px">
+                      <a-col>
+                        恢复默认列配置:<a-button @click="handleRestDefault" type="link" size="small">恢复默认</a-button>
+                      </a-col>
+                    </a-row>
+                  </a-checkbox-group>
+                </template>
+                <a-button icon="setting">列设置</a-button>
+              </a-popover>
+            </div>
             <a-table
               ref="table"
               size="middle"
@@ -726,6 +876,31 @@
             </a-col>
           </a-row>
           <div :style="tableWidth">
+            <div class="table-operator">
+              <a-popover trigger="click" placement="right">
+                <template slot="content">
+                  <a-checkbox-group @change="onColChange" v-model="settingDataIndex" :defaultValue="settingDataIndex">
+                    <a-row style="width: 500px">
+                      <template v-for="(item, index) in defColumns">
+                        <template>
+                          <a-col :span="8">
+                            <a-checkbox :value="item.dataIndex">
+                              <j-ellipsis :value="item.title" :length="10"></j-ellipsis>
+                            </a-checkbox>
+                          </a-col>
+                        </template>
+                      </template>
+                    </a-row>
+                    <a-row style="padding-top: 10px">
+                      <a-col>
+                        恢复默认列配置:<a-button @click="handleRestDefault" type="link" size="small">恢复默认</a-button>
+                      </a-col>
+                    </a-row>
+                  </a-checkbox-group>
+                </template>
+                <a-button icon="setting">列设置</a-button>
+              </a-popover>
+            </div>
             <a-table
               ref="table"
               size="middle"
@@ -837,6 +1012,31 @@
             </a-col>
           </a-row>
           <div :style="tableWidth">
+            <div class="table-operator">
+              <a-popover trigger="click" placement="right">
+                <template slot="content">
+                  <a-checkbox-group @change="onColChange" v-model="settingDataIndex" :defaultValue="settingDataIndex">
+                    <a-row style="width: 500px">
+                      <template v-for="(item, index) in defColumns">
+                        <template>
+                          <a-col :span="8">
+                            <a-checkbox :value="item.dataIndex">
+                              <j-ellipsis :value="item.title" :length="10"></j-ellipsis>
+                            </a-checkbox>
+                          </a-col>
+                        </template>
+                      </template>
+                    </a-row>
+                    <a-row style="padding-top: 10px">
+                      <a-col>
+                        恢复默认列配置:<a-button @click="handleRestDefault" type="link" size="small">恢复默认</a-button>
+                      </a-col>
+                    </a-row>
+                  </a-checkbox-group>
+                </template>
+                <a-button icon="setting">列设置</a-button>
+              </a-popover>
+            </div>
             <a-table
               ref="table"
               size="middle"
@@ -984,6 +1184,31 @@
             </a-col>
           </a-row>
           <div :style="tableWidth">
+            <div class="table-operator">
+              <a-popover trigger="click" placement="right">
+                <template slot="content">
+                  <a-checkbox-group @change="onColChange" v-model="settingDataIndex" :defaultValue="settingDataIndex">
+                    <a-row style="width: 500px">
+                      <template v-for="(item, index) in defColumns">
+                        <template>
+                          <a-col :span="8">
+                            <a-checkbox :value="item.dataIndex">
+                              <j-ellipsis :value="item.title" :length="10"></j-ellipsis>
+                            </a-checkbox>
+                          </a-col>
+                        </template>
+                      </template>
+                    </a-row>
+                    <a-row style="padding-top: 10px">
+                      <a-col>
+                        恢复默认列配置:<a-button @click="handleRestDefault" type="link" size="small">恢复默认</a-button>
+                      </a-col>
+                    </a-row>
+                  </a-checkbox-group>
+                </template>
+                <a-button icon="setting">列设置</a-button>
+              </a-popover>
+            </div>
             <a-table
               ref="table"
               size="middle"
@@ -1105,6 +1330,31 @@
             </a-col>
           </a-row>
           <div :style="tableWidth">
+            <div class="table-operator">
+              <a-popover trigger="click" placement="right">
+                <template slot="content">
+                  <a-checkbox-group @change="onColChange" v-model="settingDataIndex" :defaultValue="settingDataIndex">
+                    <a-row style="width: 500px">
+                      <template v-for="(item, index) in defColumns">
+                        <template>
+                          <a-col :span="8">
+                            <a-checkbox :value="item.dataIndex">
+                              <j-ellipsis :value="item.title" :length="10"></j-ellipsis>
+                            </a-checkbox>
+                          </a-col>
+                        </template>
+                      </template>
+                    </a-row>
+                    <a-row style="padding-top: 10px">
+                      <a-col>
+                        恢复默认列配置:<a-button @click="handleRestDefault" type="link" size="small">恢复默认</a-button>
+                      </a-col>
+                    </a-row>
+                  </a-checkbox-group>
+                </template>
+                <a-button icon="setting">列设置</a-button>
+              </a-popover>
+            </div>
             <a-table
               ref="table"
               size="middle"
@@ -1178,6 +1428,31 @@
             </a-col>
           </a-row>
           <div :style="tableWidth">
+            <div class="table-operator">
+              <a-popover trigger="click" placement="right">
+                <template slot="content">
+                  <a-checkbox-group @change="onColChange" v-model="settingDataIndex" :defaultValue="settingDataIndex">
+                    <a-row style="width: 500px">
+                      <template v-for="(item, index) in defColumns">
+                        <template>
+                          <a-col :span="8">
+                            <a-checkbox :value="item.dataIndex">
+                              <j-ellipsis :value="item.title" :length="10"></j-ellipsis>
+                            </a-checkbox>
+                          </a-col>
+                        </template>
+                      </template>
+                    </a-row>
+                    <a-row style="padding-top: 10px">
+                      <a-col>
+                        恢复默认列配置:<a-button @click="handleRestDefault" type="link" size="small">恢复默认</a-button>
+                      </a-col>
+                    </a-row>
+                  </a-checkbox-group>
+                </template>
+                <a-button icon="setting">列设置</a-button>
+              </a-popover>
+            </div>
             <a-table
               ref="table"
               size="middle"
@@ -1239,6 +1514,31 @@
             <a-col :xl="6" :lg="8" :md="12" :sm="24"></a-col>
           </a-row>
           <div :style="tableWidth">
+            <div class="table-operator">
+              <a-popover trigger="click" placement="right">
+                <template slot="content">
+                  <a-checkbox-group @change="onColChange" v-model="settingDataIndex" :defaultValue="settingDataIndex">
+                    <a-row style="width: 500px">
+                      <template v-for="(item, index) in defColumns">
+                        <template>
+                          <a-col :span="8">
+                            <a-checkbox :value="item.dataIndex">
+                              <j-ellipsis :value="item.title" :length="10"></j-ellipsis>
+                            </a-checkbox>
+                          </a-col>
+                        </template>
+                      </template>
+                    </a-row>
+                    <a-row style="padding-top: 10px">
+                      <a-col>
+                        恢复默认列配置:<a-button @click="handleRestDefault" type="link" size="small">恢复默认</a-button>
+                      </a-col>
+                    </a-row>
+                  </a-checkbox-group>
+                </template>
+                <a-button icon="setting">列设置</a-button>
+              </a-popover>
+            </div>
             <a-table
               ref="table"
               size="middle"
@@ -1300,6 +1600,31 @@
             <a-col :xl="6" :lg="8" :md="12" :sm="24"></a-col>
           </a-row>
           <div :style="tableWidth">
+            <div class="table-operator">
+              <a-popover trigger="click" placement="right">
+                <template slot="content">
+                  <a-checkbox-group @change="onColChange" v-model="settingDataIndex" :defaultValue="settingDataIndex">
+                    <a-row style="width: 500px">
+                      <template v-for="(item, index) in defColumns">
+                        <template>
+                          <a-col :span="8">
+                            <a-checkbox :value="item.dataIndex">
+                              <j-ellipsis :value="item.title" :length="10"></j-ellipsis>
+                            </a-checkbox>
+                          </a-col>
+                        </template>
+                      </template>
+                    </a-row>
+                    <a-row style="padding-top: 10px">
+                      <a-col>
+                        恢复默认列配置:<a-button @click="handleRestDefault" type="link" size="small">恢复默认</a-button>
+                      </a-col>
+                    </a-row>
+                  </a-checkbox-group>
+                </template>
+                <a-button icon="setting">列设置</a-button>
+              </a-popover>
+            </div>
             <a-table
               ref="table"
               size="middle"
@@ -1361,6 +1686,31 @@
             <a-col :xl="6" :lg="8" :md="12" :sm="24"></a-col>
           </a-row>
           <div :style="tableWidth">
+            <div class="table-operator">
+              <a-popover trigger="click" placement="right">
+                <template slot="content">
+                  <a-checkbox-group @change="onColChange" v-model="settingDataIndex" :defaultValue="settingDataIndex">
+                    <a-row style="width: 500px">
+                      <template v-for="(item, index) in defColumns">
+                        <template>
+                          <a-col :span="8">
+                            <a-checkbox :value="item.dataIndex">
+                              <j-ellipsis :value="item.title" :length="10"></j-ellipsis>
+                            </a-checkbox>
+                          </a-col>
+                        </template>
+                      </template>
+                    </a-row>
+                    <a-row style="padding-top: 10px">
+                      <a-col>
+                        恢复默认列配置:<a-button @click="handleRestDefault" type="link" size="small">恢复默认</a-button>
+                      </a-col>
+                    </a-row>
+                  </a-checkbox-group>
+                </template>
+                <a-button icon="setting">列设置</a-button>
+              </a-popover>
+            </div>
             <a-table
               ref="table"
               size="middle"
@@ -1426,6 +1776,31 @@
             <a-col :xl="6" :lg="8" :md="12" :sm="24"></a-col>
           </a-row>
           <div :style="tableWidth">
+            <div class="table-operator">
+              <a-popover trigger="click" placement="right">
+                <template slot="content">
+                  <a-checkbox-group @change="onColChange" v-model="settingDataIndex" :defaultValue="settingDataIndex">
+                    <a-row style="width: 500px">
+                      <template v-for="(item, index) in defColumns">
+                        <template>
+                          <a-col :span="8">
+                            <a-checkbox :value="item.dataIndex">
+                              <j-ellipsis :value="item.title" :length="10"></j-ellipsis>
+                            </a-checkbox>
+                          </a-col>
+                        </template>
+                      </template>
+                    </a-row>
+                    <a-row style="padding-top: 10px">
+                      <a-col>
+                        恢复默认列配置:<a-button @click="handleRestDefault" type="link" size="small">恢复默认</a-button>
+                      </a-col>
+                    </a-row>
+                  </a-checkbox-group>
+                </template>
+                <a-button icon="setting">列设置</a-button>
+              </a-popover>
+            </div>
             <a-table
               ref="table"
               size="middle"
@@ -1516,6 +1891,7 @@ import { getMpListShort, getCheckFlag, exportXlsPost } from '@/utils/util'
 import BillPrintIframe from './BillPrintIframe'
 import FinancialDetail from '../../financial/dialog/FinancialDetail'
 import JUpload from '@/components/jeecg/JUpload'
+import JEllipsis from '@/components/jeecg/JEllipsis'
 import Vue from 'vue'
 // import { JeecgListMixin } from '@/mixins/JeecgListMixin'
 // import QrcodeVue from 'qrcode.vue'
@@ -1529,6 +1905,7 @@ export default {
     FinancialDetail,
     JUpload,
     VueQrcode,
+    JEllipsis
     // VueQr,
   },
   data() {
@@ -1575,6 +1952,9 @@ export default {
       columns: [],
       //列定义
       defColumns: [],
+      // 实际索引
+      settingDataIndex: [],
+      prefixNo: '',
       retailOutColumns: [
         { title: '仓库名称', dataIndex: 'depotName' },
         { title: '条码', dataIndex: 'barCode' },
@@ -2097,7 +2477,6 @@ export default {
         for (let i = 0; i < this.defColumns.length; i++) {
           currentCol.push(this.defColumns[i])
         }
-        this.columns = currentCol
       } else if (record.purchaseStatus === '3') {
         //将已出库的标题转为已采购,针对销售订单转采购订单的场景
         for (let i = 0; i < this.defColumns.length; i++) {
@@ -2115,7 +2494,6 @@ export default {
           }
           currentCol.push(info)
         }
-        this.columns = currentCol
       } else {
         for (let i = 0; i < this.defColumns.length; i++) {
           //移除列
@@ -2153,8 +2531,10 @@ export default {
             currentCol.push(info)
           }
         }
-        this.columns = currentCol
       }
+      this.defColumns = currentCol
+      this.initColumnsSetting()
+      // this.columns = currentCol
     },
     initPlatform() {
       getPlatformConfigByKey({ platformKey: 'bill_print_flag' }).then((res) => {
@@ -2650,6 +3030,30 @@ export default {
         '单据日期:' + this.model.operTimeStr + ' ' + '单据编号:' + this.model.number + '' + '关联单号:' + linkNumber
       exportXlsPost(this.billType + '_' + this.model.number, '单据导出', head, tip, list)
     },
+    initColumnsSetting() {
+      let columnsStr = Vue.ls.get(`${this.prefixNo}_XQ`)
+      if (columnsStr && columnsStr.indexOf(',') > -1) {
+        this.settingDataIndex = columnsStr.split(',')
+      } else {
+        this.settingDataIndex = this.defColumns.map(item => item.dataIndex)
+      }
+      this.columns = this.defColumns.filter((item) => {
+        return this.settingDataIndex.includes(item.dataIndex)
+      })
+    },
+    //恢复默认
+    handleRestDefault() {
+      Vue.ls.remove(`${this.prefixNo}_XQ`)
+      this.initColumnsSetting()
+    },
+    //列设置更改事件
+    onColChange(checkedValues) {
+      this.columns = this.defColumns.filter((item) => {
+        return checkedValues.includes(item.dataIndex)
+      })
+      let columnsStr = checkedValues.join()
+      Vue.ls.set(`${this.prefixNo}_XQ`, columnsStr)
+    },
   },
 }
 </script>
@@ -2669,4 +3073,7 @@ export default {
   height: 100%;
   object-fit: cover;
 }
+.table-operator {
+  margin-bottom: 18px;
+}
 </style>

+ 2 - 2
jshERP-web/src/views/bill/mixins/BillListMixin.js

@@ -100,14 +100,14 @@ export const BillListMixin = {
           }
         })
       } else {
-        this.$message.warning('抱歉,只有未审核的单据才能编辑,请先进行反审核!')
+        this.$message.warning('抱歉,只有未审核的单据才能编辑!')
       }
     },
     myHandleDelete(record) {
       if (record.status === '0') {
         this.handleDelete(record.id)
       } else {
-        this.$message.warning('抱歉,只有未审核的单据才能删除,请先进行反审核!')
+        this.$message.warning('抱歉,只有未审核的单据才能删除!')
       }
     },
     myHandleDetail(record, type, prefixNo) {

+ 218 - 293
jshERP-web/src/views/bill/mixins/BillModalMixin.js

@@ -33,7 +33,6 @@ export const BillModalMixin = {
         options: [],
         value: '',
       },
-      currentSelectDepotId: '',
       depotList: [],
       accountList: [],
       accountIdList: [],
@@ -286,6 +285,13 @@ export const BillModalMixin = {
       getAction('/depot/findDepotByCurrentUser').then((res) => {
         if (res.code === 200) {
           let arr = res.data
+          this.depotList = res.data.map(item => {
+            return {
+              ...item,
+              value: item.id,
+              label: item.depotName,
+            }
+          })
           for (let item of that.materialTable.columns) {
             if (item.key == 'depotId' || item.key == 'anotherDepotId') {
               item.options = []
@@ -395,46 +401,47 @@ export const BillModalMixin = {
         .then((allValues) => {
           //获取单据明细列表信息
           let detailArr = allValues.tablesValue[0].values
-          let batchNumbers = ''
-          for (let detail of detailArr) {
-            batchNumbers += detail.batchNumber + ','
-          }
-          if (batchNumbers) {
-            batchNumbers = batchNumbers.substring(0, batchNumbers.length - 1)
-          }
-          let param = {
-            batchNumber: batchNumbers,
-            organId: this.form.getFieldValue('organId'),
-            depotId: depotId,
-            mpList: getMpListShort(Vue.ls.get('materialPropertyList')), //扩展属性
-            prefixNo: this.prefixNo,
-          }
-          getMaterialByBatchNumber(param).then((res) => {
-            if (res && res.code === 200) {
-              let mList = res.data
-              //构造新的列表数组,用于存放单据明细信息
-              let newDetailArr = []
-              if (mList && mList.length) {
-                for (let i = 0; i < detailArr.length; i++) {
-                  let item = detailArr[i]
-                  item.depotId = depotId
-                  for (let j = 0; j < mList.length; j++) {
-                    if (mList[j].batchNumber === item.batchNumber) {
-                      item.stock = mList[j].stock
-                    }
-                  }
-                  newDetailArr.push(item)
-                }
-              } else {
-                for (let i = 0; i < detailArr.length; i++) {
-                  let item = detailArr[i]
-                  item.depotId = depotId
-                  newDetailArr.push(item)
-                }
-              }
-              this.materialTable.dataSource = newDetailArr
-            }
-          })
+          console.log('detailArr=======',detailArr)
+          // let batchNumbers = ''
+          // for (let detail of detailArr) {
+          //   batchNumbers += detail.batchNumber + ','
+          // }
+          // if (batchNumbers) {
+          //   batchNumbers = batchNumbers.substring(0, batchNumbers.length - 1)
+          // }
+          // let param = {
+          //   batchNumber: batchNumbers,
+          //   organId: this.form.getFieldValue('organId'),
+          //   depotId: depotId,
+          //   mpList: getMpListShort(Vue.ls.get('materialPropertyList')), //扩展属性
+          //   prefixNo: this.prefixNo,
+          // }
+          // getMaterialByBatchNumber(param).then((res) => {
+          //   if (res && res.code === 200) {
+          //     let mList = res.data
+          //     //构造新的列表数组,用于存放单据明细信息
+          //     let newDetailArr = []
+          //     if (mList && mList.length) {
+          //       for (let i = 0; i < detailArr.length; i++) {
+          //         let item = detailArr[i]
+          //         item.depotId = depotId
+          //         for (let j = 0; j < mList.length; j++) {
+          //           if (mList[j].batchNumber === item.batchNumber) {
+          //             item.stock = mList[j].stock
+          //           }
+          //         }
+          //         newDetailArr.push(item)
+          //       }
+          //     } else {
+          //       for (let i = 0; i < detailArr.length; i++) {
+          //         let item = detailArr[i]
+          //         item.depotId = depotId
+          //         newDetailArr.push(item)
+          //       }
+          //     }
+          //     this.materialTable.dataSource = newDetailArr
+          //   }
+          // })
         })
     },
     depotModalFormOk() {
@@ -454,37 +461,93 @@ export const BillModalMixin = {
       setTimeout(function () {
         that.$refs.materialDataTable.resetScrollTop((target.rows.length + 1) * that.$refs.materialDataTable.rowHeight)
       }, 1000)
-      // if (this.currentSelectDepotId) {
-      //   //如果单据选择过仓库,则直接从当前选择的仓库加载
-      //   target.setValues([{ rowKey: row.id, values: { depotId: this.currentSelectDepotId } }])
-      // } else {
-      //   getAction('/depot/findDepotByCurrentUser').then((res) => {
-      //     if (res.code === 200) {
-      //       let arr = res.data
-      //       if (arr.length === 1) {
-      //         target.setValues([{ rowKey: row.id, values: { depotId: arr[0].id + '' } }])
-      //       } else {
-      //         for (let i = 0; i < arr.length; i++) {
-      //           if (arr[i].isDefault) {
-      //             target.setValues([{ rowKey: row.id, values: { depotId: arr[i].id + '' } }])
-      //           }
-      //         }
-      //       }
-      //     }
-      //   })
-      // }
     },
     //根据仓库名、商品条码带出对应的仓位货架、库存数量
-    async setProPosition(barCode, depotId, event){
-      const { row, column, value, target } = event
-      findStockByDepotAndBarCode({ depotId: depotId, barCode: barCode }).then(res => {
-        const {position='',stock} = res.data
-        target.setValues([
-          {
+    // async setProPosition(barCode, depotId, event){
+    //   const { row, column, value, target } = event
+    //   findStockByDepotAndBarCode({ depotId: depotId, barCode: barCode }).then(res => {
+    //     const {position='',stock} = res.data
+    //     target.setValues([
+    //       {
+    //         rowKey: row.id,
+    //         values: { position:position,inventory: stock },
+    //       },
+    //     ])
+    //     target.$forceUpdate()
+    //   })
+    // },
+    // 选择供应商、客户带出税率
+    getTatRate(id){
+      getAction('/supplier/info', { id }).then((res) => {
+        if (res && res.code === 200) {
+          let info = res.data.info
+          const taxRate = info.taxRate?(info.taxRate - 0) : 0
+          this.form.setFieldsValue({
+            taxRate
+          })
+          const target = this.$refs[this.refKeys[0]]
+          if(target){
+            this.autoCalcPrice(target,taxRate)
+          }
+        }
+      })
+    },
+    // 自动计算表格价格
+    autoCalcPrice(editTableVm,taxRate){
+      const that = this
+      editTableVm.getValues((error, values) => {
+        const updateRows = []
+        console.log('9999999------',values)
+        for(let row of values){
+          const allPrice =  row.allPrice - 0
+          const taxMoney = (taxRate * 0.01 * allPrice).toFixed(2) - 0
+          const taxLastMoney = (allPrice + taxMoney).toFixed(2) - 0
+          updateRows.push({
             rowKey: row.id,
-            values: { position:position,inventory: stock,stock: stock },
-          },
-        ])
+            values: { taxRate, taxMoney: taxMoney, taxLastMoney: taxLastMoney },
+          })
+        }
+        editTableVm.setValues(updateRows)
+        editTableVm.recalcAllStatisticsColumns()
+        that.autoChangePrice(editTableVm)
+        editTableVm.$forceUpdate()
+      })
+    },
+    //默认采购价、销售价与当前采购价、销售价不一致
+    getDefaultWholesaleDecimal(index,key){
+      if(this.materialTable.dataSource[index]&&this.materialTable.dataSource[index][key]){
+        return this.materialTable.dataSource[index][key]
+      }
+      return undefined
+    },
+    onChangePrice(e,callback){
+      const { value } = e.target;
+      const reg = /^$|^(0|[1-9]\d*)(\.\d{1,2})?$/;
+      if ((!isNaN(value) && reg.test(value))) {
+        callback(value)
+      }
+    },
+    // 仓库名移动到基础表单
+    async changeDepot(depotId,editTableRefName){
+      const target = this.$refs[`${editTableRefName}`]
+      if(!target){
+        return
+      }
+      target.getValues(async (error, values) => {
+        const rows = values
+        const updateRows = []
+        for (let row of rows) {
+          const barCode = row.barCode
+          if(depotId&&barCode){
+            const res = await findStockByDepotAndBarCode({ depotId: depotId, barCode: barCode })
+            const {position='',stock=0} = res.data
+            updateRows.push({
+              rowKey: row.id,
+              values: { position:position,inventory: stock, stock,depotId },
+            })
+          }
+        }
+        target.setValues(updateRows)
         target.$forceUpdate()
       })
     },
@@ -494,96 +557,13 @@ export const BillModalMixin = {
       const { type, row, column, value, target } = event
       let param, snList, batchNumber, operNumber, unitPrice, allPrice, taxRate, taxMoney, taxLastMoney
       switch (column.key) {
-        case 'depotId':
-          that.currentSelectDepotId = row.depotId
-          console.log('row========', row)
-          // // 选择商品自动带出barCode、商品ID
-          if(row.depotId&&row.barCode&&type=='select'){
-            // // 根据仓库id自动带出仓位货架(若有)参数:商品id、仓库id
-            this.setProPosition(row.barCode, row.depotId, event)
-          }
-          break
-        // case 'batchNumber':
-        //   param = {
-        //     batchNumber: value,
-        //     organId: this.form.getFieldValue('organId'),
-        //     mpList: getMpListShort(Vue.ls.get('materialPropertyList')), //扩展属性
-        //     prefixNo: this.prefixNo,
+        // case 'depotId':
+        //   console.log('row========', row)
+        //   // // 选择商品自动带出barCode、商品ID
+        //   if(row.depotId&&row.barCode&&type=='select'){
+        //     // // 根据仓库id自动带出仓位货架(若有)参数:商品id、仓库id
+        //     this.setProPosition(row.barCode, row.depotId, event)
         //   }
-        //   getMaterialByBatchNumber(param).then((res) => {
-        //     if (res && res.code === 200) {
-        //       let mList = res.data
-
-        //       if (value.indexOf(',') > -1) {
-        //         //多个条码
-        //         this.$refs.materialDataTable.getValues((error, values) => {
-        //           values.pop() //移除最后一行数据
-        //           let mArr = values
-        //           for (let i = 0; i < mList.length; i++) {
-        //             let mInfo = mList[i]
-        //             if (mInfo.unitId) {
-        //               mInfo.unitList = JSON.stringify(mInfo.unitList)
-        //             }
-        //             this.changeColumnShow(mInfo)
-        //             let mObj = this.parseInfoToObj(mInfo)
-        //             mObj.depotId = mInfo.depotId
-        //             mObj.stock = mInfo.stock
-        //             mObj.inventory = mInfo.inventory
-        //             mArr.push(mObj)
-        //           }
-        //           let allPriceTotal = 0
-        //           let taxLastMoneyTotal = 0
-        //           for (let j = 0; j < mArr.length; j++) {
-        //             allPriceTotal += mArr[j].allPrice - 0
-        //             taxLastMoneyTotal += mArr[j].taxLastMoney - 0
-        //             //组合和拆分单据给商品类型进行重新赋值
-        //             if (j === 0) {
-        //               mArr[0].mType = '组合件'
-        //             } else {
-        //               mArr[j].mType = '普通子件'
-        //             }
-        //           }
-
-        //           this.materialTable.dataSource = mArr
-        //           if (this.prefixNo === 'LSCK' || this.prefixNo === 'LSTH') {
-        //             target.statisticsColumns.allPrice = allPriceTotal
-        //           } else {
-        //             target.statisticsColumns.taxLastMoney = taxLastMoneyTotal
-        //           }
-        //           that.autoChangePrice(target)
-        //           //强制渲染
-        //           target.$forceUpdate()
-        //         })
-        //       } else {
-        //         //单个条码
-        //         let depotIdSelected = row.depotId || ''
-        //         // findStockByDepotAndBarCode({ depotId: depotIdSelected, barCode: row.batchNumber }).then((res) => {
-        //         //   if (res && res.code === 200) {
-        //         //     let mArr = []
-        //         //     let mInfo = mList[0]
-        //         //     if (mInfo.unitId) {
-        //         //       mInfo.unitList = JSON.stringify(mInfo.unitList)
-        //         //     }
-        //         //     this.changeColumnShow(mInfo)
-        //         //     let mInfoEx = this.parseInfoToObj(mInfo)
-        //         //     mInfoEx.stock = res.data.stock
-        //         //     mInfoEx.inventory = mInfo.inventory
-        //         //     let mObj = {
-        //         //       rowKey: row.id,
-        //         //       values: mInfoEx,
-        //         //     }
-        //         //     mArr.push(mObj)
-        //         //     target.setValues(mArr)
-        //         //     target.recalcAllStatisticsColumns()
-        //         //     that.autoChangePrice(target)
-        //         //     target.autoSelectBySpecialKey('operNumber', row.orderNum)
-        //         //     //强制渲染
-        //         //     target.$forceUpdate()
-        //         //   }
-        //         // })
-        //       }
-        //     }
-        //   })
         //   break
         case 'barCode':
           param = {
@@ -592,57 +572,47 @@ export const BillModalMixin = {
             mpList: getMpListShort(Vue.ls.get('materialPropertyList')), //扩展属性
             prefixNo: this.prefixNo,
           }
+          const formDepotId = that.form.getFieldValue('depotId')
+          const formTaxRate = that.form.getFieldValue('taxRate')
           getMaterialByBarCode(param).then((res) => {
             if (res && res.code === 200) {
               let mList = res.data
               console.log('mList======',mList)
-              target.getValues(async (error, values) => {
-                const clickRowIndex = values.findIndex((item) => item.id === row.id) //获取当前行的索引
-                // values.pop() //移除最后一行数据
-                values.splice(clickRowIndex, 1) //移除当前行数据
-                let mArr = values // 新加的行
-                for (let i = 0; i < mList.length; i++) {
-                  let mInfo = mList[i]
-                  if (mInfo.unitId) {
-                    mInfo.unitList = JSON.stringify(mInfo.unitList)
-                  }
-                  this.changeColumnShow(mInfo)
-                  let mObj = this.parseInfoToObj(mInfo)
-                  mObj.depotId = mInfo.depotId
-                  const res = await findStockByDepotAndBarCode({ depotId: mInfo.depotId, barCode: mObj.barCode })
-                  const {position,stock} = res.data
-                  mObj.stock = stock
-                  console.log('stock===',stock)
-                  console.log('position===',position)
-                  mObj.position = position
-                  mObj.inventory = mInfo.inventory
-                  const unitPrice = (mObj.unitPrice||0)- 0
-                  mObj.allPrice = (unitPrice * mObj.operNumber).toFixed(2)
-                  // mObj.taxLastMoney = mInfo.taxLastMoney||0
-                  mArr.push(mObj)
-                }
-                let allPriceTotal = 0
-                let taxLastMoneyTotal = 0
-                for (let j = 0; j < mArr.length; j++) {
-                  allPriceTotal += mArr[j].allPrice - 0
-                  taxLastMoneyTotal += mArr[j].taxLastMoney- 0
-                  //组合和拆分单据给商品类型进行重新赋值
-                  if (j === 0) {
-                    mArr[0].mType = '组合件'
-                  } else {
-                    mArr[j].mType = '普通子件'
+              const needAddNum = mList.length
+              const clickRowIndex = target.getRowIndexByRowId(row.id)
+              const newRows = target.insert(clickRowIndex,needAddNum)
+              target.removeRows(row.id)
+              const updateRows = []
+              target.$nextTick(() => {
+                target.getValues(async (error,values) => {
+                  for(let i = 0; i < values.length; i++){
+                    const rawInfo = mList[i]
+                    const item = values[i]
+                    const mObj = that.parseInfoToObj(rawInfo)
+                    mObj.allPrice = ((mObj.unitPrice - 0)* (mObj.operNumber))
+                    mObj.taxRate = formTaxRate || 0
+                    mObj.taxMoney = (mObj.taxRate * 0.01 * mObj.allPrice)
+                    mObj.taxLastMoney = (mObj.allPrice + mObj.taxMoney)
+                    mObj.depotId = formDepotId
+                    mObj.position = ''
+                    if(formDepotId){
+                      const res = await findStockByDepotAndBarCode({ depotId: formDepotId, barCode: mObj.barCode })
+                      const {position='',stock=0} = res.data
+                      mObj.stock = stock
+                      mObj.inventory = stock
+                      mObj.position = position
+                    }
+                    updateRows.push({
+                      rowKey: item.id,
+                      values: mObj
+                    })
                   }
-                }
-                console.log('mArr--------',mArr)
-                this.materialTable.dataSource = mArr
-                if (this.prefixNo === 'LSCK' || this.prefixNo === 'LSTH') {
-                  target.statisticsColumns.allPrice = allPriceTotal
-                } else {
-                  target.statisticsColumns.taxLastMoney = taxLastMoneyTotal
-                }
-                that.autoChangePrice(target)
-                //强制渲染
-                target.$forceUpdate()
+                  target.setValues(updateRows)
+                  target.recalcAllStatisticsColumns()
+                  target.$nextTick(() => {
+                    that.autoChangePrice(target)
+                  })
+                }, false,newRows.map(item => item.id))
               })
             }
           })
@@ -668,51 +638,6 @@ export const BillModalMixin = {
             that.autoChangePrice(target)
           }
           break
-        // case 'batchNumber':
-        //   console.log('====================adasdas', column)
-        //   batchNumber = value
-        //   let depotItemId = ''
-        //   if (this.model.id) {
-        //     //只有在保存之后的编辑页面下才获取明细id
-        //     let rowId = row.id
-        //     if (rowId.length <= 19) {
-        //       depotItemId = rowId - 0
-        //     }
-        //   }
-        //   getBatchNumberList({
-        //     name: '',
-        //     depotItemId: depotItemId,
-        //     depotId: row.depotId,
-        //     barCode: row.barCode,
-        //     batchNumber: batchNumber,
-        //   }).then((res) => {
-        //     if (res && res.code === 200) {
-        //       if (res.data && res.data.rows) {
-        //         let info = res.data.rows[0]
-        //         operNumber = info.totalNum
-        //         taxRate = row.taxRate - 0 //税率
-        //         unitPrice = row.unitPrice - 0 //单价
-        //         allPrice = (unitPrice * operNumber).toFixed(2) - 0
-        //         taxMoney = (taxRate * 0.01 * allPrice).toFixed(2) - 0
-        //         taxLastMoney = (allPrice + taxMoney).toFixed(2) - 0
-        //         target.setValues([
-        //           {
-        //             rowKey: row.id,
-        //             values: {
-        //               expirationDate: info.expirationDateStr,
-        //               operNumber: operNumber,
-        //               allPrice: allPrice,
-        //               taxMoney: taxMoney,
-        //               taxLastMoney: taxLastMoney,
-        //             },
-        //           },
-        //         ])
-        //         target.recalcAllStatisticsColumns()
-        //         that.autoChangePrice(target)
-        //       }
-        //     }
-        //   })
-        //   break
         case 'operNumber':
           operNumber = value - 0
           taxRate = row.taxRate - 0 //税率
@@ -752,37 +677,38 @@ export const BillModalMixin = {
           target.recalcAllStatisticsColumns()
           that.autoChangePrice(target)
           break
-        case 'taxRate':
-          operNumber = row.operNumber - 0 //数量
-          allPrice = row.allPrice - 0
-          unitPrice = row.unitPrice - 0
-          taxRate = value - 0 //税率
-          taxMoney = (taxRate * 0.01 * allPrice).toFixed(2) - 0
-          taxLastMoney = (allPrice + taxMoney).toFixed(2) - 0
-          target.setValues([{ rowKey: row.id, values: { taxMoney: taxMoney, taxLastMoney: taxLastMoney } }])
-          target.recalcAllStatisticsColumns()
-          that.autoChangePrice(target)
-          break
-        case 'taxLastMoney':
-          operNumber = row.operNumber - 0 //数量
-          taxLastMoney = value - 0
-          taxRate = row.taxRate - 0 //税率
-          if (taxRate) {
-            unitPrice = (taxLastMoney / operNumber / (1 + taxRate * 0.01)).toFixed(2) - 0
-            allPrice = (unitPrice * operNumber).toFixed(2) - 0
-            taxMoney = (taxLastMoney - allPrice).toFixed(2) - 0
-          } else {
-            //税率为0的情况,特殊处理
-            allPrice = taxLastMoney
-            unitPrice = (allPrice / operNumber).toFixed(2) - 0 //单价
-            taxMoney = 0
-          }
-          target.setValues([
-            { rowKey: row.id, values: { unitPrice: unitPrice, allPrice: allPrice, taxMoney: taxMoney } },
-          ])
-          target.recalcAllStatisticsColumns()
-          that.autoChangePrice(target)
-          break
+        // case 'taxRate':
+        //   operNumber = row.operNumber - 0 //数量
+        //   allPrice = row.allPrice - 0
+        //   unitPrice = row.unitPrice - 0
+        //   taxRate = value - 0 //税率
+        //   taxMoney = (taxRate * 0.01 * allPrice).toFixed(2) - 0
+        //   taxLastMoney = (allPrice + taxMoney).toFixed(2) - 0
+        //   target.setValues([{ rowKey: row.id, values: { taxMoney: taxMoney, taxLastMoney: taxLastMoney } }])
+        //   target.recalcAllStatisticsColumns()
+        //   that.autoChangePrice(target)
+        //   break
+        // case 'taxLastMoney':
+        //   console.log('taxLastMoney---------')
+        //   operNumber = row.operNumber - 0 //数量
+        //   taxLastMoney = value - 0
+        //   taxRate = row.taxRate - 0 //税率
+        //   if (taxRate) {
+        //     unitPrice = (taxLastMoney / operNumber / (1 + taxRate * 0.01)).toFixed(2) - 0
+        //     allPrice = (unitPrice * operNumber).toFixed(2) - 0
+        //     taxMoney = (taxLastMoney - allPrice).toFixed(2) - 0
+        //   } else {
+        //     //税率为0的情况,特殊处理
+        //     allPrice = taxLastMoney
+        //     unitPrice = (allPrice / operNumber).toFixed(2) - 0 //单价
+        //     taxMoney = 0
+        //   }
+        //   target.setValues([
+        //     { rowKey: row.id, values: { unitPrice: unitPrice, allPrice: allPrice, taxMoney: taxMoney } },
+        //   ])
+        //   target.recalcAllStatisticsColumns()
+        //   that.autoChangePrice(target)
+        //   break
         case 'unit':
           // row.actualQuantityInStorage=
           if (row.unitId) {
@@ -804,22 +730,19 @@ export const BillModalMixin = {
     parseInfoToObj(mInfo) {
       return {
         barCode: mInfo.barCode,
-        batchNumber: mInfo.batchNumber,
         name: mInfo.name,
         standard: mInfo.standard,
         model: mInfo.model,
         color: mInfo.color,
         brand: mInfo.brand,
-        mfrs: mInfo.mfrs,
         materialOther: mInfo.materialOther,
         unit: mInfo.commodityUnit,
         sku: mInfo.sku,
         operNumber: 1,
-        unitPrice: mInfo.billPrice,
-        allPrice: mInfo.billPrice,
-        taxRate: 0,
-        taxMoney: 0,
-        taxLastMoney: mInfo.billPrice,
+        unitPrice: mInfo.billPrice * (mInfo.ratio||1), //单价
+        wholesaleDecimal:mInfo.defaultWholesaleDecimal, //销售价
+        defaultWholesaleDecimal: mInfo.defaultWholesaleDecimal, //默认销售价 不展示
+        defaultPurchaseDecimal: mInfo.defaultPurchaseDecimal, //默认采购价 不展示
 
         productionDate: mInfo.productionDate,
         expiryNum: mInfo.expiryNum,
@@ -833,6 +756,7 @@ export const BillModalMixin = {
         unitList: mInfo.unitList,
         depotId: mInfo.depotId,
         inventory: mInfo.inventory,
+        ratio: mInfo.ratio,
       }
     },
     //使得型号、颜色、扩展信息、sku等为隐藏
@@ -898,10 +822,10 @@ export const BillModalMixin = {
     },
     //改变优惠、本次付款、欠款的值
     autoChangePrice(target) {
-      let allTaxLastMoney = target.statisticsColumns.taxLastMoney - 0
-      let discount = this.form.getFieldValue('discount') - 0
+      let allTaxLastMoney = target.getStatisticsValue('taxLastMoney')||0
+      let discount = this.form.getFieldValue('discount') ? this.form.getFieldValue('discount') - 0 : 0
       let otherMoney = this.form.getFieldValue('otherMoney') ? this.form.getFieldValue('otherMoney') - 0 : 0
-      let deposit = this.form.getFieldValue('deposit')
+      let deposit = this.form.getFieldValue('deposit') ? this.form.getFieldValue('deposit') - 0 : 0
       let discountMoney = (discount * 0.01 * allTaxLastMoney).toFixed(2) - 0
       let discountLastMoney = (allTaxLastMoney - discountMoney).toFixed(2) - 0
       let changeAmountNew = (discountLastMoney + otherMoney).toFixed(2) - 0
@@ -915,7 +839,7 @@ export const BillModalMixin = {
           discountMoney: discountMoney,
           discountLastMoney: discountLastMoney,
           changeAmount: changeAmountNew,
-          debt: 0,
+          debt: (discountLastMoney + (otherMoney || 0) - deposit - changeAmountNew).toFixed(2),
         })
       })
     },
@@ -924,7 +848,7 @@ export const BillModalMixin = {
       const value = e.target.value - 0
       let otherMoney = this.form.getFieldValue('otherMoney') ? this.form.getFieldValue('otherMoney') - 0 : 0
       let deposit = this.form.getFieldValue('deposit')
-      let allTaxLastMoney = this.$refs.materialDataTable.statisticsColumns.taxLastMoney - 0
+      let allTaxLastMoney = this.$refs.materialDataTable.getStatisticsValue('taxLastMoney') - 0
       let discountMoneyNew = (allTaxLastMoney * value * 0.01).toFixed(2) - 0
       let discountLastMoneyNew = (allTaxLastMoney - discountMoneyNew).toFixed(2) - 0
       let changeAmountNew = (discountLastMoneyNew + otherMoney).toFixed(2) - 0
@@ -946,7 +870,7 @@ export const BillModalMixin = {
       const value = e.target.value - 0
       let otherMoney = this.form.getFieldValue('otherMoney') ? this.form.getFieldValue('otherMoney') - 0 : 0
       let deposit = this.form.getFieldValue('deposit')
-      let allTaxLastMoney = this.$refs.materialDataTable.statisticsColumns.taxLastMoney - 0
+      let allTaxLastMoney = this.$refs.materialDataTable.getStatisticsValue('taxLastMoney') - 0
       let discountNew = ((value / allTaxLastMoney) * 100).toFixed(2) - 0
       let discountLastMoneyNew = (allTaxLastMoney - value).toFixed(2) - 0
       let changeAmountNew = (discountLastMoneyNew + otherMoney).toFixed(2) - 0
@@ -1011,6 +935,7 @@ export const BillModalMixin = {
           return getListData(this.form, tables)
         })
         .then((allValues) => {
+          console.log(1233444,allValues)
           let detailArr = allValues.tablesValue[0].values
           let batchNumberStr = ''
           for (let detail of detailArr) {

+ 1 - 1
jshERP-web/src/views/bill/modules/AllocationOutModal.vue

@@ -308,7 +308,7 @@ export default {
     //调用完edit()方法之后会自动调用此方法
     editAfter() {
       this.billStatus = '0'
-      this.currentSelectDepotId = ''
+      
       this.changeColumnHide()
       this.changeFormTypes(this.materialTable.columns, 'snList', 0)
       // this.changeFormTypes(this.materialTable.columns, 'batchNumber', 0)

+ 1 - 1
jshERP-web/src/views/bill/modules/AssembleModal.vue

@@ -222,7 +222,7 @@ export default {
     //调用完edit()方法之后会自动调用此方法
     editAfter() {
       this.billStatus = '0'
-      this.currentSelectDepotId = ''
+      
       this.changeColumnHide()
       if (this.action === 'add') {
         this.addInit(this.prefixNo)

+ 1 - 1
jshERP-web/src/views/bill/modules/DisassembleModal.vue

@@ -222,7 +222,7 @@ export default {
     //调用完edit()方法之后会自动调用此方法
     editAfter() {
       this.billStatus = '0'
-      this.currentSelectDepotId = ''
+      
       this.changeColumnHide()
       if (this.action === 'add') {
         this.addInit(this.prefixNo)

+ 56 - 39
jshERP-web/src/views/bill/modules/OtherInModal.vue

@@ -33,6 +33,7 @@
                 :dropdownMatchSelectWidth="false"
                 showSearch
                 optionFilterProp="children"
+                @change="getTatRate"
               >
                 <div slot="dropdownRender" slot-scope="menu">
                   <v-nodes :vnodes="menu" />
@@ -64,6 +65,28 @@
           </a-col>
           <a-col :lg="6" :md="12" :sm="24">
             <a-form-item
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              label="仓库名"
+            >
+              <a-select v-decorator="['depotId',validatorRules.depotId]" placeholder="请选择仓库名" @change="changeDepot($event,refKeys[0])">
+                <a-select-option v-for="(item, index) in depotList" :key="index" :value="item.id">
+                  {{ item.depotName }}
+                </a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
+          <a-col :lg="6" :md="12" :sm="24">
+            <a-form-item
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              label="税率"
+            >
+              <a-input placeholder="自动带出" disabled v-decorator="['taxRate']" />
+            </a-form-item>
+          </a-col>
+          <a-col :lg="6" :md="12" :sm="24">
+            <a-form-item
               v-if="inOutManageFlag && !model.billType"
               :labelCol="labelCol"
               :wrapperCol="wrapperCol"
@@ -123,15 +146,31 @@
               <a-button icon="import" @click="onImport(prefixNo)">导入明细</a-button>
             </a-row>
           </template>
-          <template #depotBatchSet>
-            <a-icon type="down" @click="handleBatchSetDepot" />
+          <template #depotId="{ value }">
+            <a-select
+              disabled
+              :value="value"
+              :options="depotList"
+            >
+            </a-select>
+          </template>
+          <template #wholesaleDecimal="{ handleChange, value, index }">
+            <a-input :value="value" @change="($event) => onChangePrice($event,handleChange)">
+              <a-tooltip slot="suffix" title="修改后和默认价格不一致">
+                <a-icon type="info-circle" style="color: #f5222d" v-show="getDefaultWholesaleDecimal(index,'defaultWholesaleDecimal')!=value" />
+              </a-tooltip>
+            </a-input>
           </template>
-          <template #depotAdd>
-            <a-divider v-if="quickBtn.depot" style="margin: 4px 0" />
-            <div v-if="quickBtn.depot" style="padding: 4px 8px; cursor: pointer" @click="addDepot">
-              <a-icon type="plus" /> 新增仓库
-            </div>
+          <template #unitPrice="{ handleChange, value, index }">
+            <a-input :value="value" @change="($event) => onChangePrice($event,handleChange)">
+              <a-tooltip slot="suffix" title="修改后和默认价格不一致">
+                <a-icon type="info-circle" style="color: #f5222d" v-show="getDefaultWholesaleDecimal(index,'defaultPurchaseDecimal')!=value" />
+              </a-tooltip>
+            </a-input>
           </template>
+          <!-- <template #depotBatchSet>
+            <a-icon type="down" @click="handleBatchSetDepot" />
+          </template> -->
           <template #unit="{ handleChange, handleFocus, value }">
             <a-select
               placeholder="请选择"
@@ -270,18 +309,6 @@ export default {
         loading: false,
         dataSource: [],
         columns: [
-          // {
-          //   title: '仓库名称',
-          //   key: 'depotId',
-          //   width: '8%',
-          //   type: FormTypes.select,
-          //   placeholder: '请选择${title}',
-          //   options: [],
-          //   allowSearch: true,
-          //   disabled: true,
-          //   validateRules: [{ required: true, message: '${title}不能为空' }],
-          // },
-          // { title: '批次号', key: 'batchNumber', width: '9%', type: FormTypes.normal },
           {
             title: '商品条码',
             key: 'barCode',
@@ -292,8 +319,6 @@ export default {
             validateRules: [{ required: true, message: '${title}不能为空' }],
           },
           { title: '名称', key: 'name', width: '120px', type: FormTypes.normal },
-          // { title: '规格', key: 'standard', width: '9%', type: FormTypes.normal },
-
           {
             title: '生产日期',
             key: 'productionDate',
@@ -301,9 +326,8 @@ export default {
             type: FormTypes.datetime,
             validateRules: [{ required: true, message: '${title}不能为空' }],
           },
-          { title: '保质期', key: 'expiryNum', width: '120px', type: FormTypes.inputNumber },
-          // { title: '商品条码', key: 'barCode', width: '9%', type: FormTypes.normal },
-          { title: '仓库名', key: 'depotId', width: '120px', type: FormTypes.select,validateRules: [{ required: true, message: '${title}不能为空' }], },
+          { title: '保质期', key: 'expiryNum', width: '120px', type: FormTypes.normal },
+          { title: '仓库名', key: 'depotId', width: '120px', type: FormTypes.slot},
           { title: '仓库货架', key: 'position', width: '120px', type: FormTypes.input },
           { title: '包装规格', key: 'unitName', width: '120px', type: FormTypes.normal },
 
@@ -318,15 +342,12 @@ export default {
             key: 'unit',
             width: '120px',
             type: FormTypes.normal,
-            // options: [],
-            // allowClear: false,
-            // slotName: 'unit',
           },
           {
             title: '销售价',
             key: 'wholesaleDecimal',
             width: '120px',
-            type: FormTypes.input,
+            type: FormTypes.slot,
             validateRules: [{ required: true, message: '${title}不能为空' }],
           },
           { title: '单位id', key: 'unitId', width: '120px', type: FormTypes.hidden },
@@ -344,15 +365,8 @@ export default {
             statistics: true,
             validateRules: [{ required: true, message: '${title}不能为空' }],
           },
-          { title: '单价', key: 'unitPrice', width: '120px', type: FormTypes.inputNumber,validateRules: [{ required: true, message: '${title}不能为空' }], },
-          { title: '金额', key: 'allPrice', width: '120px', type: FormTypes.inputNumber, statistics: true },
-          // {
-          //   title: '实际入库数量',
-          //   key: 'actualQuantityInStorage',
-          //   width: '120px',
-          //   type: FormTypes.inputNumber,
-          //   validateRules: [{ required: true, message: '实际入库数量不能为空' }],
-          // },
+          { title: '单价', key: 'unitPrice', width: '120px', type: FormTypes.slot,validateRules: [{ required: true, message: '${title}不能为空' }], },
+          { title: '金额', key: 'allPrice', width: '120px', type: FormTypes.inputNumber,readonly: true, statistics: true },
           { title: '入库差异', key: 'warehousingVariance', width: '120px', type: FormTypes.input },
           { title: '入库差异原因', key: 'reasonOfDifference', width: '120px', type: FormTypes.input },
           {
@@ -379,6 +393,9 @@ export default {
         type: {
           rules: [{ required: true, message: '请选择类型!' }],
         },
+        depotId: {
+          rules: [{ required: true, message: '请选择仓库名!' }],
+        },
       },
       url: {
         add: '/depotHead/addDepotHeadAndDetail',
@@ -393,7 +410,6 @@ export default {
     //调用完edit()方法之后会自动调用此方法
     editAfter() {
       this.billStatus = '0'
-      this.currentSelectDepotId = ''
       this.rowCanEdit = true
       this.materialTable.columns[0].type = FormTypes.popupJsh
       this.changeColumnHide()
@@ -429,7 +445,8 @@ export default {
               'discountLastMoney',
               'otherMoney',
               'accountId',
-              'changeAmount'
+              'changeAmount',
+              'depotId'
             )
           )
         })

+ 66 - 18
jshERP-web/src/views/bill/modules/OtherOutModal.vue

@@ -33,7 +33,7 @@
                 :dropdownMatchSelectWidth="false"
                 showSearch
                 optionFilterProp="children"
-                @change="handleOrganChange"
+                @change="getTatRate"
               >
                 <div slot="dropdownRender" slot-scope="menu">
                   <v-nodes :vnodes="menu" />
@@ -65,6 +65,28 @@
           </a-col>
           <a-col :lg="6" :md="12" :sm="24">
             <a-form-item
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              label="仓库名"
+            >
+              <a-select v-decorator="['depotId',validatorRules.depotId]" placeholder="请选择仓库名" @change="changeDepot($event,refKeys[0])">
+                <a-select-option v-for="(item, index) in depotList" :key="index" :value="item.id">
+                  {{ item.depotName }}
+                </a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
+          <a-col :lg="6" :md="12" :sm="24">
+            <a-form-item
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              label="税率"
+            >
+              <a-input placeholder="自动带出" disabled v-decorator="['taxRate']" />
+            </a-form-item>
+          </a-col>
+          <a-col :lg="6" :md="12" :sm="24">
+            <a-form-item
               v-if="inOutManageFlag && !model.billType"
               :labelCol="labelCol"
               :wrapperCol="wrapperCol"
@@ -124,15 +146,37 @@
               <a-button icon="import" @click="onImport(prefixNo)">导入明细</a-button>
             </a-row>
           </template>
-          <template #depotBatchSet>
-            <a-icon type="down" @click="handleBatchSetDepot" />
+          <template #depotId="{ value }">
+            <a-select
+              disabled
+              :value="value"
+              :options="depotList"
+            >
+            </a-select>
+          </template>
+          <template #wholesaleDecimal="{ handleChange, value, index }">
+            <a-input :value="value" @change="($event) => onChangePrice($event,handleChange)">
+              <a-tooltip slot="suffix" title="修改后和默认价格不一致">
+                <a-icon type="info-circle" style="color: #f5222d" v-show="getDefaultWholesaleDecimal(index,'defaultWholesaleDecimal')!=value" />
+              </a-tooltip>
+            </a-input>
           </template>
-          <template #depotAdd>
+          <template #unitPrice="{ handleChange, value, index }">
+            <a-input :value="value" @change="($event) => onChangePrice($event,handleChange)">
+              <a-tooltip slot="suffix" title="修改后和默认价格不一致">
+                <a-icon type="info-circle" style="color: #f5222d" v-show="getDefaultWholesaleDecimal(index,'defaultPurchaseDecimal')!=value" />
+              </a-tooltip>
+            </a-input>
+          </template>
+          <!-- <template #depotBatchSet>
+            <a-icon type="down" @click="handleBatchSetDepot" />
+          </template> -->
+          <!-- <template #depotAdd>
             <a-divider v-if="quickBtn.depot" style="margin: 4px 0" />
             <div v-if="quickBtn.depot" style="padding: 4px 8px; cursor: pointer" @click="addDepot">
               <a-icon type="plus" /> 新增仓库
             </div>
-          </template>
+          </template> -->
           <template #unit="{ handleChange, handleFocus, value }">
             <a-select
               placeholder="请选择"
@@ -298,7 +342,7 @@ export default {
           // { title: '生产日期', key: 'productionDate', width: '200px', type: FormTypes.normal, disabled: true },
           // { title: '保质期', key: 'expiryNum', width: '120px', type: FormTypes.normal },
           // { title: '商品条码', key: 'barCode', width: '9%', type: FormTypes.normal },
-          { title: '仓库名', key: 'depotId', width: '120px', type: FormTypes.select,validateRules: [{ required: true, message: '${title}不能为空' }], },
+          { title: '仓库名', key: 'depotId', width: '120px', type: FormTypes.slot,validateRules: [{ required: true, message: '${title}不能为空' }], },
           { title: '仓库货架', key: 'position', width: '120px', type: FormTypes.input },
           { title: '包装规格', key: 'unitName', width: '120px', type: FormTypes.normal },
 
@@ -317,7 +361,7 @@ export default {
             // allowClear: false,
             // slotName: 'unit',
           },
-          { title: '销售价', key: 'wholesaleDecimal', width: '120px', type: FormTypes.input },
+          { title: '销售价', key: 'wholesaleDecimal', width: '120px', type: FormTypes.slot,validateRules: [{ required: true, message: '${title}不能为空' }] },
           { title: '单位id', key: 'unitId', width: '120px', type: FormTypes.hidden },
           { title: '单位列表', key: 'unitList', width: '120px', type: FormTypes.hidden },
           { title: '序列号', key: 'snList', width: '120px', type: FormTypes.popupJsh, kind: 'sn', multi: true },
@@ -333,15 +377,15 @@ export default {
             statistics: true,
             validateRules: [{ required: true, message: '${title}不能为空' }],
           },
-          { title: '单价', key: 'unitPrice', width: '120px', type: FormTypes.inputNumber,validateRules: [{ required: true, message: '${title}不能为空' }], },
-          { title: '金额', key: 'allPrice', width: '120px', type: FormTypes.inputNumber, statistics: true },
-          {
-            title: '实际出库数量',
-            key: 'actualQuantityInStorage',
-            width: '120px',
-            type: FormTypes.inputNumber,
-            validateRules: [{ required: true, message: '实际入库数量不能为空' }],
-          },
+          { title: '单价', key: 'unitPrice', width: '120px', type: FormTypes.slot,validateRules: [{ required: true, message: '${title}不能为空' }], },
+          { title: '金额', key: 'allPrice', width: '120px', type: FormTypes.inputNumber, readonly: true, statistics: true },
+          // {
+          //   title: '实际出库数量',
+          //   key: 'actualQuantityInStorage',
+          //   width: '120px',
+          //   type: FormTypes.inputNumber,
+          //   validateRules: [{ required: true, message: '实际入库数量不能为空' }],
+          // },
           { title: '出库差异', key: 'warehousingVariance', width: '120px', type: FormTypes.inputNumber },
           { title: '出库差异原因', key: 'reasonOfDifference', width: '120px', type: FormTypes.input },
           {
@@ -368,6 +412,9 @@ export default {
         type: {
           rules: [{ required: true, message: '请选择类型!' }],
         },
+        depotId: {
+          rules: [{ required: true, message: '请选择仓库名!' }],
+        },
       },
       url: {
         add: '/depotHead/addDepotHeadAndDetail',
@@ -382,7 +429,7 @@ export default {
     //调用完edit()方法之后会自动调用此方法
     editAfter() {
       this.billStatus = '0'
-      this.currentSelectDepotId = ''
+      
       this.rowCanEdit = true
       this.materialTable.columns[0].type = FormTypes.popupJsh
       this.changeColumnHide()
@@ -417,7 +464,8 @@ export default {
               'discountLastMoney',
               'otherMoney',
               'accountId',
-              'changeAmount'
+              'changeAmount',
+              'depotId'
             )
           )
         })

+ 1 - 1
jshERP-web/src/views/bill/modules/PurchaseApplyModal.vue

@@ -238,7 +238,7 @@ export default {
     //调用完edit()方法之后会自动调用此方法
     editAfter() {
       this.billStatus = '0'
-      this.currentSelectDepotId = ''
+      
       this.rowCanEdit = true
       this.changeColumnHide()
       if (this.action === 'add') {

+ 1 - 1
jshERP-web/src/views/bill/modules/PurchaseBackModal.vue

@@ -384,7 +384,7 @@ export default {
     //调用完edit()方法之后会自动调用此方法
     editAfter() {
       this.billStatus = '0'
-      this.currentSelectDepotId = ''
+      
       this.rowCanEdit = true
       this.materialTable.columns[1].type = FormTypes.popupJsh
       this.changeColumnHide()

+ 87 - 53
jshERP-web/src/views/bill/modules/PurchaseInModal.vue

@@ -41,6 +41,7 @@
                 :dropdownMatchSelectWidth="false"
                 showSearch
                 optionFilterProp="children"
+                @change="getTatRate"
               >
                 <div slot="dropdownRender" slot-scope="menu">
                   <v-nodes :vnodes="menu" />
@@ -95,6 +96,34 @@
               />
             </a-form-item>
           </a-col>
+          <a-col :lg="6" :md="12" :sm="24">
+            <a-form-item
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              label="仓库名"
+              data-step="4"
+              data-title=""
+              data-intro="仓库名"
+            >
+              <a-select v-decorator="['depotId',validatorRules.depotId]" placeholder="请选择仓库名" @change="changeDepot($event,refKeys[0])">
+                <a-select-option v-for="(item, index) in depotList" :key="index" :value="item.id">
+                  {{ item.depotName }}
+                </a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
+          <a-col :lg="6" :md="12" :sm="24">
+            <a-form-item
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              label="税率"
+              data-step="5"
+              data-title="税率"
+              data-intro="税率"
+            >
+              <a-input placeholder="自动带出" disabled v-decorator="['taxRate']" />
+            </a-form-item>
+          </a-col>
         </a-row>
         <j-editable-table
           id="billModal"
@@ -148,15 +177,15 @@
               <a-button icon="import" @click="onImport(prefixNo)">导入明细</a-button>
             </a-row>
           </template>
-          <template #depotBatchSet>
+          <!-- <template #depotBatchSet>
             <a-icon type="down" @click="handleBatchSetDepot" />
-          </template>
-          <template #depotAdd>
+          </template> -->
+          <!-- <template #depotAdd>
             <a-divider v-if="quickBtn.depot" style="margin: 4px 0" />
             <div v-if="quickBtn.depot" style="padding: 4px 8px; cursor: pointer" @click="addDepot">
               <a-icon type="plus" /> 新增仓库
             </div>
-          </template>
+          </template> -->
           <template #unit="{ handleChange, handleFocus, value }">
             <a-select
               placeholder="请选择"
@@ -188,6 +217,28 @@
             >
             </a-select>
           </template>
+          <template #depotId="{ value }">
+            <a-select
+              disabled
+              :value="value"
+              :options="depotList"
+            >
+            </a-select>
+          </template>
+          <template #wholesaleDecimal="{ handleChange, value, index }">
+            <a-input :value="value" @change="($event) => onChangePrice($event,handleChange)">
+              <a-tooltip slot="suffix" title="修改后和默认价格不一致">
+                <a-icon type="info-circle" style="color: #f5222d" v-show="getDefaultWholesaleDecimal(index,'defaultWholesaleDecimal')!=value" />
+              </a-tooltip>
+            </a-input>
+          </template>
+          <template #unitPrice="{ handleChange, value, index }">
+            <a-input :value="value" @change="($event) => onChangePrice($event,handleChange)">
+              <a-tooltip slot="suffix" title="修改后和默认价格不一致">
+                <a-icon type="info-circle" style="color: #f5222d" v-show="getDefaultWholesaleDecimal(index,'defaultPurchaseDecimal')!=value" />
+              </a-tooltip>
+            </a-input>
+          </template>
         </j-editable-table>
         <a-row class="form-row" :gutter="24">
           <a-col :lg="24" :md="24" :sm="24">
@@ -449,17 +500,6 @@ export default {
         loading: false,
         dataSource: [],
         columns: [
-          // {
-          //   title: '仓库名称',
-          //   key: 'depotId',
-          //   width: '8%',
-          //   type: FormTypes.select,
-          //   placeholder: '请选择${title}',
-          //   options: [],
-          //   allowSearch: true,
-          //   disabled: true,
-          //   validateRules: [{ required: true, message: '${title}不能为空' }],
-          // },
           {
             title: '商品条码',
             key: 'barCode',
@@ -481,9 +521,8 @@ export default {
             type: FormTypes.datetime,
             validateRules: [{ required: true, message: '${title}不能为空' }],
           },
-          { title: '保质期', key: 'expiryNum', width: '120px', type: FormTypes.inputNumber },
-          // { title: '商品条码', key: 'barCode', width: '9%', type: FormTypes.normal },
-          { title: '仓库名', key: 'depotId', width: '120px', type: FormTypes.select,validateRules: [{ required: true, message: '${title}不能为空' }], },
+          { title: '保质期', key: 'expiryNum', width: '120px', type: FormTypes.normal },
+          { title: '仓库名', key: 'depotId', width: '120px', type: FormTypes.slot},
           { title: '仓库货架', key: 'position', width: '120px', type: FormTypes.input },
           { title: '包装规格', key: 'unitName', width: '120px', type: FormTypes.normal },
 
@@ -498,15 +537,12 @@ export default {
             key: 'unit',
             width: '120px',
             type: FormTypes.normal,
-            // options: [],
-            // allowClear: false,
-            // slotName: 'unit',
           },
           {
             title: '销售价',
             key: 'wholesaleDecimal',
             width: '120px',
-            type: FormTypes.input,
+            type: FormTypes.slot,
             validateRules: [{ required: true, message: '${title}不能为空' }],
           },
           { title: '单位id', key: 'unitId', width: '120px', type: FormTypes.hidden },
@@ -524,9 +560,9 @@ export default {
             statistics: true,
             validateRules: [{ required: true, message: '${title}不能为空' }],
           },
-          { title: '单价', key: 'unitPrice', width: '120px', type: FormTypes.inputNumber,validateRules: [{ required: true, message: '${title}不能为空' }], },
-          { title: '金额', key: 'allPrice', width: '120px', type: FormTypes.inputNumber, statistics: true },
-          { title: '税率', key: 'taxRate', width: '120px', type: FormTypes.inputNumber, placeholder: '%' },
+          { title: '单价', key: 'unitPrice', width: '120px', type: FormTypes.slot,validateRules: [{ required: true, message: '${title}不能为空' }], },
+          { title: '金额', key: 'allPrice', width: '120px', type: FormTypes.inputNumber, readonly: true, statistics: true },
+          { title: '税率', key: 'taxRate', width: '120px', type: FormTypes.hidden, placeholder: '%' },
           {
             title: '税额',
             key: 'taxMoney',
@@ -535,15 +571,8 @@ export default {
             readonly: true,
             statistics: true,
           },
-          { title: '价税合计', key: 'taxLastMoney', width: '120px', type: FormTypes.inputNumber, statistics: true },
+          { title: '价税合计', key: 'taxLastMoney', width: '120px', type: FormTypes.inputNumber,readonly: true, statistics: true },
 
-          // {
-          //   title: '实际入库数量',
-          //   key: 'actualQuantityInStorage',
-          //   width: '120px',
-          //   type: FormTypes.inputNumber,
-          //   validateRules: [{ required: true, message: '实际入库数量不能为空' }],
-          // },
           { title: '入库差异', key: 'warehousingVariance', width: '120px', type: FormTypes.inputNumber },
           { title: '入库差异原因', key: 'reasonOfDifference', width: '120px', type: FormTypes.input },
           {
@@ -557,7 +586,7 @@ export default {
           { title: '入库时间', key: 'warehousingTime', width: '200px', type: FormTypes.date },
 
           { title: '备注', key: 'remark', width: '200px', type: FormTypes.input },
-          { title: '关联id', key: 'linkId', width: '120px', type: FormTypes.hidden },
+          // { title: '关联id', key: 'linkId', width: '120px', type: FormTypes.hidden },
         ],
       },
       confirmLoading: false,
@@ -577,6 +606,9 @@ export default {
             { pattern: /^(([0-9][0-9]*)|([0]\.\d{0,4}|[0-9][0-9]*\.\d{0,4}))$/, message: '金额格式不正确!' },
           ],
         },
+        depotId: {
+          rules: [{ required: true, message: '请选择仓库名!' }],
+        },
       },
       url: {
         add: '/depotHead/addDepotHeadAndDetail',
@@ -591,8 +623,8 @@ export default {
   methods: {
     //调用完edit()方法之后会自动调用此方法
     editAfter() {
+      console.log('this.model======',this.model)
       this.billStatus = '0'
-      this.currentSelectDepotId = ''
       this.rowCanEdit = true
       this.materialTable.columns[0].type = FormTypes.popupJsh
       this.changeColumnHide()
@@ -654,7 +686,8 @@ export default {
               'accountId',
               'deposit',
               'changeAmount',
-              'debt'
+              'debt',
+              'depotId'
             )
           )
         })
@@ -730,9 +763,9 @@ export default {
     linkBillListOk(selectBillDetailRows, linkNumber, organId, discountMoney, deposit, remark, depotId, accountId) {
       let that = this
       this.rowCanEdit = false
-      this.materialTable.columns[1].type = FormTypes.normal
-      this.changeFormTypes(this.materialTable.columns, 'preNumber', 1)
-      this.changeFormTypes(this.materialTable.columns, 'finishNumber', 1)
+      // this.changeFormTypes(this.materialTable.columns, 'preNumber', 1)
+      // this.changeFormTypes(this.materialTable.columns, 'finishNumber', 1)
+      console.log('selectBillDetailRows', selectBillDetailRows)
       if (selectBillDetailRows && selectBillDetailRows.length > 0) {
         let listEx = []
         let allTaxLastMoney = 0
@@ -764,24 +797,25 @@ export default {
           this.depositStatus = true
           changeAmount = (discountLastMoney - deposit).toFixed(2) - 0
         }
+        this.form.setFieldsValue({
+          organId: organId,
+          linkNumber: linkNumber,
+          discount: discount,
+          discountMoney: discountMoney,
+          discountLastMoney: discountLastMoney,
+          deposit: deposit,
+          changeAmount: changeAmount,
+          accountId: accountId,
+          remark: remark,
+          depotId: depotId,
+        })
         this.$nextTick(() => {
-          this.form.setFieldsValue({
-            organId: organId,
-            linkNumber: linkNumber,
-            discount: discount,
-            discountMoney: discountMoney,
-            discountLastMoney: discountLastMoney,
-            deposit: deposit,
-            changeAmount: changeAmount,
-            accountId: accountId,
-            remark: remark,
-          })
+          console.log('discount===',this.form.getFieldValue('discount'))
+          this.getTatRate(organId)
         })
         //判断后进行仓库的切换
         if (depotId) {
-          setTimeout(function () {
-            that.batchSetDepotModalFormOk(depotId)
-          }, 1000)
+          this.changeDepot(depotId, this.refKeys[0])
         }
       }
     },

+ 65 - 34
jshERP-web/src/views/bill/modules/PurchaseOrderModal.vue

@@ -40,6 +40,7 @@
                 :dropdownMatchSelectWidth="false"
                 showSearch
                 optionFilterProp="children"
+                @change="getTatRate"
               >
                 <div slot="dropdownRender" slot-scope="menu">
                   <v-nodes :vnodes="menu" />
@@ -96,11 +97,39 @@
           </a-col>
           <a-col :lg="6" :md="12" :sm="24">
             <a-form-item
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              label="仓库名"
+              data-step="4"
+              data-title="仓库名"
+              data-intro="仓库名"
+            >
+              <a-select v-decorator="['depotId',validatorRules.depotId]" placeholder="请选择仓库名" @change="changeDepot($event,refKeys[0])">
+                <a-select-option v-for="(item, index) in depotList" :key="index" :value="item.id">
+                  {{ item.depotName }}
+                </a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
+          <a-col :lg="6" :md="12" :sm="24">
+            <a-form-item
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              label="税率"
+              data-step="5"
+              data-title="税率"
+              data-intro="税率"
+            >
+              <a-input placeholder="自动带出" disabled v-decorator="['taxRate']" />
+            </a-form-item>
+          </a-col>
+          <a-col :lg="6" :md="12" :sm="24">
+            <a-form-item
               v-if="purchaseBySaleFlag"
               :labelCol="labelCol"
               :wrapperCol="wrapperCol"
               label="关联订单"
-              data-step="3"
+              data-step="5"
               data-title="关联订单"
               data-intro="采购订单单据可以通过关联订单来选择已录入的销售订单,选择之后会自动加载订单的内容,
               提交之后原来的销售订单会对应的改变单据状态。另外本系统支持分批多次关联"
@@ -165,6 +194,28 @@
               <a-button icon="import" @click="onImport(prefixNo)">导入明细</a-button>
             </a-row>
           </template>
+          <template #depotId="{ value }">
+            <a-select
+              disabled
+              :value="value"
+              :options="depotList"
+            >
+            </a-select>
+          </template>
+          <template #wholesaleDecimal="{ handleChange, value, index }">
+            <a-input :value="value" @change="($event) => onChangePrice($event,handleChange)">
+              <a-tooltip slot="suffix" title="修改后和默认价格不一致">
+                <a-icon type="info-circle" style="color: #f5222d" v-show="getDefaultWholesaleDecimal(index,'defaultWholesaleDecimal')!=value" />
+              </a-tooltip>
+            </a-input>
+          </template>
+          <template #unitPrice="{ handleChange, value, index }">
+            <a-input :value="value" @change="($event) => onChangePrice($event,handleChange)">
+              <a-tooltip slot="suffix" title="修改后和默认价格不一致">
+                <a-icon type="info-circle" style="color: #f5222d" v-show="getDefaultWholesaleDecimal(index,'defaultPurchaseDecimal')!=value" />
+              </a-tooltip>
+            </a-input>
+          </template>
           <!-- <template #unit="{ handleChange, handleFocus, value }">
             <a-select
               placeholder="请选择"
@@ -413,7 +464,6 @@ export default {
         sm: { span: 16 },
       },
       refKeys: ['materialDataTable'],
-      tableKeys: ['materialDataTable'],
       activeKey: 'materialDataTable',
       materialTable: {
         loading: false,
@@ -438,9 +488,8 @@ export default {
             type: FormTypes.datetime,
             validateRules: [{ required: true, message: '${title}不能为空' }],
           },
-          { title: '保质期', key: 'expiryNum', width: '120px', type: FormTypes.inputNumber },
-          // { title: '商品条码', key: 'barCode', width: '120px', type: FormTypes.normal },
-          { title: '仓库名', key: 'depotId', width: '120px', type: FormTypes.select,validateRules: [{ required: true, message: '${title}不能为空' }], },
+          { title: '保质期', key: 'expiryNum', width: '120px', type: FormTypes.normal },
+          { title: '仓库名', key: 'depotId', width: '120px', type: FormTypes.slot},
           { title: '仓库货架', key: 'position', width: '120px', type: FormTypes.input },
           { title: '包装规格', key: 'unitName', width: '120px', type: FormTypes.normal },
 
@@ -455,15 +504,12 @@ export default {
             key: 'unit',
             width: '120px',
             type: FormTypes.normal,
-            // options: [],
-            // allowClear: false,
-            // slotName: 'unit',
           },
           {
             title: '销售价',
             key: 'wholesaleDecimal',
             width: '120px',
-            type: FormTypes.input,
+            type: FormTypes.slot,
             validateRules: [{ required: true, message: '${title}不能为空' }],
           },
           { title: '单位id', key: 'unitId', width: '120px', type: FormTypes.hidden },
@@ -479,28 +525,9 @@ export default {
             statistics: true,
             validateRules: [{ required: true, message: '${title}不能为空' }],
           },
-          { title: '单价', key: 'unitPrice', width: '120px', type: FormTypes.inputNumber,validateRules: [{ required: true, message: '${title}不能为空' }], },
-          { title: '金额', key: 'allPrice', width: '120px', type: FormTypes.inputNumber, statistics: true },
-
-          // {
-          //   title: '实际入库数量',
-          //   key: 'actualQuantityInStorage',
-          //   width: '9%',
-          //   type: FormTypes.inputNumber,
-          //   validateRules: [{ required: true, message: '实际入库数量不能为空' }],
-          // },
-          // { title: '入库差异', key: 'warehousingVariance', width: '9%', type: FormTypes.input },
-          // { title: '入库差异原因', key: 'reasonOfDifference', width: '9%', type: FormTypes.input },
-          // {
-          //   title: '入库人',
-          //   key: 'warehousingUser',
-          //   width: '9%',
-          //   type: FormTypes.input,
-          //   validateRules: [{ required: true, message: '入库人不能为空' }],
-          // },
-          // { title: '入库时间', key: 'warehousingTime', width: '9%', type: FormTypes.date },
-
-          { title: '税率', key: 'taxRate', width: '120px', type: FormTypes.inputNumber, placeholder: '%' },
+          { title: '单价', key: 'unitPrice', width: '120px', type: FormTypes.slot,validateRules: [{ required: true, message: '${title}不能为空' }], },
+          { title: '金额', key: 'allPrice', width: '120px', type: FormTypes.inputNumber, readonly: true, statistics: true },
+          { title: '税率', key: 'taxRate', width: '120px', type: FormTypes.hidden, placeholder: '%' },
           {
             title: '税额',
             key: 'taxMoney',
@@ -509,7 +536,7 @@ export default {
             readonly: true,
             statistics: true,
           },
-          { title: '价税合计', key: 'taxLastMoney', width: '120px', type: FormTypes.inputNumber, statistics: true },
+          { title: '价税合计', key: 'taxLastMoney', width: '120px', type: FormTypes.inputNumber,readonly: true, statistics: true },
           { title: '备注', key: 'remark', width: '200px', type: FormTypes.input },
           { title: '关联id', key: 'linkId', width: '120px', type: FormTypes.hidden },
         ],
@@ -522,6 +549,9 @@ export default {
         organId: {
           rules: [{ required: true, message: '请选择供应商!' }],
         },
+        depotId: {
+          rules: [{ required: true, message: '请选择仓库名!' }],
+        },
       },
       url: {
         add: '/depotHead/addDepotHeadAndDetail',
@@ -536,8 +566,8 @@ export default {
   methods: {
     //调用完edit()方法之后会自动调用此方法
     editAfter() {
+      console.log('this.model======',this.model)
       this.billStatus = '0'
-      this.currentSelectDepotId = ''
       this.rowCanEdit = true
       // this.materialTable.columns[1].type = FormTypes.popupJsh
       this.changeColumnHide()
@@ -581,7 +611,8 @@ export default {
               'discountMoney',
               'discountLastMoney',
               'accountId',
-              'changeAmount'
+              'changeAmount',
+              'depotId'
             )
           )
         })

+ 1 - 1
jshERP-web/src/views/bill/modules/RetailBackModal.vue

@@ -351,7 +351,7 @@ export default {
     //调用完edit()方法之后会自动调用此方法
     editAfter() {
       this.billStatus = '0'
-      this.currentSelectDepotId = ''
+      
       this.rowCanEdit = true
       this.materialTable.columns[1].type = FormTypes.popupJsh
       this.changeColumnHide()

+ 1 - 1
jshERP-web/src/views/bill/modules/RetailOutModal.vue

@@ -397,7 +397,7 @@ export default {
     //调用完edit()方法之后会自动调用此方法
     editAfter() {
       this.billStatus = '0'
-      this.currentSelectDepotId = ''
+      
       this.changeColumnHide()
       this.changeFormTypes(this.materialTable.columns, 'snList', 0)
       this.changeFormTypes(this.materialTable.columns, 'batchNumber', 0)

+ 1 - 1
jshERP-web/src/views/bill/modules/SaleBackModal.vue

@@ -394,7 +394,7 @@ export default {
     //调用完edit()方法之后会自动调用此方法
     editAfter() {
       this.billStatus = '0'
-      this.currentSelectDepotId = ''
+      
       this.rowCanEdit = true
       this.materialTable.columns[1].type = FormTypes.popupJsh
       this.changeColumnHide()

+ 58 - 11
jshERP-web/src/views/bill/modules/SaleOrderModal.vue

@@ -41,7 +41,7 @@
                 :dropdownMatchSelectWidth="false"
                 showSearch
                 optionFilterProp="children"
-                @change="handleOrganChange"
+                @change="getTatRate"
               >
                 <div slot="dropdownRender" slot-scope="menu">
                   <v-nodes :vnodes="menu" />
@@ -94,6 +94,34 @@
               />
             </a-form-item>
           </a-col>
+          <a-col :lg="6" :md="12" :sm="24">
+            <a-form-item
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              label="仓库名"
+              data-step="4"
+              data-title=""
+              data-intro="仓库名"
+            >
+              <a-select v-decorator="['depotId',validatorRules.depotId]" placeholder="请选择仓库名" @change="changeDepot($event,refKeys[0])">
+                <a-select-option v-for="(item, index) in depotList" :key="index" :value="item.id">
+                  {{ item.depotName }}
+                </a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
+          <a-col :lg="6" :md="12" :sm="24">
+            <a-form-item
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              label="税率"
+              data-step="5"
+              data-title="税率"
+              data-intro="税率"
+            >
+              <a-input placeholder="自动带出" disabled v-decorator="['taxRate']" />
+            </a-form-item>
+          </a-col>
         </a-row>
         <j-editable-table
           id="billModal"
@@ -146,6 +174,21 @@
               <a-button icon="import" @click="onImport(prefixNo)">导入明细</a-button>
             </a-row>
           </template>
+          <template #depotId="{ value }">
+            <a-select
+              disabled
+              :value="value"
+              :options="depotList"
+            >
+            </a-select>
+          </template>
+          <template #unitPrice="{ handleChange, value, index }">
+            <a-input :value="value" @change="($event) => onChangePrice($event,handleChange)">
+              <a-tooltip slot="suffix" title="修改后和默认价格不一致">
+                <a-icon type="info-circle" style="color: #f5222d" v-show="getDefaultWholesaleDecimal(index,'defaultWholesaleDecimal')!=value" />
+              </a-tooltip>
+            </a-input>
+          </template>
           <!-- <template #unit="{ handleChange, handleFocus, value }">
             <a-select
               placeholder="请选择"
@@ -401,7 +444,7 @@ export default {
           // { title: '生产日期', key: 'productionDate', width: '6%', type: FormTypes.normal },
           // { title: '保质期', key: 'expiryNum', width: '6%', type: FormTypes.normal },
           // { title: '商品条码', key: 'barCode', width: '6%', type: FormTypes.normal },
-          { title: '仓库名', key: 'depotId', width: '120px', type: FormTypes.select,validateRules: [{ required: true, message: '${title}不能为空' }], },
+          { title: '仓库名', key: 'depotId', width: '120px', type: FormTypes.slot },
           { title: '仓库货架', key: 'position', width: '120px', type: FormTypes.input },
           { title: '包装规格', key: 'unitName', width: '120px', type: FormTypes.normal },
 
@@ -420,11 +463,11 @@ export default {
             // allowClear: false,
             // slotName: 'unit',
           },
-          { title: '单位id', key: 'unitId', width: '120px', type: FormTypes.hidden },
-          { title: '单位列表', key: 'unitList', width: '120px', type: FormTypes.hidden },
+          // { title: '单位id', key: 'unitId', width: '120px', type: FormTypes.hidden },
+          // { title: '单位列表', key: 'unitList', width: '120px', type: FormTypes.hidden },
           { title: '序列号', key: 'snList', width: '120px', type: FormTypes.popupJsh, kind: 'sn', multi: true },
           // { title: '有效期', key: 'expirationDate', width: '7%', type: FormTypes.input, readonly: true },
-          { title: '多属性', key: 'sku', width: '120px', type: FormTypes.normal },
+          // { title: '多属性', key: 'sku', width: '120px', type: FormTypes.normal },
           // { title: '原数量', key: 'preNumber', width: '4%', type: FormTypes.normal },
           // { title: '已出库', key: 'finishNumber', width: '4%', type: FormTypes.normal },
           {
@@ -435,9 +478,9 @@ export default {
             statistics: true,
             validateRules: [{ required: true, message: '${title}不能为空' }],
           },
-          { title: '单价', key: 'unitPrice', width: '120px', type: FormTypes.inputNumber,validateRules: [{ required: true, message: '${title}不能为空' }], },
-          { title: '金额', key: 'allPrice', width: '120px', type: FormTypes.inputNumber, statistics: true },
-          { title: '税率', key: 'taxRate', width: '120px', type: FormTypes.inputNumber, placeholder: '%' },
+          { title: '单价', key: 'unitPrice', width: '120px', type: FormTypes.slot,validateRules: [{ required: true, message: '${title}不能为空' }], },
+          { title: '金额', key: 'allPrice', width: '120px', type: FormTypes.inputNumber, readonly: true, statistics: true },
+          { title: '税率', key: 'taxRate', width: '120px', type: FormTypes.hidden, placeholder: '%' },
           {
             title: '税额',
             key: 'taxMoney',
@@ -446,7 +489,7 @@ export default {
             readonly: true,
             statistics: true,
           },
-          { title: '价税合计', key: 'taxLastMoney', width: '120px', type: FormTypes.inputNumber, statistics: true },
+          { title: '价税合计', key: 'taxLastMoney', width: '120px', type: FormTypes.inputNumber, readonly: true, statistics: true },
 
           // {
           //   title: '实际出库数量',
@@ -478,6 +521,9 @@ export default {
         organId: {
           rules: [{ required: true, message: '请选择客户!' }],
         },
+        depotId: {
+          rules: [{ required: true, message: '请选择仓库名!' }],
+        },
       },
       url: {
         add: '/depotHead/addDepotHeadAndDetail',
@@ -492,7 +538,7 @@ export default {
     //调用完edit()方法之后会自动调用此方法
     editAfter() {
       this.billStatus = '0'
-      this.currentSelectDepotId = ''
+      
       this.changeColumnHide()
       if (this.action === 'add') {
         this.addInit(this.prefixNo)
@@ -529,7 +575,8 @@ export default {
               'salesMan',
               'receiverName',
               'receiverPhone',
-              'receiverAddress'
+              'receiverAddress',
+              'depotId'
             )
           )
         })

+ 86 - 33
jshERP-web/src/views/bill/modules/SaleOutModal.vue

@@ -42,7 +42,7 @@
                 :dropdownMatchSelectWidth="false"
                 showSearch
                 optionFilterProp="children"
-                @change="handleOrganChange"
+                @change="getTatRate"
               >
                 <div slot="dropdownRender" slot-scope="menu">
                   <v-nodes :vnodes="menu" />
@@ -97,6 +97,34 @@
               />
             </a-form-item>
           </a-col>
+          <a-col :lg="6" :md="12" :sm="24">
+            <a-form-item
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              label="仓库名"
+              data-step="5"
+              data-title=""
+              data-intro="仓库名"
+            >
+              <a-select v-decorator="['depotId',validatorRules.depotId]" placeholder="请选择仓库名" @change="changeDepot($event,refKeys[0])">
+                <a-select-option v-for="(item, index) in depotList" :key="index" :value="item.id">
+                  {{ item.depotName }}
+                </a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
+          <a-col :lg="6" :md="12" :sm="24">
+            <a-form-item
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              label="税率"
+              data-step="5"
+              data-title="税率"
+              data-intro="税率"
+            >
+              <a-input placeholder="自动带出" disabled v-decorator="['taxRate']" />
+            </a-form-item>
+          </a-col>
         </a-row>
         <j-editable-table
           id="billModal"
@@ -150,15 +178,15 @@
               <a-button icon="import" @click="onImport(prefixNo)">导入明细</a-button>
             </a-row>
           </template>
-          <template #depotBatchSet>
+          <!-- <template #depotBatchSet>
             <a-icon type="down" @click="handleBatchSetDepot" />
-          </template>
-          <template #depotAdd>
+          </template> -->
+          <!-- <template #depotAdd>
             <a-divider v-if="quickBtn.depot" style="margin: 4px 0" />
             <div v-if="quickBtn.depot" style="padding: 4px 8px; cursor: pointer" @click="addDepot">
               <a-icon type="plus" /> 新增仓库
             </div>
-          </template>
+          </template> -->
           <template #unit="{ handleChange, handleFocus, value }">
             <a-select
               placeholder="请选择"
@@ -190,6 +218,28 @@
             >
             </a-select>
           </template>
+          <template #depotId="{ value }">
+            <a-select
+              disabled
+              :value="value"
+              :options="depotList"
+            >
+            </a-select>
+          </template>
+          <!-- <template #wholesaleDecimal="{ handleChange, value, index }">
+            <a-input :value="value" @change="($event) => onChangePrice($event,handleChange)">
+              <a-tooltip slot="suffix" title="修改后和默认价格不一致">
+                <a-icon type="info-circle" style="color: #f5222d" v-show="getDefaultWholesaleDecimal(index,'defaultWholesaleDecimal')!=value" />
+              </a-tooltip>
+            </a-input>
+          </template> -->
+          <template #unitPrice="{ handleChange, value, index }">
+            <a-input :value="value" @change="($event) => onChangePrice($event,handleChange)">
+              <a-tooltip slot="suffix" title="修改后和默认价格不一致">
+                <a-icon type="info-circle" style="color: #f5222d" v-show="getDefaultWholesaleDecimal(index,'defaultWholesaleDecimal')!=value" />
+              </a-tooltip>
+            </a-input>
+          </template>
         </j-editable-table>
         <a-row class="form-row" :gutter="24">
           <a-col :lg="24" :md="24" :sm="24">
@@ -502,7 +552,7 @@ export default {
           // { title: '生产日期', key: 'productionDate', width: '9%', type: FormTypes.normal, disabled: true },
           // { title: '保质期', key: 'expiryNum', width: '6%', type: FormTypes.normal },
           // { title: '商品条码', key: 'barCode', width: '9%', type: FormTypes.normal },
-          { title: '仓库名', key: 'depotId', width: '120px', type: FormTypes.select,validateRules: [{ required: true, message: '${title}不能为空' }], },
+          { title: '仓库名', key: 'depotId', width: '120px', type: FormTypes.slot },
           { title: '仓库货架', key: 'position', width: '120px', type: FormTypes.input },
           { title: '包装规格', key: 'unitName', width: '120px', type: FormTypes.normal },
 
@@ -536,9 +586,9 @@ export default {
             statistics: true,
             validateRules: [{ required: true, message: '${title}不能为空' }],
           },
-          { title: '单价', key: 'unitPrice', width: '120px', type: FormTypes.inputNumber,validateRules: [{ required: true, message: '${title}不能为空' }], },
-          { title: '金额', key: 'allPrice', width: '120px', type: FormTypes.inputNumber, statistics: true },
-          { title: '税率', key: 'taxRate', width: '120px', type: FormTypes.inputNumber, placeholder: '%' },
+          { title: '单价', key: 'unitPrice', width: '120px', type: FormTypes.slot,validateRules: [{ required: true, message: '${title}不能为空' }], },
+          { title: '金额', key: 'allPrice', width: '120px', type: FormTypes.inputNumber,readonly: true, statistics: true },
+          { title: '税率', key: 'taxRate', width: '120px', type: FormTypes.hidden, placeholder: '%' },
           {
             title: '税额',
             key: 'taxMoney',
@@ -547,7 +597,7 @@ export default {
             readonly: true,
             statistics: true,
           },
-          { title: '价税合计', key: 'taxLastMoney', width: '120px', type: FormTypes.inputNumber, statistics: true },
+          { title: '价税合计', key: 'taxLastMoney', width: '120px', type: FormTypes.inputNumber, readonly: true, statistics: true },
 
           // {
           //   title: '实际出库数量',
@@ -589,6 +639,9 @@ export default {
             { pattern: /^(([0-9][0-9]*)|([0]\.\d{0,4}|[0-9][0-9]*\.\d{0,4}))$/, message: '金额格式不正确!' },
           ],
         },
+        depotId: {
+          rules: [{ required: true, message: '请选择仓库名!' }],
+        },
       },
       url: {
         add: '/depotHead/addDepotHeadAndDetail',
@@ -603,7 +656,6 @@ export default {
     //调用完edit()方法之后会自动调用此方法
     editAfter() {
       this.billStatus = '0'
-      this.currentSelectDepotId = ''
       this.rowCanEdit = true
       this.materialTable.columns[0].type = FormTypes.popupJsh
       this.changeColumnHide()
@@ -672,7 +724,8 @@ export default {
               'salesMan',
               'receiverName',
               'receiverPhone',
-              'receiverAddress'
+              'receiverAddress',
+              'depotId'
             )
           )
         })
@@ -760,9 +813,9 @@ export default {
     ) {
       let that = this
       this.rowCanEdit = false
-      this.materialTable.columns[1].type = FormTypes.normal
-      this.changeFormTypes(this.materialTable.columns, 'preNumber', 1)
-      this.changeFormTypes(this.materialTable.columns, 'finishNumber', 1)
+      // this.materialTable.columns[1].type = FormTypes.normal
+      // this.changeFormTypes(this.materialTable.columns, 'preNumber', 1)
+      // this.changeFormTypes(this.materialTable.columns, 'finishNumber', 1)
       if (selectBillDetailRows && selectBillDetailRows.length > 0) {
         let listEx = []
         let allTaxLastMoney = 0
@@ -793,28 +846,28 @@ export default {
           this.depositStatus = true
           changeAmount = (discountLastMoney - deposit).toFixed(2) - 0
         }
+        this.form.setFieldsValue({
+          organId: organId,
+          linkNumber: linkNumber,
+          discount: discount,
+          discountMoney: discountMoney,
+          discountLastMoney: discountLastMoney,
+          deposit: deposit,
+          changeAmount: changeAmount,
+          accountId: accountId,
+          remark: remark,
+          receiverName,
+          receiverPhone,
+          receiverAddress,
+        })
+        this.personList.value = salesMan
         this.$nextTick(() => {
-          this.form.setFieldsValue({
-            organId: organId,
-            linkNumber: linkNumber,
-            discount: discount,
-            discountMoney: discountMoney,
-            discountLastMoney: discountLastMoney,
-            deposit: deposit,
-            changeAmount: changeAmount,
-            accountId: accountId,
-            remark: remark,
-            receiverName,
-            receiverPhone,
-            receiverAddress,
-          })
-          this.personList.value = salesMan
+          console.log('discount===',this.form.getFieldValue('discount'))
+          this.getTatRate(organId)
         })
         //判断后进行仓库的切换
         if (depotId) {
-          setTimeout(function () {
-            that.batchSetDepotModalFormOk(depotId)
-          }, 1000)
+          this.changeDepot(depotId, this.refKeys[0])
         }
       }
     },

+ 2 - 2
jshERP-web/src/views/financial/AdvanceInList.vue

@@ -102,12 +102,12 @@
         <div class="table-operator" style="margin-top: 5px">
           <a-button v-if="btnEnableList.indexOf(1) > -1" @click="myHandleAdd" type="primary" icon="plus">新增</a-button>
           <a-button v-if="btnEnableList.indexOf(1) > -1" icon="delete" @click="batchDel">删除</a-button>
-          <a-button v-if="checkFlag && btnEnableList.indexOf(2) > -1" icon="check" @click="batchSetStatus(1)"
+          <!-- <a-button v-if="checkFlag && btnEnableList.indexOf(2) > -1" icon="check" @click="batchSetStatus(1)"
             >审核</a-button
           >
           <a-button v-if="checkFlag && btnEnableList.indexOf(7) > -1" icon="stop" @click="batchSetStatus(0)"
             >反审核</a-button
-          >
+          > -->
           <a-button v-if="isShowExcel && btnEnableList.indexOf(3) > -1" icon="download" @click="handleExport"
             >导出</a-button
           >

+ 2 - 2
jshERP-web/src/views/financial/GiroList.vue

@@ -102,12 +102,12 @@
         <div class="table-operator" style="margin-top: 5px">
           <a-button v-if="btnEnableList.indexOf(1) > -1" @click="myHandleAdd" type="primary" icon="plus">新增</a-button>
           <a-button v-if="btnEnableList.indexOf(1) > -1" icon="delete" @click="batchDel">删除</a-button>
-          <a-button v-if="checkFlag && btnEnableList.indexOf(2) > -1" icon="check" @click="batchSetStatus(1)"
+          <!-- <a-button v-if="checkFlag && btnEnableList.indexOf(2) > -1" icon="check" @click="batchSetStatus(1)"
             >审核</a-button
           >
           <a-button v-if="checkFlag && btnEnableList.indexOf(7) > -1" icon="stop" @click="batchSetStatus(0)"
             >反审核</a-button
-          >
+          > -->
           <a-button v-if="isShowExcel && btnEnableList.indexOf(3) > -1" icon="download" @click="handleExport"
             >导出</a-button
           >

+ 2 - 2
jshERP-web/src/views/financial/ItemInList.vue

@@ -130,12 +130,12 @@
         <div class="table-operator" style="margin-top: 5px">
           <a-button v-if="btnEnableList.indexOf(1) > -1" @click="myHandleAdd" type="primary" icon="plus">新增</a-button>
           <a-button v-if="btnEnableList.indexOf(1) > -1" icon="delete" @click="batchDel">删除</a-button>
-          <a-button v-if="checkFlag && btnEnableList.indexOf(2) > -1" icon="check" @click="batchSetStatus(1)"
+          <!-- <a-button v-if="checkFlag && btnEnableList.indexOf(2) > -1" icon="check" @click="batchSetStatus(1)"
             >审核</a-button
           >
           <a-button v-if="checkFlag && btnEnableList.indexOf(7) > -1" icon="stop" @click="batchSetStatus(0)"
             >反审核</a-button
-          >
+          > -->
           <a-button v-if="isShowExcel && btnEnableList.indexOf(3) > -1" icon="download" @click="handleExport"
             >导出</a-button
           >

+ 2 - 2
jshERP-web/src/views/financial/ItemOutList.vue

@@ -130,12 +130,12 @@
         <div class="table-operator" style="margin-top: 5px">
           <a-button v-if="btnEnableList.indexOf(1) > -1" @click="myHandleAdd" type="primary" icon="plus">新增</a-button>
           <a-button v-if="btnEnableList.indexOf(1) > -1" icon="delete" @click="batchDel">删除</a-button>
-          <a-button v-if="checkFlag && btnEnableList.indexOf(2) > -1" icon="check" @click="batchSetStatus(1)"
+          <!-- <a-button v-if="checkFlag && btnEnableList.indexOf(2) > -1" icon="check" @click="batchSetStatus(1)"
             >审核</a-button
           >
           <a-button v-if="checkFlag && btnEnableList.indexOf(7) > -1" icon="stop" @click="batchSetStatus(0)"
             >反审核</a-button
-          >
+          > -->
           <a-button v-if="isShowExcel && btnEnableList.indexOf(3) > -1" icon="download" @click="handleExport"
             >导出</a-button
           >

+ 2 - 2
jshERP-web/src/views/financial/MoneyInList.vue

@@ -121,12 +121,12 @@
         <div class="table-operator" style="margin-top: 5px">
           <a-button v-if="btnEnableList.indexOf(1) > -1" @click="myHandleAdd" type="primary" icon="plus">新增</a-button>
           <a-button v-if="btnEnableList.indexOf(1) > -1" icon="delete" @click="batchDel">删除</a-button>
-          <a-button v-if="checkFlag && btnEnableList.indexOf(2) > -1" icon="check" @click="batchSetStatus(1)"
+          <!-- <a-button v-if="checkFlag && btnEnableList.indexOf(2) > -1" icon="check" @click="batchSetStatus(1)"
             >审核</a-button
           >
           <a-button v-if="checkFlag && btnEnableList.indexOf(7) > -1" icon="stop" @click="batchSetStatus(0)"
             >反审核</a-button
-          >
+          > -->
           <a-button v-if="isShowExcel && btnEnableList.indexOf(3) > -1" icon="download" @click="handleExport"
             >导出</a-button
           >

+ 2 - 2
jshERP-web/src/views/financial/MoneyOutList.vue

@@ -121,12 +121,12 @@
         <div class="table-operator" style="margin-top: 5px">
           <a-button v-if="btnEnableList.indexOf(1) > -1" @click="myHandleAdd" type="primary" icon="plus">新增</a-button>
           <a-button v-if="btnEnableList.indexOf(1) > -1" icon="delete" @click="batchDel">删除</a-button>
-          <a-button v-if="checkFlag && btnEnableList.indexOf(2) > -1" icon="check" @click="batchSetStatus(1)"
+          <!-- <a-button v-if="checkFlag && btnEnableList.indexOf(2) > -1" icon="check" @click="batchSetStatus(1)"
             >审核</a-button
           >
           <a-button v-if="checkFlag && btnEnableList.indexOf(7) > -1" icon="stop" @click="batchSetStatus(0)"
             >反审核</a-button
-          >
+          > -->
           <a-button v-if="isShowExcel && btnEnableList.indexOf(3) > -1" icon="download" @click="handleExport"
             >导出</a-button
           >

+ 2 - 2
jshERP-web/src/views/financial/mixins/FinancialListMixin.js

@@ -78,14 +78,14 @@ export const FinancialListMixin = {
           }
         })
       } else {
-        this.$message.warning('抱歉,只有未审核的单据才能编辑,请先进行反审核!')
+        this.$message.warning('抱歉,只有未审核的单据才能编辑!')
       }
     },
     myHandleDelete(record) {
       if (record.status === '0') {
         this.handleDelete(record.id)
       } else {
-        this.$message.warning('抱歉,只有未审核的单据才能删除,请先进行反审核!')
+        this.$message.warning('抱歉,只有未审核的单据才能删除!')
       }
     },
     myHandleDetail(record, type, prefixNo) {

+ 6 - 2
jshERP-web/src/views/material/MaterialCategoryList.vue

@@ -66,7 +66,7 @@
             <a-input placeholder="请输入名称" v-decorator="['name', validatorRules.name]" />
           </a-form-item>
           <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="编号">
-            <a-input placeholder="请输入编号" v-decorator="['serialNo', validatorRules.serialNo]" />
+            <a-input placeholder="请输入编号" v-decorator="['serialNo', validatorRules.serialNo]" disabled />
           </a-form-item>
           <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="上级目录">
             <a-tree-select
@@ -86,6 +86,9 @@
           <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="备注">
             <a-textarea placeholder="请输入备注" :rows="2" v-decorator.trim="['remark']" />
           </a-form-item>
+          <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="有效期阈值">
+            <a-input-number :min="0" v-decorator="['expiryThreshold']" style="width: 100%;" placeholder="请输入有效期阈值" />
+          </a-form-item>
         </a-form>
         <div class="anty-form-btn">
           <a-button @click="emptyCurrForm" type="default" htmlType="button" icon="sync">重置</a-button>
@@ -292,6 +295,7 @@ export default {
             record.parentId = res.data.parentId
             record.sort = res.data.sort
             record.remark = res.data.remark
+            record.expiryThreshold = res.data.expiryThreshold
             console.log('onSelect-record', record)
             this.currSelected = Object.assign({}, record)
             this.model = this.currSelected
@@ -316,7 +320,7 @@ export default {
     // 触发onSelect事件时,为类别树右侧的form表单赋值
     setValuesToForm(record) {
       this.$nextTick(() => {
-        this.form.setFieldsValue(pick(record, 'name', 'serialNo', 'parentId', 'sort', 'remark'))
+        this.form.setFieldsValue(pick(record, 'name', 'serialNo', 'parentId', 'sort', 'remark', 'expiryThreshold'))
       })
     },
     getCurrSelectedTitle() {

+ 24 - 41
jshERP-web/src/views/material/MaterialList.vue

@@ -59,11 +59,6 @@
                     <a-input placeholder="请输入品牌查询" v-model="queryParam.brand"></a-input>
                   </a-form-item>
                 </a-col>
-                <!-- <a-col :md="6" :sm="24">
-                  <a-form-item label="制造商" :labelCol="labelCol" :wrapperCol="wrapperCol">
-                    <a-input placeholder="请输入制造商查询" v-model="queryParam.mfrs"></a-input>
-                  </a-form-item>
-                </a-col> -->
                 <a-col :md="6" :sm="24">
                   <a-form-item label="状态" :labelCol="labelCol" :wrapperCol="wrapperCol">
                     <a-select placeholder="请选择状态" v-model="queryParam.enabled">
@@ -80,23 +75,6 @@
                     </a-select>
                   </a-form-item>
                 </a-col>
-                <!-- <a-col :md="6" :sm="24">
-                  <a-form-item label="批号" :labelCol="labelCol" :wrapperCol="wrapperCol">
-                    <a-select placeholder="有无批号" v-model="queryParam.enableBatchNumber">
-                      <a-select-option value="1">有</a-select-option>
-                      <a-select-option value="0">无</a-select-option>
-                    </a-select>
-                  </a-form-item>
-                </a-col> -->
-                <!-- <a-col :md="6" :sm="24">
-                  <a-form-item label="仓位货架" :labelCol="labelCol" :wrapperCol="wrapperCol">
-                    <a-input
-                      style="width: 100%"
-                      placeholder="请输入仓位货架查询"
-                      v-model="queryParam.position"
-                    ></a-input>
-                  </a-form-item>
-                </a-col> -->
                 <a-col :md="6" :sm="24">
                   <a-form-item label="扩展信息" :labelCol="labelCol" :wrapperCol="wrapperCol">
                     <a-input
@@ -115,15 +93,15 @@
                     ></a-input-number>
                   </a-form-item>
                 </a-col>
-                <!-- <a-col :md="6" :sm="24">
-                  <a-form-item label="保质期" :labelCol="labelCol" :wrapperCol="wrapperCol">
-                    <a-input-number
-                      style="width: 100%"
-                      placeholder="请输入保质期查询"
-                      v-model="queryParam.expiryNum"
-                    ></a-input-number>
+                <a-col :md="6" :sm="24">
+                  <a-form-item label="商品提醒" :labelCol="labelCol" :wrapperCol="wrapperCol">
+                    <a-select v-model="queryParam.reminder" option-label-prop="title" placeholder="请选择商品提醒">
+                      <a-select-option key="临期" value="临期" title="临期">临期</a-select-option>
+                      <a-select-option key="无动销" value="无动销" title="无动销">无动销</a-select-option>
+                      <a-select-option key="库存危险" value="库存危险" title="库存危险">库存危险</a-select-option>
+                    </a-select>
                   </a-form-item>
-                </a-col> -->
+                </a-col>
                 <a-col :md="6" :sm="24">
                   <a-form-item label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol">
                     <a-input placeholder="请输入备注查询" v-model="queryParam.remark"></a-input>
@@ -238,6 +216,11 @@
                 {{ text }}
               </a-tooltip>
             </template>
+            <template slot="reminder" slot-scope="text, record">
+              <a-tag v-if="record.reminder&&record.reminder.includes('临期')" color="red" style="margin-right: 10px;">临期</a-tag>
+              <a-tag v-if="record.reminder&&record.reminder.includes('无动销')" color="orange" style="margin-right: 10px;">无动销</a-tag>
+              <a-tag v-if="record.reminder&&record.reminder.includes('库存危险')" color="blue">库存危险</a-tag>
+            </template>
             <template slot="customRenderEnabled" slot-scope="enabled">
               <a-tag v-if="enabled" color="green">启用</a-tag>
               <a-tag v-if="!enabled" color="orange">禁用</a-tag>
@@ -295,14 +278,15 @@ export default {
         model: '',
         color: '',
         brand: '',
-        mfrs: '',
+        // mfrs: '',
         materialOther: '',
         weight: '',
-        expiryNum: '',
+        // expiryNum: '',
         enabled: undefined,
         enableSerialNumber: undefined,
-        enableBatchNumber: undefined,
-        position: '',
+        // enableBatchNumber: undefined,
+        // position: '',
+        reminder: undefined,
         remark: '',
         mpList: getMpListShort(Vue.ls.get('materialPropertyList')), //扩展属性
       },
@@ -325,11 +309,12 @@ export default {
         'materialOther',
         'unit',
         'stock',
-        'purchaseDecimal',
+        'defaultPurchaseDecimal',
         'commodityDecimal',
-        'wholesaleDecimal',
+        'defaultWholesaleDecimal',
         'lowDecimal',
         'enabled',
+        'reminder'
       ],
       // 默认列
       defColumns: [
@@ -368,8 +353,6 @@ export default {
           },
         },
         { title: '基础重量', dataIndex: 'weight', width: 80 },
-        // { title: '保质期', dataIndex: 'expiryNum', width: 60 },
-        // { title: '制造商', dataIndex: 'mfrs', width: 120, ellipsis: true },
         {
           title: '初始库存',
           dataIndex: 'initialStock',
@@ -377,11 +360,11 @@ export default {
           scopedSlots: { customRender: 'customRenderInitialStock' },
         },
         { title: '库存', dataIndex: 'stock', width: 80, scopedSlots: { customRender: 'customRenderStock' } },
-        { title: '采购价', dataIndex: 'purchaseDecimal', width: 80 },
+        { title: '默认采购价', dataIndex: 'defaultPurchaseDecimal', width: 100 },
         { title: '零售价', dataIndex: 'commodityDecimal', width: 80 },
-        { title: '销售价', dataIndex: 'wholesaleDecimal', width: 80 },
+        { title: '默认销售价', dataIndex: 'defaultWholesaleDecimal', width: 100 },
         { title: '最低售价', dataIndex: 'lowDecimal', width: 80 },
-        // { title: '仓位货架', dataIndex: 'position', width: 80 },
+        { title: '预警提示', dataIndex: 'reminder', width: 100, scopedSlots: { customRender: 'reminder' }},
         { title: '备注', dataIndex: 'remark', width: 80 },
         {
           title: '状态',

+ 57 - 300
jshERP-web/src/views/material/modules/MaterialModal.vue

@@ -111,41 +111,6 @@
                   </a-row>
                 </a-form-item>
               </a-col>
-           
-            </a-row>
-            <a-row class="form-row" :gutter="24">
-              <!-- <a-col :md="6" :sm="24" v-if="!model.id">
-                <a-form-item
-                  :labelCol="labelCol"
-                  :wrapperCol="wrapperCol"
-                  label="多属性"
-                  data-step="5"
-                  data-title="多属性"
-                  data-intro="多属性是针对的sku商品(比如服装、鞋帽行业),此处开关如果启用就可以在下方进行多sku的配置,配置具体的颜色、尺码之类的组合"
-                >
-                  <a-tooltip title="多属性针对服装、鞋帽等行业,需要先录入单位才能激活此处输入框">
-                    <a-tag class="tag-info" v-if="!manySkuStatus">需要先录入单位才能激活</a-tag>
-                    <a-select
-                      mode="multiple"
-                      v-decorator="['manySku']"
-                      showSearch
-                      optionFilterProp="children"
-                      placeholder="请选择多属性(可多选)"
-                      @change="onManySkuChange"
-                      v-show="manySkuStatus"
-                    >
-                      <a-select-option
-                        v-for="(item, index) in materialAttributeList"
-                        :key="index"
-                        :value="item.value"
-                        :disabled="item.disabled"
-                      >
-                        {{ item.name }}
-                      </a-select-option>
-                    </a-select>
-                  </a-tooltip>
-                </a-form-item>
-              </a-col> -->
               <a-col :md="6" :sm="24">
                 <a-form-item
                   :labelCol="labelCol"
@@ -202,8 +167,6 @@
                   </a-tree-select>
                 </a-form-item>
               </a-col>
-            </a-row>
-            <a-row class="form-row" :gutter="24">
               <a-col :md="6" :sm="24">
                 <a-form-item
                   :labelCol="labelCol"
@@ -264,74 +227,46 @@
                   </a-tooltip>
                 </a-form-item>
               </a-col>
-            </a-row>
-            <a-row class="form-row" :gutter="24">
-              <a-col :md="12" :sm="24" v-if="manySkuSelected >= 1">
+              <a-col :md="6" :sm="24">
                 <a-form-item
-                  :labelCol="{ xs: { span: 24 }, sm: { span: 4 } }"
-                  :wrapperCol="{ xs: { span: 24 }, sm: { span: 20 } }"
-                  :label="skuOneTitle"
+                  :labelCol="labelCol"
+                  :wrapperCol="wrapperCol"
+                  label="保质期(天)"
+                  data-step="14"
+                  data-title="保质期(天)"
+                  data-intro="保质期(天)"
                 >
-                  <a-select
-                    mode="multiple"
-                    v-decorator="['skuOne']"
-                    showSearch
-                    optionFilterProp="children"
-                    placeholder="请选择(可多选)"
-                    @select="onSkuChange"
-                    @deselect="onSkuOneDeSelect"
-                  >
-                    <a-select-option v-for="(item, index) in skuOneList" :key="index" :value="item.value">
-                      {{ item.name }}
-                    </a-select-option>
-                  </a-select>
+                  <a-input-number :min="0" v-decorator="['expiryNum']" style="width: 100%;" placeholder="请输入保质期(天)" />
                 </a-form-item>
               </a-col>
-              <a-col :md="12" :sm="24" v-if="manySkuSelected >= 2">
+              <a-col :md="6" :sm="24">
                 <a-form-item
-                  :labelCol="{ xs: { span: 24 }, sm: { span: 4 } }"
-                  :wrapperCol="{ xs: { span: 24 }, sm: { span: 20 } }"
-                  :label="skuTwoTitle"
-                >
-                  <a-select
-                    mode="multiple"
-                    v-decorator="['skuTwo']"
-                    showSearch
-                    optionFilterProp="children"
-                    placeholder="请选择(可多选)"
-                    @select="onSkuChange"
-                    @deselect="onSkuTwoDeSelect"
-                  >
-                    <a-select-option v-for="(item, index) in skuTwoList" :key="index" :value="item.value">
-                      {{ item.name }}
-                    </a-select-option>
-                  </a-select>
+                  :labelCol="labelCol"
+                  :wrapperCol="wrapperCol"
+                  label="默认采购价"
+                  data-step="15"
+                  data-title="默认采购价"
+                  data-intro="默认采购价"
+                > 
+                  <a-input @blur="$refs.meTable.$forceUpdate()" v-decorator="['defaultPurchaseDecimal',validatorRules.defaultPurchaseDecimal]" style="width: 100%" placeholder="请输入默认采购价" />
                 </a-form-item>
               </a-col>
-              <a-col :md="12" :sm="24" v-if="manySkuSelected >= 3">
+              <a-col :md="6" :sm="24">
                 <a-form-item
-                  :labelCol="{ xs: { span: 24 }, sm: { span: 4 } }"
-                  :wrapperCol="{ xs: { span: 24 }, sm: { span: 20 } }"
-                  :label="skuThreeTitle"
+                  :labelCol="labelCol"
+                  :wrapperCol="wrapperCol"
+                  label="默认销售价"
+                  data-step="16"
+                  data-title="默认销售价"
+                  data-intro="默认销售价"
                 >
-                  <a-select
-                    mode="multiple"
-                    v-decorator="['skuThree']"
-                    showSearch
-                    optionFilterProp="children"
-                    placeholder="请选择(可多选)"
-                    @select="onSkuChange"
-                    @deselect="onSkuThreeDeSelect"
-                  >
-                    <a-select-option v-for="(item, index) in skuThreeList" :key="index" :value="item.value">
-                      {{ item.name }}
-                    </a-select-option>
-                  </a-select>
+                  <a-input @blur="$refs.meTable.$forceUpdate()" v-decorator="['defaultWholesaleDecimal',validatorRules.defaultWholesaleDecimal]" style="width: 100%;" placeholder="请输入默认销售价" />
                 </a-form-item>
               </a-col>
             </a-row>
             <div style="margin-top: 8px" id="materialDetailModal">
               <a-table
+                ref="meTable"
                 size="middle"
                 rowKey="id"
                 :loading="meTable.loading"
@@ -348,6 +283,18 @@
                 <template slot="depotId" slot-scope="text, record">
                   {{ formatDepotName(record.depotId) }}
                 </template>
+                <template slot="purchaseDecimal" slot-scope="text, record">
+                  {{ record.purchaseDecimal }}
+                  <a-tooltip slot="suffix" title="采购价和默认采购价不一致">
+                    <a-icon type="info-circle" style="color: #f5222d" v-show="record.purchaseDecimal!=form.getFieldValue('defaultPurchaseDecimal')" />
+                  </a-tooltip>
+                </template>
+                <template slot="wholesaleDecimal" slot-scope="text, record">
+                  {{ record.wholesaleDecimal }}
+                  <a-tooltip slot="suffix" title="销售价和默认销售价不一致">
+                    <a-icon type="info-circle" style="color: #f5222d" v-show="record.wholesaleDecimal!=form.getFieldValue('defaultWholesaleDecimal')" />
+                  </a-tooltip>
+                </template>
               </a-table>
             </div>
             <a-row class="form-row" :gutter="24">
@@ -426,7 +373,6 @@
               :actionButton="false"
             >
               <template #buttonAfter>
-                <!-- <a-button style="margin: 0px 0px 8px 0px" @click="batchSetStock('currentStock')">期初库存-批量</a-button> -->
                 <a-button style="margin: 0px 0px 8px 0px" @click="batchSetStock('lowSafeStock')">最低安全库存-批量</a-button>
                 <a-button style="margin-left: 8px" @click="batchSetStock('highSafeStock')">最高安全库存-批量</a-button>
               </template>
@@ -482,13 +428,10 @@ import { FormTypes, getRefPromise, VALIDATE_NO_PASSED, validateFormAndTables } f
 import {
   checkMaterial,
   checkMaterialBarCode,
-  getMaterialAttributeNameList,
-  getMaterialAttributeValueListById,
-  getMaxBarCode,
   queryMaterialCategoryTreeList,
   changeNameToPinYin,
 } from '@/api/api'
-import { removeByVal, autoJumpNextInput, handleIntroJs } from '@/utils/util'
+import {  autoJumpNextInput, handleIntroJs } from '@/utils/util'
 import { getAction, httpAction } from '@/api/manage'
 import JImageUpload from '@/components/jeecg/JImageUpload'
 import JDate from '@/components/jeecg/JDate'
@@ -523,23 +466,9 @@ export default {
       unitList: [],
       depotList: [],
       fileList: [],
-      unitStatus: false,
-      manyUnitStatus: true,
       unitChecked: false,
-      manySkuStatus: false,
-      switchDisabled: false, //开关的启用状态
-      barCodeSwitch: false, //生成条码开关
-      maxBarCodeInfo: '', //最大条码
       meDeleteIdList: [], //删除条码信息的id数组
       prefixNo: 'material',
-      materialAttributeList: [],
-      skuOneTitle: '属性1',
-      skuTwoTitle: '属性2',
-      skuThreeTitle: '属性3',
-      skuOneList: [],
-      skuTwoList: [],
-      skuThreeList: [],
-      manySkuSelected: 0,
       model: {},
       showOkFlag: true,
       setTimeFlag: null,
@@ -572,6 +501,7 @@ export default {
           {
             title: '采购价',
             dataIndex: 'purchaseDecimal',
+            scopedSlots: { customRender: 'purchaseDecimal' } 
           },
           {
             title: '零售价',
@@ -580,6 +510,7 @@ export default {
           {
             title: '销售价',
             dataIndex: 'wholesaleDecimal',
+            scopedSlots: { customRender: 'wholesaleDecimal' } 
           },
           {
             title: '最低售价',
@@ -590,10 +521,6 @@ export default {
             dataIndex: 'productionDate',
           },
           {
-            title: '保质期(天)',
-            dataIndex: 'expiryNum',
-          },
-          {
             title: '供应商',
             dataIndex: 'supplierId',
             scopedSlots: { customRender: 'supplierId' } 
@@ -607,7 +534,10 @@ export default {
             dataIndex: 'depotId',
             scopedSlots: { customRender: 'depotId' } 
           },
-         
+          {
+            title: '库位',
+            dataIndex: 'position',
+          },
         ],
         pagination: {
           current: 1,
@@ -711,6 +641,12 @@ export default {
         unitId: {
           rules: [{ required: true, message: '请选择多单位!' }],
         },
+        defaultWholesaleDecimal: {
+          rules: [{ required: true, message: '请输入默认销售价!' }],
+        },
+        defaultPurchaseDecimal: {
+          rules: [{ required: true, message: '请输入默认采购价!' }],
+        },
       },
       url: {
         add: '/material/add',
@@ -770,13 +706,9 @@ export default {
       this.form.resetFields()
       this.model = Object.assign({}, record)
       this.activeKey = '1'
-      this.manySkuSelected = 0
-      this.barCodeSwitch = false
-      this.manySkuStatus = false
-      this.maxBarCodeInfo = ''
       this.visible = true
       this.meDeleteIdList = []
-      this.modalStyle = 'top:20px;height: 95%;'
+      this.modalStyle = 'top:0;height: 95%;'
       if (JSON.stringify(record) === '{}') {
         this.fileList = []
       } else {
@@ -799,6 +731,9 @@ export default {
             'categoryId',
             'enableSerialNumber',
             'movingPinReminderCycle',
+            'expiryNum',
+            'defaultPurchaseDecimal',
+            'defaultWholesaleDecimal',
             'systemSku',
             'weight',
             'remark',
@@ -810,22 +745,15 @@ export default {
         autoJumpNextInput('materialHeadModal')
         autoJumpNextInput('materialDetailModal')
       })
-      this.initMaterialAttribute()
       this.loadTreeData()
       this.loadUnitListData()
       // 加载子表数据
       if (this.model.id) {
-        //禁用多属性开关
-        this.switchDisabled = true
         // 判断是否是多单位
         if (this.model.unit) {
           this.unitChecked = false
-          this.unitStatus = false
-          this.manyUnitStatus = true
         } else {
           this.unitChecked = true
-          this.unitStatus = true
-          this.manyUnitStatus = false
           console.log('多单位-----', record)
           await this.getUnitListByID(record.unitId)
         }
@@ -834,7 +762,6 @@ export default {
         this.requestMeTableData()
         this.requestDepotTableData(this.url.depotWithStock, { mId: this.model.id }, this.depotTable)
       } else {
-        this.switchDisabled = false
         this.requestDepotTableData(this.url.depotWithStock, { mId: 0 }, this.depotTable)
       }
     },
@@ -893,9 +820,9 @@ export default {
       this.$emit('close')
       this.visible = false
       this.modalStyle = ''
-      this.unitStatus = false
-      this.manyUnitStatus = true
       this.unitChecked = false
+      this.meTable.dataSource = []
+      this.meTable.pagination.current = 1
       this.getAllTable().then((editableTables) => {
         editableTables[0].initialize()
         editableTables[1].initialize()
@@ -1137,151 +1064,6 @@ export default {
         }
       })
     },
-    onManySkuChange(value) {
-      this.manySkuSelected = value.length
-      //控制多属性下拉框中选择项的状态
-      if (value.length < 3) {
-        this.materialAttributeList.forEach((item, index, array) => {
-          array.indexOf(item.value) === -1 ? Vue.set(array[index], 'disabled', false) : ''
-        })
-      } else {
-        this.materialAttributeList.forEach((item, index, array) => {
-          value.indexOf(item.value) === -1 ? Vue.set(array[index], 'disabled', true) : ''
-        })
-      }
-      //更新属性1和属性2和属性3的下拉框
-      if (value.length <= 3) {
-        let skuOneId = value[0]
-        let skuTwoId = value[1]
-        let skuThreeId = value[2]
-        this.materialAttributeList.forEach((item) => {
-          if (item.value === skuOneId) {
-            this.skuOneTitle = item.name
-          }
-          if (item.value === skuTwoId) {
-            this.skuTwoTitle = item.name
-          }
-          if (item.value === skuThreeId) {
-            this.skuThreeTitle = item.name
-          }
-        })
-        if (skuOneId) {
-          getMaterialAttributeValueListById({ id: skuOneId }).then((res) => {
-            this.skuOneList = res ? res : []
-          })
-        }
-        if (skuTwoId) {
-          getMaterialAttributeValueListById({ id: skuTwoId }).then((res) => {
-            this.skuTwoList = res ? res : []
-          })
-        }
-        if (skuThreeId) {
-          getMaterialAttributeValueListById({ id: skuThreeId }).then((res) => {
-            this.skuThreeList = res ? res : []
-          })
-        }
-      }
-      this.barCodeSwitch = false
-      this.meTable.dataSource = []
-    },
-    onSkuChange() {
-      let skuOneData = this.form.getFieldValue('skuOne')
-      let skuTwoData = this.form.getFieldValue('skuTwo')
-      let skuThreeData = this.form.getFieldValue('skuThree')
-      this.autoSkuList(skuOneData, skuTwoData, skuThreeData)
-    },
-    onSkuOneDeSelect(value) {
-      let skuOneData = this.form.getFieldValue('skuOne')
-      let skuTwoData = this.form.getFieldValue('skuTwo')
-      let skuThreeData = this.form.getFieldValue('skuThree')
-      removeByVal(skuOneData, value)
-      this.autoSkuList(skuOneData, skuTwoData, skuThreeData)
-    },
-    onSkuTwoDeSelect(value) {
-      let skuOneData = this.form.getFieldValue('skuOne')
-      let skuTwoData = this.form.getFieldValue('skuTwo')
-      let skuThreeData = this.form.getFieldValue('skuThree')
-      removeByVal(skuTwoData, value)
-      this.autoSkuList(skuOneData, skuTwoData, skuThreeData)
-    },
-    onSkuThreeDeSelect(value) {
-      let skuOneData = this.form.getFieldValue('skuOne')
-      let skuTwoData = this.form.getFieldValue('skuTwo')
-      let skuThreeData = this.form.getFieldValue('skuThree')
-      removeByVal(skuThreeData, value)
-      this.autoSkuList(skuOneData, skuTwoData, skuThreeData)
-    },
-    autoSkuList(skuOneData, skuTwoData, skuThreeData) {
-      let unit = this.form.getFieldValue('unit')
-      if (unit) {
-        //计算多属性已经选择了几个
-        let skuArr = []
-        if (this.getNumByField('skuOne')) {
-          skuArr.push(skuOneData)
-        }
-        if (this.getNumByField('skuTwo')) {
-          skuArr.push(skuTwoData)
-        }
-        if (this.getNumByField('skuThree')) {
-          skuArr.push(skuThreeData)
-        }
-        let skuArrOne = skuArr[0]
-        let skuArrTwo = skuArr[1]
-        let skuArrThree = skuArr[2]
-        let count = this.getNumByField('skuOne') + this.getNumByField('skuTwo') + this.getNumByField('skuThree')
-        let barCodeSku = []
-        if (count === 1) {
-          let skuArrOnly = []
-          if (this.getNumByField('skuOne')) {
-            skuArrOnly = skuOneData
-          } else if (this.getNumByField('skuTwo')) {
-            skuArrOnly = skuTwoData
-          } else if (this.getNumByField('skuThree')) {
-            skuArrOnly = skuThreeData
-          }
-          for (let i = 0; i < skuArrOnly.length; i++) {
-            barCodeSku.push(skuArrOnly[i])
-          }
-        } else if (count === 2) {
-          for (let i = 0; i < skuArrOne.length; i++) {
-            for (let j = 0; j < skuArrTwo.length; j++) {
-              barCodeSku.push(skuArrOne[i] + '/' + skuArrTwo[j])
-            }
-          }
-        } else if (count === 3) {
-          for (let i = 0; i < skuArrOne.length; i++) {
-            for (let j = 0; j < skuArrTwo.length; j++) {
-              for (let k = 0; k < skuArrThree.length; k++) {
-                barCodeSku.push(skuArrOne[i] + '/' + skuArrTwo[j] + '/' + skuArrThree[k])
-              }
-            }
-          }
-        }
-        let meTableData = []
-        getMaxBarCode({}).then((res) => {
-          if (res && res.code === 200) {
-            let maxBarCode = res.data.barCode - 0
-            for (let i = 0; i < barCodeSku.length; i++) {
-              let currentBarCode = maxBarCode + i + 1
-              meTableData.push({ barCode: currentBarCode, commodityUnit: unit, sku: barCodeSku[i] })
-            }
-            this.meTable.dataSource = meTableData
-          }
-        })
-      } else {
-        this.$message.warning('请填写单位(注意不要勾选多单位)')
-        this.barCodeSwitch = false
-      }
-    },
-    getNumByField(field) {
-      let num = 0
-      if (this.form.getFieldValue(field)) {
-        if (this.form.getFieldValue(field).length > 0) {
-          num = 1
-        }
-      }
-      return num
-    },
     onAdded(event) {
       const { row, target } = event
       // 不勾选多单位
@@ -1296,14 +1078,6 @@ export default {
       // this.meDeleteIdList = value
       console.log('onDeleted', value)
     },
-    // batchSetPrice(type) {
-    //   if (this.manySkuSelected > 0 || this.model.id) {
-    //     this.$refs.priceModalForm.add(type)
-    //     this.$refs.priceModalForm.disableSubmit = false
-    //   } else {
-    //     this.$message.warning('抱歉,只有开启多属性才能进行批量操作!')
-    //   }
-    // },
     batchSetStock(type) {
       this.$refs.stockModalForm.add(type)
       this.$refs.stockModalForm.disableSubmit = false
@@ -1332,13 +1106,6 @@ export default {
       }
       this.depotTable.dataSource = depotTableData
     },
-    initMaterialAttribute() {
-      getMaterialAttributeNameList().then((res) => {
-        if (res) {
-          this.materialAttributeList = res
-        }
-      })
-    },
     loadParseMaterialProperty() {
       let mpList = Vue.ls.get('materialPropertyList')
       for (let i = 0; i < mpList.length; i++) {
@@ -1380,12 +1147,6 @@ export default {
       }
     },
     onlyUnitOnChange(e) {
-      if (e.target.value) {
-        //单位有填写了之后则显示多属性的文本框
-        this.manySkuStatus = true
-      } else {
-        this.manySkuStatus = false
-      }
       console.log('onlyUnitOnChange=======',e.target.value)
       this.$refs.editableProBarCodeTable.getValues((error, values) => {
         let mArr = values
@@ -1404,12 +1165,8 @@ export default {
     unitOnChange(e) {
       let isChecked = e.target.checked
       if (isChecked) {
-        this.unitStatus = true
-        this.manyUnitStatus = false
         this.unitChecked = true
       } else {
-        this.unitStatus = false
-        this.manyUnitStatus = true
         this.unitChecked = false
       }
 

+ 1 - 1
jshERP-web/src/views/stock/components/editForm.vue

@@ -73,7 +73,7 @@
       </a-col>
       <a-col :xl="6" :lg="8" :md="12" :sm="24" class="form-col">
         <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="盘点状态">
-          <a-select placeholder="请选择" v-decorator="['taskStatus']" :options="taskStatusList" :disabled="isDisabled">
+          <a-select placeholder="请选择" v-decorator="['taskStatus']" :options="taskStatusList" :disabled="true">
           </a-select>
         </a-form-item>
       </a-col>

+ 14 - 2
jshERP-web/src/views/system/VendorList.vue

@@ -146,21 +146,33 @@ export default {
           align: 'center',
           scopedSlots: { customRender: 'action' },
         },
+        { title: '供应商编码', dataIndex: 'serialNo', width: 150, align: 'left' },
         { title: '名称', dataIndex: 'supplier', width: 150, align: 'left' },
         { title: '联系人', dataIndex: 'contacts', width: 70, align: 'left' },
         { title: '手机号码', dataIndex: 'telephone', width: 100, align: 'left' },
         { title: '联系电话', dataIndex: 'phoneNum', width: 100, align: 'left' },
         { title: '电子邮箱', dataIndex: 'email', width: 150, align: 'left' },
         { title: '税率(%)', dataIndex: 'taxRate', width: 80, align: 'left' },
+        { title: '是否支持售后', dataIndex: 'isAfterSales', width: 110, align: 'left',customRender: function (t, r, index) {
+            switch (r.isAfterSales) {
+              case '1':
+                return '是'
+              case '0':
+                return '否'
+              default:
+                return ''
+            }
+          }, },
+        { title: '售后规则', dataIndex: 'afterSalesRules', width: 100, align: 'left' },
         { title: '供应商分级', dataIndex: 'supplierLevel', width: 100, align: 'left' },
         {
-          title: '结算方式',
+          title: '结算周期',
           dataIndex: 'settlementMethod',
           width: 80,
           align: 'left',
           scopedSlots: { customRender: 'settlementMethod' },
         },
-        { title: '账单周期', dataIndex: 'billingCycleDays', width: 80, align: 'left' },
+        { title: '付款方式', dataIndex: 'billingCycleDays', width: 80, align: 'left' },
         { title: '采购对接人', dataIndex: 'procurementContact', width: 100, align: 'left' },
         { title: '到货天数', dataIndex: 'deliveryDays', width: 80, align: 'left' },
         {

+ 35 - 31
jshERP-web/src/views/system/modules/VendorModal.vue

@@ -14,7 +14,7 @@
       @cancel="handleCancel"
       cancelText="取消"
       okText="保存"
-      style="top: 10%"
+      style="top: 0; height: 95%"
     >
       <template slot="footer">
         <a-button key="back" v-if="isReadOnly" @click="handleCancel"> 取消 </a-button>
@@ -23,6 +23,11 @@
         <a-form :form="form" id="vendorModal">
           <a-row class="form-row" :gutter="24">
             <a-col :span="24 / 2">
+              <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="供应商编码">
+                <a-input placeholder="自动生成" v-decorator.trim="['serialNo']" disabled />
+              </a-form-item>
+            </a-col>
+            <a-col :span="24 / 2">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="名称">
                 <a-input placeholder="请输入名称" v-decorator.trim="['supplier', validatorRules.supplier]" />
               </a-form-item>
@@ -32,8 +37,6 @@
                 <a-input placeholder="请输入联系人" v-decorator.trim="['contacts']" />
               </a-form-item>
             </a-col>
-          </a-row>
-          <a-row class="form-row" :gutter="24">
             <a-col :span="24 / 2">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="手机号码">
                 <a-input placeholder="请输入手机号码" v-decorator.trim="['telephone']" />
@@ -45,26 +48,6 @@
               </a-form-item>
             </a-col>
             <a-col :span="24 / 2">
-              <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="电子邮箱">
-                <a-input placeholder="请输入电子邮箱" v-decorator.trim="['email']" />
-              </a-form-item>
-            </a-col>
-            <!-- <a-col :span="24 / 2">
-              <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="传真">
-                <a-input placeholder="请输入传真" v-decorator.trim="['fax']" />
-              </a-form-item>
-            </a-col> -->
-            <!-- <a-col :span="24 / 2">
-              <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="期初应付">
-                <a-input placeholder="请输入期初应付" v-decorator.trim="['beginNeedPay']" />
-              </a-form-item>
-            </a-col> -->
-            <!-- <a-col :span="24 / 2">
-              <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="期末应付">
-                <a-input v-decorator.trim="['allNeedPay']" :readOnly="true" />
-              </a-form-item>
-            </a-col> -->
-            <a-col :span="24 / 2">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="纳税人识别号">
                 <a-input placeholder="请输入纳税人识别号" v-decorator.trim="['taxNum']" />
               </a-form-item>
@@ -100,21 +83,23 @@
               </a-form-item>
             </a-col>
             <a-col :span="24 / 2">
-              <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="结算方式">
+              <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="结算周期">
                 <a-select
                   v-decorator.trim="['settlementMethod']"
                   :options="settleOptions"
-                  placeholder="请选择结算方式"
+                  placeholder="请选择结算周期"
                 ></a-select>
               </a-form-item>
             </a-col>
             <a-col :span="24 / 2">
-              <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="账单周期">
-                <a-input
-                  placeholder="请输入账单周期"
-                  oninput="value=value.replace(/[^\d]/g, '')"
+              <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="付款方式">
+                <a-select
                   v-decorator.trim="['billingCycleDays']"
-                />
+                  placeholder="请选择付款方式"
+                >
+                  <a-select-option value="先款后货">先款后货</a-select-option>
+                  <a-select-option value="先货后款">先货后款</a-select-option>
+                </a-select>
               </a-form-item>
             </a-col>
             <a-col :span="24 / 2">
@@ -151,6 +136,22 @@
               </a-form-item>
             </a-col>
             <a-col :span="24 / 2">
+              <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="是否支持售后">
+                <a-select
+                  v-decorator.trim="['isAfterSales']"
+                  placeholder="请选择是否支持售后"
+                >
+                <a-select-option value="1">是</a-select-option>
+                <a-select-option value="0">否</a-select-option>
+              </a-select>
+              </a-form-item>
+            </a-col>
+            <a-col :span="24 / 2">
+              <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="售后规则">
+                <a-textarea :rows="2" placeholder="请输入售后规则" v-decorator.trim="['afterSalesRules']" />
+              </a-form-item>
+            </a-col>
+            <a-col :span="24 / 2">
               <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="备注">
                 <a-textarea :rows="2" placeholder="请输入备注" v-decorator.trim="['description']" />
               </a-form-item>
@@ -267,7 +268,10 @@ export default {
             'procurementContact',
             'deliveryDays',
             'invoiceType',
-            'contractUpload'
+            'contractUpload',
+            'serialNo',
+            'isAfterSales',
+            'afterSalesRules',
           )
         )
         autoJumpNextInput('vendorModal')