Parcourir la source

Merge branch 'master' into 测试

lxf il y a 1 an
Parent
commit
2476219e00

+ 9 - 36
src/views/shengde/group/finance/reconciliation/print.vue

@@ -87,6 +87,7 @@
               <span>{{ item.skuPrice }}</span>
             </td>
             <td v-if="indexBom === 0" :rowspan="item.bomDetails.length">
+              <!-- <span>{{ subtotal(item) }}</span> -->
               <span>{{ item.subtotalAmount }}</span>
             </td>
             <td v-if="indexBom === 0" :rowspan="item.bomDetails.length">
@@ -96,6 +97,7 @@
               <span v-if="item.aftermarketAmount && Number(item.aftermarketAmount) !== 0">-{{ item.aftermarketAmount }}</span>
             </td>
             <td style="border-right: 0" v-if="indexBom === 0" :rowspan="item.bomDetails.length">
+              <!-- <span>{{ getAllCost(item) }}</span> -->
               <span>{{ item.amount }}</span>
             </td>
           </tr>
@@ -216,11 +218,6 @@ export default {
     getAllCost(row) {
       let money = 0
       money = parseFloat(Number(row.skuPrice) * Number(row.quantity) - Number(row.aftermarketAmount)).toFixed(2)
-      // if (row.bomDetails && row.bomDetails.length > 0) {
-      //   row.bomDetails.map((item) => {
-      //     money = parseFloat(Number(money) + Number(this.getCost(row, item, item.bomColorQuantity))).toFixed(2)
-      //   })
-      // }
       return money
     },
     getAggregate() {
@@ -233,43 +230,19 @@ export default {
               if (itemBom.amount) {
                 allMoney = parseFloat(Number(allMoney) + Number(itemBom.amount)).toFixed(2)
               }
-              //     if (itemBom.dataResource === 1) {
-              //       if (item.productPrice) {
-              //         money = parseFloat(Number(money) + Number(item.productPrice)).toFixed(2)
-              //       }
-              //       if (item.processPrice && ['10', '20'].includes(item.processingLayout)) {
-              //         money = parseFloat(Number(money) + Number(item.processPrice)).toFixed(2)
-              //       }
-              //       if (item.deliverGoodsPrice) {
-              //         money = parseFloat(Number(money) + Number(item.deliverGoodsPrice)).toFixed(2)
-              //       }
-              //       if (item.expressPrice) {
-              //         money = parseFloat(Number(money) + Number(item.expressPrice)).toFixed(2)
-              //       }
-              //       if (item.expensePrice) {
-              //         money = parseFloat(Number(money) + Number(item.expensePrice)).toFixed(2)
-              //       }
-              //     } else {
-              //       if (itemBom.price) {
-              //         money = parseFloat(Number(money) + Number(itemBom.price)).toFixed(2)
-              //       }
-              //     }
-              //     if (itemBom.bomColorQuantity) {
-              //       allMoney = parseFloat(Number(allMoney) + Number(money) * Number(itemBom.bomColorQuantity)).toFixed(2)
-              //     }
             })
           }
         })
       }
       return allMoney
     },
-    // subtotal(item) {
-    //   let num = 0
-    //   if (item.quantity && item.skuPrice) {
-    //     num = parseFloat(Number(item.quantity) * Number(item.skuPrice)).toFixed(2)
-    //   }
-    //   return num
-    // },
+    subtotal(item) {
+      let num = 0
+      if (item.quantity && item.skuPrice) {
+        num = parseFloat(Number(item.quantity) * Number(item.skuPrice)).toFixed(2)
+      }
+      return num
+    },
   },
 }
 </script>

+ 9 - 36
src/views/shengde/group/finance/summary/print.vue

@@ -85,6 +85,7 @@
               <span>{{ item.skuPrice }}</span>
             </td>
             <td v-if="indexBom === 0" :rowspan="item.bomDetails.length">
+              <!-- <span>{{ subtotal(item) }}</span> -->
               <span>{{ item.subtotalAmount }}</span>
             </td>
             <td v-if="indexBom === 0" :rowspan="item.bomDetails.length">
@@ -94,6 +95,7 @@
               <span v-if="item.aftermarketAmount && Number(item.aftermarketAmount) !== 0">-{{ item.aftermarketAmount }}</span>
             </td>
             <td style="border-right: 0" v-if="indexBom === 0" :rowspan="item.bomDetails.length">
+              <!-- <span>{{ getAllCost(item) }}</span> -->
               <span>{{ item.amount }}</span>
             </td>
           </tr>
@@ -215,11 +217,6 @@ export default {
     getAllCost(row) {
       let money = 0
       money = parseFloat(Number(row.skuPrice) * Number(row.quantity) - Number(row.aftermarketAmount)).toFixed(2)
-      // if (row.bomDetails && row.bomDetails.length > 0) {
-      //   row.bomDetails.map((item) => {
-      //     money = parseFloat(Number(money) + Number(this.getCost(row, item, item.bomColorQuantity))).toFixed(2)
-      //   })
-      // }
       return money
     },
     getAggregate() {
@@ -232,43 +229,19 @@ export default {
               if (itemBom.amount) {
                 allMoney = parseFloat(Number(allMoney) + Number(itemBom.amount)).toFixed(2)
               }
-              //     if (itemBom.dataResource === 1) {
-              //       if (item.productPrice) {
-              //         money = parseFloat(Number(money) + Number(item.productPrice)).toFixed(2)
-              //       }
-              //       if (item.processPrice && ['10', '20'].includes(item.processingLayout)) {
-              //         money = parseFloat(Number(money) + Number(item.processPrice)).toFixed(2)
-              //       }
-              //       if (item.deliverGoodsPrice) {
-              //         money = parseFloat(Number(money) + Number(item.deliverGoodsPrice)).toFixed(2)
-              //       }
-              //       if (item.expressPrice) {
-              //         money = parseFloat(Number(money) + Number(item.expressPrice)).toFixed(2)
-              //       }
-              //       if (item.expensePrice) {
-              //         money = parseFloat(Number(money) + Number(item.expensePrice)).toFixed(2)
-              //       }
-              //     } else {
-              //       if (itemBom.price) {
-              //         money = parseFloat(Number(money) + Number(itemBom.price)).toFixed(2)
-              //       }
-              //     }
-              //     if (itemBom.bomColorQuantity) {
-              //       allMoney = parseFloat(Number(allMoney) + Number(money) * Number(itemBom.bomColorQuantity)).toFixed(2)
-              //     }
             })
           }
         })
       }
       return allMoney
     },
-    // subtotal(item) {
-    //   let num = 0
-    //   if (item.quantity && item.skuPrice) {
-    //     num = parseFloat(Number(item.quantity) * Number(item.skuPrice)).toFixed(2)
-    //   }
-    //   return num
-    // },
+    subtotal(item) {
+      let num = 0
+      if (item.quantity && item.skuPrice) {
+        num = parseFloat(Number(item.quantity) * Number(item.skuPrice)).toFixed(2)
+      }
+      return num
+    },
   },
 }
 </script>

+ 3 - 2
src/views/shengde/group/order/orderManagement/index.vue

@@ -61,9 +61,10 @@
     </el-form>
 
     <el-row :gutter="10" style="margin-bottom: 10px">
-      <el-button type="primary" size="mini" @click="openOperationLog = true" v-db-click>操作日志</el-button>
+      <el-col :span="24">
+        <el-button type="primary" size="mini" @click="openOperationLog = true" v-db-click>操作日志</el-button>
+      </el-col>
     </el-row>
-
     <div style="width: 100%; position: relative">
       <el-table
         :data="tableList"

+ 104 - 4
src/views/shengde/group/synchronization/order/index.vue

@@ -1,6 +1,6 @@
 <template>
   <el-card class="box-card" v-loading="loadingStatus" element-loading-text="数据同步中,请稍后" element-loading-background="rgba(0, 0, 0, 0.2)">
-    <el-card style="position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 35vw; height: 50vh">
+    <div style="position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 42vw">
       <div style="position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%)">
         <el-tabs v-model="activeName">
           <el-tab-pane label="重置时间" name="first" v-if="!userInfo.subsidiaryId">
@@ -50,7 +50,50 @@
                 </el-date-picker>
               </el-form-item>
               <el-form-item label="订单号:" prop="bill_code">
-                <el-input v-model="formTwo.bill_code" placeholder="请输入订单号"></el-input>
+                <el-input v-model="formTwo.bill_code" placeholder="请输入订单号" size="small"></el-input>
+              </el-form-item>
+              <el-form-item label="订单状态" prop="trade_status_arr">
+                <el-select v-model="formTwo.trade_status_arr" multiple placeholder="请选择订单状态" style="width: 100%" size="small">
+                  <el-option v-for="item in tradeStatus" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey" />
+                </el-select>
+              </el-form-item>
+              <el-form-item label="仓库编码:" prop="storage_code">
+                <el-input v-model="formTwo.storage_code" placeholder="请输入仓库编码" size="small"></el-input>
+              </el-form-item>
+              <el-form-item label="付款时间:" prop="pay_time">
+                <el-date-picker
+                  type="datetime"
+                  v-model="formTwo.pay_time"
+                  placeholder="请选择付款时间"
+                  size="small"
+                  style="width: 100%"
+                  value-format="yyyy-MM-dd HH:mm:ss"
+                >
+                </el-date-picker>
+              </el-form-item>
+              <el-form-item label="完成时间:" prop="finish_time">
+                <el-date-picker
+                  type="datetime"
+                  v-model="formTwo.finish_time"
+                  placeholder="请选择完成时间"
+                  size="small"
+                  style="width: 100%"
+                  value-format="yyyy-MM-dd HH:mm:ss"
+                  :picker-options="pickerOptionsTwo"
+                >
+                </el-date-picker>
+              </el-form-item>
+              <el-form-item label="发货时间:" prop="send_goods_time">
+                <el-date-picker
+                  type="datetime"
+                  v-model="formTwo.send_goods_time"
+                  placeholder="请选择发货时间"
+                  size="small"
+                  style="width: 100%"
+                  value-format="yyyy-MM-dd HH:mm:ss"
+                  :picker-options="pickerOptionsTwo"
+                >
+                </el-date-picker>
               </el-form-item>
               <div style="width: 100%; padding-top: 16px; text-align: center">
                 <el-button type="primary" @click="clickTwoSubmit()" size="small" v-db-click>保 存</el-button>
@@ -59,7 +102,7 @@
           </el-tab-pane>
         </el-tabs>
       </div>
-    </el-card>
+    </div>
   </el-card>
 </template>
 
@@ -83,11 +126,58 @@ export default {
         approve_time: '',
         end_time: '',
         bill_code: '',
+        trade_status: '',
+        trade_status_arr: '',
+        storage_code: '',
+        pay_time: '',
+        finish_time: '',
+        send_goods_time: '',
       },
+      tradeStatus: [
+        {
+          dictValue: '打单配货',
+          dictKey: '1',
+        },
+        {
+          dictValue: '验货',
+          dictKey: '2',
+        },
+        {
+          dictValue: '承重',
+          dictKey: '3',
+        },
+        {
+          dictValue: '待发货',
+          dictKey: '4',
+        },
+        {
+          dictValue: '财审',
+          dictKey: '5',
+        },
+        {
+          dictValue: '已发货',
+          dictKey: '8',
+        },
+        {
+          dictValue: '完成',
+          dictKey: '9',
+        },
+        {
+          dictValue: '关闭',
+          dictKey: '10',
+        },
+        {
+          dictValue: '配货中',
+          dictKey: '13',
+        },
+        {
+          dictValue: '打包',
+          dictKey: '15',
+        },
+      ],
       formTwoRules: {
         approve_time: [{ required: true, message: '请选择开始时间', trigger: ['change', 'blur'] }],
         end_time: [{ required: true, message: '请选择结束时间', trigger: ['change', 'blur'] }],
-        bill_code: [{ required: true, message: '请输入订单号', trigger: 'blur' }],
       },
       time: '00:00:00',
       loadingStatus: false,
@@ -96,6 +186,11 @@ export default {
           return time.getTime() < Date.now() - 8.64e7 - 8.64e7 - 8.64e7
         },
       },
+      pickerOptionsTwo: {
+        disabledDate(time) {
+          return time.getTime() < Date.now() - 2592000000 - 2592000000 - 2592000000
+        },
+      },
       activeName: '',
     }
   },
@@ -138,6 +233,11 @@ export default {
     clickTwoSubmit() {
       this.$refs.ruleFormTwo.validate((valid) => {
         if (valid) {
+          if (this.formTwo.trade_status_arr && this.formTwo.trade_status_arr.length > 0) {
+            this.formTwo.trade_status = this.formTwo.trade_status_arr.join(',')
+          } else {
+            this.formTwo.trade_status = ''
+          }
           let data = JSON.parse(JSON.stringify(this.formTwo))
           let approve_time = new Date(this.formTwo.approve_time)
           data.approve_time = Date.parse(approve_time)

+ 2 - 2
src/views/shengde/product/groupSKU/index.vue

@@ -29,8 +29,8 @@
       <el-row :gutter="10" style="margin-bottom: 10px" v-if="!userInfo.subsidiaryId">
         <el-col :span="24">
           <el-button type="primary" size="mini" @click="handleAdd">添加产品</el-button>
-          <el-button type="primary" size="mini" @click="importExcel" v-db-click>导入Excel</el-button>
-          <el-button type="primary" size="mini" @click="historyManagement" v-db-click>导入历史管理</el-button>
+          <!-- <el-button type="primary" size="mini" @click="importExcel" v-db-click>导入Excel</el-button>
+          <el-button type="primary" size="mini" @click="historyManagement" v-db-click>导入历史管理</el-button> -->
         </el-col>
       </el-row>
 

+ 2 - 1
src/views/shengde/productionSystem/purchase/contract/details/product.vue

@@ -38,7 +38,8 @@
         </el-table-column>
         <el-table-column label="已入库数量" width="100" v-if="!status">
           <template slot-scope="scope">
-            <span>{{ getNum(scope.row) }}</span>
+            <span v-if="scope.row.warehousingQuantity">{{ Number(scope.row.warehousingQuantity) }}</span>
+            <!-- <span>{{ getNum(scope.row) }}</span> -->
           </template>
         </el-table-column>
       </el-table>

+ 16 - 17
src/views/shengde/productionSystem/purchase/salesReturn/addOrModified.vue

@@ -38,6 +38,12 @@
           >
             <el-table-column label="品号" prop="bomColorCode" width="130" />
             <el-table-column label="品名" prop="bomColorName" min-width="180" />
+            <!-- <el-table-column label="颜色" prop="color" width="140" />
+            <el-table-column label="尺寸(长宽高,cm)" width="140">
+              <template slot-scope="scope">
+                <span>{{ `${scope.row.productLong} *${scope.row.productWide}*${scope.row.productHigh}` }} </span>
+              </template>
+            </el-table-column> -->
             <el-table-column label="含税单价" width="100">
               <template slot-scope="scope">
                 <span>¥{{ moneyFormat(scope.row.price, 3) }}</span>
@@ -51,19 +57,11 @@
             <el-table-column label="已退货数量" width="100">
               <template slot-scope="scope">
                 <span v-if="scope.row.returnedQuantity">{{ Number(scope.row.returnedQuantity) }}</span>
-                <span v-else>0</span>
               </template>
             </el-table-column>
             <el-table-column label="剩余数量" width="100">
               <template slot-scope="scope">
                 <span v-if="scope.row.surplusQuantity">{{ Number(scope.row.surplusQuantity) }}</span>
-                <span v-else>0</span>
-              </template>
-            </el-table-column>
-            <el-table-column label="已入库数量" width="100">
-              <template slot-scope="scope">
-                <span v-if="scope.row.stockQuantity">{{ Number(scope.row.stockQuantity) }}</span>
-                <span v-else>0</span>
               </template>
             </el-table-column>
             <el-table-column label="含税小计" align="right" width="100">
@@ -95,6 +93,11 @@
                 <span>¥{{ moneyFormat(scope.row.amount, 3) }}</span>
               </template>
             </el-table-column>
+            <!-- <el-table-column label="操作" align="center" width="80" fixed="right" v-if="!(this.rowData && this.rowData.id)">
+              <template slot-scope="scope">
+                <el-button type="text" @click="clickRemove(scope.$index)">删除</el-button>
+              </template>
+            </el-table-column> -->
           </el-table>
         </div>
       </el-card>
@@ -180,6 +183,7 @@
 
 <script>
 import * as API from '@/api/shengde/productionSystem/purchase/salesReturn'
+// import { purchaseContractGetList, purchaseContractDetail } from '@/api/shengde/productionSystem/purchase/contract'
 import { purchaseContractList, purchaseContractDetail } from '@/api/shengde/productionSystem/purchase/contract'
 import LabelTemplate from '@/components/LabelTemplate'
 import Utils from '@/util/transit'
@@ -211,6 +215,9 @@ export default {
     }
   },
   created() {
+    // purchaseContractGetList({}).then((res) => {
+    //   this.contractList = res.data.data.list
+    // })
     purchaseContractList({ pageNum: 1, pageSize: 9999, type: 1 }).then((res) => {
       this.contractList = res.data.data.records
     })
@@ -324,13 +331,6 @@ export default {
         purchaseContractDetail({ id: val }).then((res) => {
           if (res.data.data.purchaseContractProductList && res.data.data.purchaseContractProductList.length > 0) {
             this.form.purchaseReturnBomList = res.data.data.purchaseContractProductList.map((item) => {
-              let surplusQuantity = 0
-              if (item.stockQuantity) {
-                surplusQuantity = Number(item.stockQuantity)
-              }
-              if (item.returnedQuantity) {
-                surplusQuantity = surplusQuantity - Number(item.returnedQuantity)
-              }
               return {
                 bomColorCode: item.bomColorCode,
                 bomColorName: item.bomColorName,
@@ -341,13 +341,12 @@ export default {
                 price: item.price,
                 recentQuantity: item.quantity,
                 returnedQuantity: item.returnedQuantity,
-                surplusQuantity: surplusQuantity,
+                surplusQuantity: item.surplusQuantity,
                 sumPrice: item.sumPrice,
                 quantity: undefined,
                 amount: 0,
                 purchaseContractProductId: item.id,
                 remark: item.remark,
-                stockQuantity: item.stockQuantity,
               }
             })
           } else {