瀏覽代碼

no message

linwenxin 6 月之前
父節點
當前提交
e67f41d3ab

+ 2 - 2
src/components/template/operation_mixin.js

@@ -98,10 +98,10 @@ export default {
                         size="mini"
                         type={opt[key]?.btnType || 'text'}
                         onClick={() => {
-                          opt[key]?.click({ row, index, column })
+                          opt?.[key]?.click({ row, index, column })
                         }}
                       >
-                        {setBtnName(opt[key]?.name, { row, index, column }) || role.moduleName}
+                        {setBtnName(opt?.[key]?.name, { row, index, column }) || role.moduleName}
                       </el-button>
                     ) : null
                   }

+ 1 - 1
src/utils/print.js

@@ -35,7 +35,7 @@ Print.prototype = {
     var str = '',
       styles = document.querySelectorAll('style,link')
     for (var i = 0; i < styles.length; i++) {
-      str += styles[i].outerHTML
+      str += styles?.[i]?.outerHTML || ''
     }
     str += '<style>' + (this.options.noPrint ? this.options.noPrint : '.no-print') + '{display:none;}</style>'
 

+ 393 - 0
src/views/partsManagement/masterAccountingManagement/components/website-parts-shop-sales-information.vue

@@ -0,0 +1,393 @@
+<template>
+  <div class="website-parts-shop-sales">
+    <div class="website-parts-shop-sales-sl">
+      <el-page-header
+        @back="
+          () => {
+            $emit('goBack')
+          }
+        "
+        content="销售单信息"
+      ></el-page-header>
+      <br />
+      <div style="margin-bottom: -1px">
+        <div style="display: flex">
+          <div style="width: 50%; margin-right: -1px">
+            <el-descriptions
+              :column="2"
+              size="small"
+              border
+              labelClassName="labelClassName"
+              contentClassName="contentClassName"
+            >
+              <el-descriptions-item>
+                <template slot="label"> 网点 </template>
+                <div>
+                  {{ item.websitName }}
+                </div>
+              </el-descriptions-item>
+              <el-descriptions-item>
+                <template slot="label"> 申请类别 </template>
+                <div>
+                  {{ item.applyCategory }}
+                </div>
+              </el-descriptions-item>
+              <el-descriptions-item>
+                <template slot="label"> 申请类型 </template>
+                <div>
+                  {{ item.applyType }}
+                </div>
+              </el-descriptions-item>
+              <el-descriptions-item>
+                <template slot="label"> 发货方式 </template>
+                <div>
+                  {{ item.deliveryType }}
+                </div>
+              </el-descriptions-item>
+            </el-descriptions>
+          </div>
+          <div style="width: 50%">
+            <el-descriptions
+              :column="2"
+              size="small"
+              border
+              labelClassName="labelClassName"
+              contentClassName="contentClassName"
+            >
+              <el-descriptions-item>
+                <template slot="label"> 销售类型 </template>
+                <div>
+                  {{ item.buyPeople }}
+                </div>
+              </el-descriptions-item>
+              <el-descriptions-item>
+                <template slot="label"> 申请人 </template>
+                <div>
+                  {{ item.workerName }}
+                </div>
+              </el-descriptions-item>
+              <el-descriptions-item>
+                <template slot="label"> 联系电话 </template>
+                <div>
+                  {{ item.mobile }}
+                </div>
+              </el-descriptions-item>
+              <el-descriptions-item>
+                <template slot="label"> 接收单位 </template>
+                <div>
+                  {{ item.receiveUnit }}
+                </div>
+              </el-descriptions-item>
+            </el-descriptions>
+          </div>
+        </div>
+      </div>
+      <div style="margin-bottom: -1px">
+        <el-descriptions
+          :column="2"
+          size="small"
+          border
+          labelClassName="labelClassName2"
+          contentClassName="contentClassNam2"
+        >
+          <el-descriptions-item>
+            <template slot="label"> 发货单位 </template>
+            <div>
+              {{ item.websitName }}
+            </div>
+          </el-descriptions-item>
+          <el-descriptions-item>
+            <template slot="label"> 操作人 </template>
+            <div>
+              <!--  -->
+            </div>
+          </el-descriptions-item>
+          <el-descriptions-item>
+            <template slot="label"> 收件地址 </template>
+            <div>
+              {{ item.receiveAddr }}
+            </div>
+          </el-descriptions-item>
+          <el-descriptions-item>
+            <template slot="label"> 详细地址 </template>
+            <div>
+              {{ item.addr }}
+            </div>
+          </el-descriptions-item>
+        </el-descriptions>
+      </div>
+      <div style="margin-bottom: -1px">
+        <div style="display: flex">
+          <div style="width: 50%; margin-right: -1px">
+            <el-descriptions
+              :column="2"
+              size="small"
+              border
+              labelClassName="labelClassName"
+              contentClassName="contentClassName"
+            >
+              <el-descriptions-item>
+                <template slot="label"> 支付方式 </template>
+                <div>
+                  {{ item.payType }}
+                </div>
+              </el-descriptions-item>
+              <el-descriptions-item>
+                <template slot="label"> 销售金额 </template>
+                <div>
+                  {{ item.totalAmount }}
+                </div>
+              </el-descriptions-item>
+              <el-descriptions-item>
+                <template slot="label"> 应收金额 </template>
+                <div>
+                  {{ item.itemTotalAmount }}
+                </div>
+              </el-descriptions-item>
+              <el-descriptions-item>
+                <template slot="label"> 收款状态 </template>
+                <div>
+                  {{ item.creditStatus }}
+                </div>
+              </el-descriptions-item>
+            </el-descriptions>
+          </div>
+          <div style="width: 50%">
+            <el-descriptions
+              :column="2"
+              size="small"
+              border
+              labelClassName="labelClassName"
+              contentClassName="contentClassName"
+            >
+              <el-descriptions-item>
+                <template slot="label"> 下单时间 </template>
+                <div>
+                  {{ item.createTime }}
+                </div>
+              </el-descriptions-item>
+              <el-descriptions-item>
+                <template slot="label"> </template>
+                <div>
+                  <!--  -->
+                </div>
+              </el-descriptions-item>
+              <el-descriptions-item>
+                <template slot="label"> 收款人 </template>
+                <div>
+                  {{ item.updateBy }}
+                </div>
+              </el-descriptions-item>
+              <el-descriptions-item>
+                <template slot="label"> 收款时间 </template>
+                <div>
+                  {{ item.updateTime }}
+                </div>
+              </el-descriptions-item>
+            </el-descriptions>
+          </div>
+        </div>
+      </div>
+      <div style="margin-bottom: -1px">
+        <el-descriptions size="small" border labelClassName="labelClassName">
+          <el-descriptions-item labelStyle="width:15.45%">
+            <template slot="label"> 备注 </template>
+            <div>
+              <!--  -->
+            </div>
+          </el-descriptions-item>
+        </el-descriptions>
+      </div>
+      <div style="margin-bottom: 10px; margin-top: 10px; width: 100%">
+        <el-table :data="items" size="mini" border style="width: 100%" header-cell-class-name="headerRowColor">
+          <el-table-column label="序号" width="60">
+            <template slot-scope="scope">
+              <div class="serial_number">{{ scope.$index + 1 }}</div>
+            </template>
+          </el-table-column>
+          <el-table-column label="配件编码" prop="partsNumber"> </el-table-column>
+          <el-table-column label="配件名称" prop="partsName"> </el-table-column>
+          <el-table-column label="单位" width="120" prop="goodsStockUnit"> </el-table-column>
+          <el-table-column label="市场价" width="120" prop="marketPrice"> </el-table-column>
+          <el-table-column label="销售价" width="120" prop="salesPrice"> </el-table-column>
+          <el-table-column label="优惠价" width="120" prop="secondPrice"> </el-table-column>
+          <el-table-column label="数量" width="100" prop="qty"> </el-table-column>
+          <el-table-column label="总金额" width="100" prop="totalAmount"> </el-table-column>
+        </el-table>
+      </div>
+      <div style="margin-bottom: 10px; width: 100%">
+        <el-table :data="payOrder" size="mini" border header-cell-class-name="headerRowColor" style="width: 100%">
+          <el-table-column prop="outTradeNo" label="商户订单号" width="235" />
+          <el-table-column prop="orderNo" label="商户单号" width="150" />
+          <el-table-column prop="payFlag" label="支付状态" width="80">
+            <template slot-scope="scope">
+              {{ { NO: '否', YES: '是' }[scope.row.payFlag] }}
+            </template>
+          </el-table-column>
+          <el-table-column prop="payValue" label="支付金额" width="80" />
+          <el-table-column prop="createTime" label="生成时间" width="140" />
+          <el-table-column prop="timeExpire" label="失效时间" width="140" />
+          <el-table-column prop="mchNo" label="商户号" width="150" />
+          <el-table-column prop="openid" label="支付账号" show-overflow-tooltip />
+          <el-table-column prop="transactionId" label="微信流水号" show-overflow-tooltip />
+        </el-table>
+      </div>
+      <div style="text-align: right">
+        <el-button size="small" type="primary" @click="shoukuan">收款</el-button>
+      </div>
+    </div>
+    <pay-popup-window
+      v-if="visible"
+      :item="rowData"
+      :visible="visible"
+      @success="
+        () => {
+          $refs.pageRef.refreshList()
+        }
+      "
+      @setVisible="
+        bool => {
+          visible = bool
+          rowData = null
+        }
+      "
+    />
+  </div>
+</template>
+
+<script>
+import PayPopupWindow from './pay-popup-window.vue'
+export default {
+  components: { PayPopupWindow },
+  props: {
+    item: {
+      type: Object,
+      default: () => ({})
+    }
+  },
+  data() {
+    return {
+      visible: false,
+      rowData: null
+    }
+  },
+  computed: {
+    items() {
+      return this?.item?.item ? [this?.item?.item] : []
+    },
+    payOrder() {
+      return this?.item?.payOrder ? [this?.item?.payOrder] : []
+    }
+  },
+  methods: {
+    shoukuan() {
+      this.rowData = this.item
+      this.visible = true
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.website-parts-shop-sales {
+  min-width: 860px;
+  position: absolute;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+  z-index: 999;
+  background: #fff;
+  overflow: hidden;
+  .website-parts-shop-sales-sl {
+    padding: 20px;
+    width: 100%;
+    height: 100%;
+    overflow: auto;
+  }
+  .sizeinput {
+    width: 100%;
+    height: 100%;
+    position: relative;
+    .inputjh {
+      position: absolute;
+      top: 0;
+      left: 0;
+      right: 0;
+      bottom: 0;
+      display: flex;
+      justify-content: space-between;
+      align-items: center;
+      ::v-deep .el-input {
+        margin: 0 5px;
+        &:first-child {
+          margin-left: 0 !important;
+        }
+        &:last-child {
+          margin-right: 0 !important;
+        }
+      }
+    }
+  }
+  .serial_number {
+    width: 100%;
+    height: 100%;
+    padding: 6px !important;
+    text-align: center;
+  }
+  .caozuo {
+    width: 100%;
+    height: 36px;
+    display: flex;
+    justify-content: center;
+    align-items: center;
+  }
+  ::v-deep .is-disabled {
+    .el-textarea__inner,
+    .el-input__inner {
+      background-color: #fff;
+      border-color: #fff;
+    }
+    .el-input__suffix {
+      display: none;
+    }
+  }
+  ::v-deep th .cell {
+    width: 100%;
+    height: 100%;
+    text-align: center;
+  }
+  ::v-deep .el-table__cell {
+    .el-select,
+    .el-input,
+    .el-textarea__inner,
+    .el-input__inner {
+      height: 36px !important;
+      border: none !important;
+    }
+  }
+  ::v-deep .cell {
+    height: 100%;
+    padding: 0 !important;
+  }
+  ::v-deep .labelClassName {
+    width: 6% !important;
+  }
+  ::v-deep .contentClassName {
+    width: 19% !important;
+  }
+  ::v-deep .labelClassName2 {
+    width: 6% !important;
+  }
+  ::v-deep .contentClassNam2 {
+    width: 44% !important;
+  }
+
+  ::v-deep .headerRowColor {
+    .cell {
+      height: 100%;
+      padding: 6px !important;
+    }
+  }
+}
+</style>

+ 27 - 7
src/views/partsManagement/masterAccountingManagement/index.vue

@@ -37,6 +37,20 @@
         </zj-page-container>
       </el-dialog>
     </div>
+    <website-parts-shop-sales-information
+      v-if="showFromBool"
+      :item="{ ...formData }"
+      @success="
+        () => {
+          $refs.pageRef.refreshList()
+        }
+      "
+      @goBack="
+        () => {
+          showFromBool = false
+        }
+      "
+    />
     <pay-popup-window
       v-if="visible"
       :item="rowData"
@@ -68,8 +82,9 @@ import {
   ppartsCreditDetail
 } from '@/api/masterAccountingManagement'
 import PayPopupWindow from './components/pay-popup-window.vue'
+import WebsitePartsShopSalesInformation from './components/website-parts-shop-sales-information.vue'
 export default {
-  components: { TemplatePage, PayPopupWindow },
+  components: { TemplatePage, PayPopupWindow, WebsitePartsShopSalesInformation },
   mixins: [import_mixin, operation_mixin],
   data() {
     return {
@@ -87,14 +102,13 @@ export default {
       pageLevel: 0,
       showTable: true,
       collectItem: {},
-      formData: {
-        companyWechatName: JSON.parse(localStorage.getItem('greemall_user')).companyName
-      },
+      formData: {},
       formBool: false,
       formEdit: false,
       tagStatus: '',
       visible: false,
-      rowData: null
+      rowData: null,
+      showFromBool: false
     }
   },
   computed: {
@@ -175,7 +189,11 @@ export default {
           },
           click: ({ row, index, column }) => {
             ppartsCreditDetail({ id: row.id }).then(res => {
-              console.log(res)
+              console.log(res.data, '-----------------')
+              this.formData = res.data
+              this.$nextTick(() => {
+                this.showFromBool = true
+              })
             })
           }
         },
@@ -187,7 +205,9 @@ export default {
           click: ({ row, index, column }) => {
             ppartsCreditDetail({ id: row.id }).then(res => {
               this.rowData = res.data
-              this.visible = true
+              this.$nextTick(() => {
+                this.visible = true
+              })
             })
           }
         }