Преглед на файлове

轮胎商城库存明细

caojunjie преди 2 години
родител
ревизия
91d87521fa

+ 12 - 1
src/api/basicData/inventoryAccount.js

@@ -101,4 +101,15 @@ export const stockDataDetails = (params) => {
       ...params
     }
   })
-}
+}
+
+// 配件精灵
+export const AppPartsStockDataDetails = (params) => {
+  return request({
+    url: '/api/blade-purchase-sales/appParts/stockDataDetails',
+    method: 'get',
+    params: {
+      ...params
+    }
+  })
+}

+ 33 - 0
src/views/Inventory/index.vue

@@ -25,10 +25,17 @@
           <span style="color: #409EFF;cursor: pointer" @click.stop="editOpen(row, 2)">{{ row.cname }}
           </span>
         </template> -->
+          <template slot-scope="{ row }" slot="balance">
+              <span style="color: #409EFF;cursor: pointer" @click.stop="storeInventoryOpen(row)">
+                  {{ row.balance }}
+              </span>
+          </template>
+
         <template slot-scope="{ row, index }" slot="menu">
           <el-tooltip class="item" effect="dark" content="盘存" placement="top">
             <i class="tradingIcon icon-inStock" @click="rowCell(row, index)" />
           </el-tooltip>
+
           <!-- <el-tooltip class="item" effect="dark" content="删除" placement="top">
             <i class="tradingIcon icon-del" />
           </el-tooltip>
@@ -95,6 +102,32 @@ export default {
     this.getAllWorkDicts()
   },
   methods: {
+      //点击可用库存打开
+      storeInventoryOpen(row) {
+          console.log(this.$store.getters.inventoryAccount,105);
+          if (this.$store.getters.inventoryAccount) {
+              this.$alert("明细账已存在,请保存关闭明细账再进行操作", "温馨提示", {
+                  confirmButtonText: "确定",
+                  type: "warning",
+                  callback: action => {
+                      console.log(action);
+                  }
+              });
+          } else {
+              console.log(row)
+              console.log(row.storageId,row.goodsId)
+              this.$router.$avueRouter.closeTag("/tirePartsMall/inventory/detail");
+              this.$router.push({
+                  path: "/tirePartsMall/inventory/detail",
+                  query: {
+                      stockId: row.storageId,
+                      goodsId: row.goodsId,
+                      type:'JL'
+                  },
+              });
+          }
+      },
+
     getAllWorkDicts() {
         this.getWorkDicts("label").then(res => {
             this.findObject(this.option.column, "label").dicData = res.data.data;

+ 42 - 0
src/views/tirePartsMall/configuration/commodity.json

@@ -119,6 +119,48 @@
       "overHidden": true
     },
     {
+      "label": "是否原厂",
+      "prop": "originalFactory",
+      "type":"select",
+      "search":true,
+      "width": 120,
+      "dicData":[{
+        "label":"否",
+        "value":"0"
+      },{
+        "label":"是",
+        "value":"1"
+      }]
+    },
+    {
+      "label": "是否防爆",
+      "prop": "explosionProof",
+      "type":"select",
+      "search":true,
+      "width": 120,
+      "dicData":[{
+        "label":"否",
+        "value":0
+      },{
+        "label":"是",
+        "value":1
+      }]
+    },
+    {
+      "label": "是否自修补",
+      "prop": "selfRecovery",
+      "type":"select",
+      "search":true,
+      "width": 120,
+      "dicData":[{
+        "label":"否",
+        "value":"0"
+      },{
+        "label":"是",
+        "value":"1"
+      }]
+    },
+    {
       "label": "备注",
       "prop": "remarks",
       "slot": true

+ 42 - 1
src/views/tirePartsMall/configuration/commodityxsho.json

@@ -98,7 +98,6 @@
       "slot": true,
       "overHidden": true
     },
-
     {
       "label": "花纹",
       "prop": "brandItem",
@@ -108,6 +107,48 @@
       "search": true
     },
     {
+      "label": "是否原厂",
+      "prop": "originalFactory",
+      "type":"select",
+      "search":true,
+      "width": 120,
+      "dicData":[{
+        "label":"否",
+        "value":"0"
+      },{
+        "label":"是",
+        "value":"1"
+      }]
+    },
+    {
+      "label": "是否防爆",
+      "prop": "explosionProof",
+      "type":"select",
+      "search":true,
+      "width": 120,
+      "dicData":[{
+        "label":"否",
+        "value":0
+      },{
+        "label":"是",
+        "value":1
+      }]
+    },
+    {
+      "label": "是否自修补",
+      "prop": "selfRecovery",
+      "type":"select",
+      "search":true,
+      "width": 120,
+      "dicData":[{
+        "label":"否",
+        "value":"0"
+      },{
+        "label":"是",
+        "value":"1"
+      }]
+    },
+    {
       "label": "共享公司",
       "prop": "sharedCompany",
       "slot": true,

+ 6 - 1
src/views/tirePartsMall/financialManagement/collectionSettlement/detailsPage.vue

@@ -195,7 +195,12 @@ export default {
           searchDefaultTime: ["00:00:00", "23:59:59"],
           format: "yyyy-MM-dd",
           valueFormat: "yyyy-MM-dd HH:mm:ss",
-          value: ''
+          value: '',
+            rules: [{
+                required: true,
+                message: " ",
+                trigger: "blur"
+            }]
         }, {
           label: '单据编号',
           prop: "sysNo",

+ 4 - 4
src/views/tirePartsMall/financialManagement/collectionSettlement/index.vue

@@ -78,13 +78,13 @@ export default {
         column: [{
           label: '单据编号',
           prop: "sysNo",
-          searchOrder:1,
+          searchOrder:3,
           search: true,
           overHidden: true,
         }, {
           label: '合同号',
           prop: "contractNumber",
-          searchOrder:2,
+          searchOrder:4,
           search: true,
           overHidden: true,
         }, {
@@ -92,7 +92,7 @@ export default {
           prop: "corpId",
           search: true,
           remote:true,
-          searchOrder:3,
+          searchOrder:1,
           type: 'select',
           props: {
             label: 'cname',
@@ -166,7 +166,7 @@ export default {
           label: "结算日期",
           prop: "settlementDate",
           searchProp: "settlementDateList",
-          searchOrder:5,
+          searchOrder:2,
           type: "date",
           search:true,
           overHidden: true,

+ 30 - 23
src/views/tirePartsMall/financialManagement/paymentSettlement/detailsPage.vue

@@ -56,7 +56,7 @@
                   :enumerationValue="35.1"></c-upload>
 
     </div>
-    <el-dialog title="导入销售" append-to-body class="el-dialogDeep" :visible.sync="billDetailDialog" width="80%"
+    <el-dialog title="导入订单" append-to-body class="el-dialogDeep" :visible.sync="billDetailDialog" width="80%"
       :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" top="10vh" v-dialog-drag>
       <bill-detail :params="params" :billType="billType" :flag="1" @closeFun="closeBillDetail"
         @importProMent="importProMent">
@@ -166,7 +166,12 @@ export default {
           searchDefaultTime: ["00:00:00", "23:59:59"],
           format: "yyyy-MM-dd",
           valueFormat: "yyyy-MM-dd HH:mm:ss",
-          value: ''
+          value: '',
+            rules: [{
+                required: true,
+                message: " ",
+                trigger: "blur"
+            }]
         }, {
           label: '单据编号',
           prop: "sysNo",
@@ -245,6 +250,29 @@ export default {
     detailData: Object
   },
   async created() {
+      //  获取今天的日期
+      var today = new Date();
+      var year = today.getFullYear();
+      var month = String(today.getMonth() + 1).padStart(2, '0');
+      var day = String(today.getDate()).padStart(2, '0');
+      var hours = String(today.getHours()).padStart(2, '0');
+      var minutes = String(today.getMinutes()).padStart(2, '0');
+      var seconds = String(today.getSeconds()).padStart(2, '0');
+
+      // 构建今天的日期时间字符串
+      var todayDateTime = year + '-' + month + '-' + day + ' ' + hours + ':' + minutes + ':' + seconds;
+      if (this.onLoad.id) {
+          this.refresh(this.onLoad.id)
+          this.$set(this.optionForm, 'disabled', true)
+          this.$set(this.optionContactsBack, 'disabled', true)
+          this.isSaveBtn = true
+          this.isFinanceBtn = true
+          this.isMenu = true
+      } else {
+          this.findObject(this.optionForm.column, 'settlementDate').value = todayDateTime
+          this.editButton = true
+      }
+
     this.optionContacts = await this.getColumnData(this.getColumnName(266.1), this.optionContactsBack);
     // let thisAmountSum = 0
     this.findObject(this.optionContacts.column, "thisAmount").change = ({ value, column }) => {
@@ -255,28 +283,7 @@ export default {
       this.form.amount = Number(thisAmountSum)
     }
     console.log(this.onLoad.id);
-    //  获取今天的日期
-    var today = new Date();
-    var year = today.getFullYear();
-    var month = String(today.getMonth() + 1).padStart(2, '0');
-    var day = String(today.getDate()).padStart(2, '0');
-    var hours = String(today.getHours()).padStart(2, '0');
-    var minutes = String(today.getMinutes()).padStart(2, '0');
-    var seconds = String(today.getSeconds()).padStart(2, '0');
 
-    // 构建今天的日期时间字符串
-    var todayDateTime = year + '-' + month + '-' + day + ' ' + hours + ':' + minutes + ':' + seconds;
-    if (this.onLoad.id) {
-      this.refresh(this.onLoad.id)
-      this.$set(this.optionForm, 'disabled', true)
-      this.$set(this.optionContactsBack, 'disabled', true)
-      this.isSaveBtn = true
-      this.isFinanceBtn = true
-      this.isMenu = true
-    } else {
-      this.findObject(this.optionForm.column, 'settlementDate').value = todayDateTime
-      this.editButton = true
-    }
   },
   methods: {
     rowDelBox(row, index) {

+ 3 - 2
src/views/tirePartsMall/financialManagement/paymentSettlement/index.vue

@@ -97,6 +97,7 @@ export default {
         }, {
           label: "供应商",
           prop: "corpId",
+            searchOrder:1,
           search: true,
           type: "select",
           props: {
@@ -142,7 +143,7 @@ export default {
           search: true,
           overHidden: true,
           type: "date",
-          overHidden: true,
+            searchOrder:2,
           width: 100,
           searchRange: true,
           searchDefaultTime: ["00:00:00", "23:59:59"],
@@ -190,7 +191,7 @@ export default {
         //     value: "id",
         //     res: 'data.records'
         //   }
-        // }, 
+        // },
         // {
         //   label: "更新日期",
         //   prop: "updateTime",

+ 62 - 21
src/views/tirePartsMall/inventory/detail.vue

@@ -9,10 +9,11 @@
     </avue-crud>
   </basic-container>
 </template>
-  
+
 <script>
 import option from "./config/detail.json";
-import { stockDataDetails } from "@/api/basicData/inventoryAccount";
+import LTdetail from './config/LTdetail.json'
+import {AppPartsStockDataDetails, stockDataDetails} from "@/api/basicData/inventoryAccount";
 
 export default {
   name: "detail",
@@ -34,16 +35,28 @@ export default {
   async created() {
     // this.option = option
     console.log('打开了');
-    this.option = await this.getColumnData(this.getColumnName(279), option);
+    if (JSON.parse(localStorage.getItem('saber-tenantId')).content == 883868){
+        this.option = LTdetail;
+    }else {
+        this.option = await this.getColumnData(this.getColumnName(279), option);
+    }
     this.$store.commit("DOMAS_IN_DETAIL");
   },
   activated() {
     this.$store.commit("DOMAS_IN_DETAIL");
-    this.params = {
-      goodsId: this.$route.query.goodsId,
-      stockId: this.$route.query.stockId
+    if (this.$route.query.type == 'JL'){
+        this.params = {
+            goodsId: this.$route.query.goodsId,
+            storageId: this.$route.query.stockId
+        }
+    }else {
+        this.params = {
+            goodsId: this.$route.query.goodsId,
+            stockId: this.$route.query.stockId,
+            dot:this.$route.query.dot
+        }
     }
-    this.onLoad(this.page)
+      this.onLoad(this.page)
   },
   methods: {
     onLoad(page, params) {
@@ -53,18 +66,31 @@ export default {
         this.$refs.crud.toggleRowExpansion(item, false)
       })
       this.loading = true;
-      stockDataDetails(params)
-        .then(res => {
-          console.log('res', res);
-          this.dataList = res.data.data ? res.data.data : [];
-          this.page.total = res.data.data.total;
-          if (this.page.total) {
-            this.option.height = window.innerHeight - 260;
-          }
-        })
-        .finally(() => {
-          this.loading = false;
-        });
+      if (this.$route.query.type == 'JL') {
+          AppPartsStockDataDetails(params).then(res=>{
+              console.log(res)
+              this.dataList = res.data.data ? res.data.data : [];
+              this.page.total = res.data.data.total;
+              if (this.page.total) {
+                  this.option.height = window.innerHeight - 260;
+              }
+          }).finally(() => {
+              this.loading = false;
+          });
+      }else {
+          stockDataDetails(params)
+              .then(res => {
+                  console.log('res', res);
+                  this.dataList = res.data.data ? res.data.data : [];
+                  this.page.total = res.data.data.total;
+                  if (this.page.total) {
+                      this.option.height = window.innerHeight - 260;
+                  }
+              })
+              .finally(() => {
+                  this.loading = false;
+              });
+      }
     },
     searchChange(params, done) {
       this.onLoad(this.page, params);
@@ -126,6 +152,22 @@ export default {
               id: row.id
             },
           });
+        }else if (row.bizTypeName == '销售') {
+            this.$router.$avueRouter.closeTag("/salesOrder/index");
+            this.$router.push({
+                path: "/salesOrder/index",
+                query: {
+                    orderId: row.id
+                },
+            });
+        } else if (row.bizTypeName == '采购') {
+            this.$router.$avueRouter.closeTag("/purchaseOrder/index");
+            this.$router.push({
+                path: "/purchaseOrder/index",
+                query: {
+                    orderId: row.id
+                },
+            });
         } else {
           this.$router.$avueRouter.closeTag("/tirePartsMall/purchasingManagement/warehouseEntryOrder/index");
           this.$router.push({
@@ -159,6 +201,5 @@ export default {
   },
 }
 </script>
-  
+
 <style scoped></style>
-  

+ 4 - 1
src/views/tirePartsMall/inventory/index.vue

@@ -173,6 +173,7 @@ export default {
             width: 100
           }, {
             label: '批次',
+                search: true,
             prop: "dot",
             overHidden: true,
             width: 100
@@ -322,6 +323,7 @@ export default {
           }
         });
       } else {
+          console.log(row)
         this.params.corpId = row.corpId
         this.params.itemId = row.goodsId
         this.params.storageId = row.storageId
@@ -330,7 +332,8 @@ export default {
           path: "/tirePartsMall/inventory/detail",
           query: {
             stockId: row.storageId,
-            goodsId: row.goodsId
+            goodsId: row.goodsId,
+              dot:row.dot
           },
         });
       }

+ 39 - 0
src/views/tirePartsMall/salesManagement/outboundTask/index.vue

@@ -24,6 +24,10 @@
           <el-button type="success" icon="el-icon-finished" size="small" @click="dispatching"
             :disabled="selectionList.length <= 0">派工
           </el-button>
+
+            <el-button type="success" icon="el-icon-finished" size="small" @click="shipRevokeWorkOrderfun"
+                       :disabled="!chexiaofun()">撤销派工
+            </el-button>
         </template>
       </avue-crud>
     </basic-container>
@@ -33,6 +37,7 @@
 
 <script>
 import { getList, remove, outboundWorkOrder,typeSave } from "@/api/tirePartsMall/salesManagement/outboundTask";
+import { shipRevokeWorkOrder } from '@/api/tirePartsMall/salesManagement/outboundTask'
 import da from "element-ui/src/locale/lang/da";
 // import detailsPage from "./detailsPage"
 
@@ -251,10 +256,44 @@ export default {
 
   },
   methods: {
+      // 撤销派工的数据判断
+      chexiaofun(){
+          let typefalse = false
+          for(let item of this.selectionList) {
+              if (item.statusName == '已派工') {
+                  typefalse = true
+              }else {
+
+                  typefalse = false
+                  break;
+              }
+          }
+          return typefalse
+      },
     selectionChange(list) {
       console.log(list);
       this.selectionList = list
     },
+      // 撤销派工
+      shipRevokeWorkOrderfun(){
+          this.$confirm('是否要撤销派工?', '提示', {
+              confirmButtonText: '确定',
+              cancelButtonText: '取消',
+              type: 'warning'
+          }).then(()=>{
+              const data = []
+              for(let i in this.selectionList) {
+                  data.push(this.selectionList[i].id)
+              }
+              shipRevokeWorkOrder(data.join(',')).then(res=>{
+                  this.$message({
+                      type: 'success',
+                      message: '撤销派工成功!'
+                  });
+                  this.onLoad(this.page)
+              })
+          })
+      },
     dispatching() {
       this.$confirm('是否确认派工?', '提示', {
         confirmButtonText: '确定',

+ 1 - 1
src/views/tirePartsMall/salesManagement/purchaseOrder/detailsPage.vue

@@ -589,7 +589,7 @@ export default {
                 },
 
                 {
-                    label: '结算金额',
+                    label: '已付金额',
                     prop: "paymentAmountTl",
                     disabled: true
                 },

+ 4 - 0
src/views/tirePartsMall/salesManagement/purchaseOrder/index.vue

@@ -295,6 +295,10 @@ export default {
           prop: "totalMoney",
           overHidden: true,
         }, {
+                label: '已付金额',
+                prop: "paymentAmountTl",
+                disabled: true
+            }, {
           label: '状态',
           prop: "status",
           search: true,

+ 44 - 21
src/views/tirePartsMall/salesManagement/saleOrder/detailsPage.vue

@@ -72,6 +72,19 @@
                                     @click="handlePrint">打印</el-button>
                             </template>
 
+                            <!--<template slot="goodsId" slot-scope="{ row }">-->
+                            <!--    <div>-->
+                            <!--        <el-select v-model="value" filterable placeholder="请选择">-->
+                            <!--            <el-option-->
+                            <!--                v-for="item in options"-->
+                            <!--                :key="item.value"-->
+                            <!--                :label="item.label"-->
+                            <!--                :value="item.value">-->
+                            <!--            </el-option>-->
+                            <!--        </el-select>-->
+                            <!--    </div>-->
+                            <!--</template>-->
+
                             <template slot="goodsNum" slot-scope="{ row }">
                                 <el-input v-if="!mingxibaocun" size="small" v-model="row.goodsNum" style="width: 100%"></el-input>
                                 <span v-else>{{ row.goodsNum }}</span>
@@ -97,17 +110,20 @@
                                     <template slot="inventory">{{ inventory }}吨</template>
                                 </el-input>
                             </template> -->
-                            <!-- <template slot="goodsId" slot-scope="{ row, index }">
-                                <span  style="display:flex">
-                                    <el-select v-model="row.goodsId" placeholder="请选择" size="small" filterable
-                                        style="width:60%" >
-                                        <el-option v-for="item in goodsIdoptions" :key="item.id" :label="item.cname"
-                                            :value="item.id">
-                                        </el-option>
-                                    </el-select>
-                                    <el-button icon="el-icon-search" size="small" @click="rePick(row, index)"></el-button>
-                                </span>
-                            </template> -->
+                            <!--<template slot="goodsId" slot-scope="{ row, index }">-->
+                            <!--    <span v-if="!mingxibaocun"  style="display:flex">-->
+                            <!--        <el-select v-model="row.goodsId" placeholder="请选择" size="small" filterable-->
+                            <!--            style="width:60%">-->
+                            <!--            <el-option v-for="item in goodsListShow" :key="item.id" :label="item.cname"-->
+                            <!--                :value="item.id">-->
+                            <!--            </el-option>-->
+                            <!--        </el-select>-->
+                            <!--        &lt;!&ndash;<el-button icon="el-icon-search" size="small" @click="canmefalse()"></el-button>&ndash;&gt;-->
+                            <!--    </span>-->
+                            <!--    <span v-else>{{row.goodsName}}</span>-->
+                            <!--</template>-->
+
+
                             <template slot-scope="{type,size,row,index,disabled}" slot="menu">
                                 <el-button v-if="mingxibaocun" :size="size" :disabled="disabled || isAdd" :type="type"
                                            :icon="row.$cellEdit ? 'el-icon-plus' : 'el-icon-edit'" @click="hangeditBtn(row, index)">编辑
@@ -538,7 +554,7 @@ export default {
                     prop: "totalMoney",
                     disabled: true
                 }, {
-                    label: '结算金额',
+                    label: '已收金额',
                     prop: "paymentAmountTl",
                     disabled: true
                 },{
@@ -609,15 +625,15 @@ export default {
                 column: [{
                     label: '轮胎名称',
                     prop: 'goodsId',
-                    width: 200,
+                    width: 250,
                     disabled: false,
                     remote: true,
                     overHidden: true,
                     type: 'select',
                     dicData: [],
                     props: {
-                        label: 'cname',
-                        value: 'id'
+                        label: 'goodsName',
+                        value: 'goodsId'
                     },
                     // dicUrl: '/api/blade-sales-part/goodsDesc/goodsListAll?cname={{key}}'
                     dicUrl: `/api/blade-sales-part/goodsDesc/goodsListXs?cname={{key}}&customId=&enableOrNot=1&stock=${this.goodsId}`
@@ -1173,9 +1189,6 @@ export default {
         //确认导入触发
         async importGoods() {
             this.surplusRouteQuantityOption.push({ storageQuantity: '0' });
-            console.log(this.goodsListSave,'导入按钮')
-            console.log(this.surplusRouteQuantityOption,'导入按钮2')
-            console.log(this.tableData,'导入按钮3')
             if (this.goodsListSave.length > 0) {
                 this.goodsListSaveHandle()
             } else {
@@ -1228,7 +1241,17 @@ export default {
             this.tableData = this.goodsListSave
             this.tableDataHandle()
         },
-
+        // 获取添加轮胎弹窗里的数据
+        goodsPageXsfun(){
+            goodsPageXs({
+                customId: this.form.customerId,
+                stock: this.form.storageId,
+                enableOrNot: 1
+            }).then(res=>{
+                const data = res.data.data;
+                this.goodsListShow = data.records;
+            })
+        },
         //导入轮胎弹窗列表查询
         onLoadfun(page, params = { artsVision: this.form.belongToCorpId }) {
             this.loading = true;
@@ -1269,7 +1292,6 @@ export default {
         },
         // 采购明细行编辑
         hangeditBtn(row,index){
-            console.log(row)
             this.picihaolistfun(row.id)
             row.dotedittype = true
             // 价格数量
@@ -1277,6 +1299,7 @@ export default {
             row.pricetype = true
             // 编辑和保存状态切换
             this.mingxibaocun = false
+            this.goodsPageXsfun()
         },
         // 保存按钮
         hangbaocun(row) {
@@ -1489,7 +1512,7 @@ export default {
                     // this.isDisabled = true
                     console.log('待确认');
                     this.optionForm.column.forEach(item => {
-                        if (item.label === '成本' || item.label === '毛利' || item.label === '销售金额' || item.label === '运费' || item.label === '总金额' || item.label === '结算金额' || item.label === '单据编号' || item.label === '来源编号') {
+                        if (item.label === '成本' || item.label === '毛利' || item.label === '销售金额' || item.label === '运费' || item.label === '总金额' || item.label === '已收金额' || item.label === '单据编号' || item.label === '来源编号') {
                             this.$set(item, 'disabled', true)
                         } else {
                             this.$set(item, 'disabled', false)

+ 4 - 0
src/views/tirePartsMall/salesManagement/saleOrder/index.vue

@@ -255,6 +255,10 @@ export default {
           prop: "totalMoney",
           overHidden: true,
         }, {
+                label: '已收金额',
+                prop: "paymentAmountTl",
+                disabled: true
+            }, {
           label: '状态',
           prop: "status",
           search: true,