Jelajahi Sumber

订单结算管理 1.增值服务订单列表,导出
2.服务单明细,查看
3.退款
4.结算,批量结算

linwenxin 1 tahun lalu
induk
melakukan
3202906c28

+ 1 - 1
src/api/orderSettleManag.js

@@ -28,7 +28,7 @@ export function increOrderSettleConfirm(data) {
   return request({
     url: '/incre/order/settle/confirm',
     method: 'post',
-    params: data
+    data: data
   })
 }
 

+ 210 - 9
src/views/valueAddedService/orderSettleManag/index.vue

@@ -1,7 +1,7 @@
 <template>
   <template-page ref="pageRef" :get-list="getList" :exportList="exportList" :table-attributes="tableAttributes"
     :table-events="tableEvents" :moreParameters="moreParameters" :column-parsing="columnParsing" :operation="operation"
-    :operationColumnWidth="200" :replaceOrNotMap="false">
+    :operationColumnWidth="200" :replaceOrNotMap="false" :optionsEvensGroup="optionsEvensGroup">
     <div class="cartographer">
       <el-dialog :title="formTypeName[formType]" width="100%" :modal="false" :visible.sync="formDialog"
         :before-close="formCancel">
@@ -10,13 +10,13 @@
             :form-items="formItems">
           </zj-form-module>
           <zj-form-module title="订单信息" label-width="120px" :showPackUp="false" :form-data="formData"
-            :form-items="formItems">
+            :form-items="formItemsList">
           </zj-form-module>
           <zj-form-module title="附件图片" label-width="120px" :showPackUp="false" :form-data="formData"
-            :form-items="formItems">
+            :form-items="formItemsImgs">
           </zj-form-module>
         </zj-form-container>
-        <div slot="footer" class="dialog-footer">
+        <div slot="footer" v-if="formType" class="dialog-footer">
           <el-button size="mini" @click="formCancel">取 消</el-button>
           <el-button size="mini" @click="formConfirm" type="primary">确定</el-button>
         </div>
@@ -29,6 +29,7 @@
 import TemplatePage from '@/components/template/template-page-1.vue'
 import import_mixin from '@/components/template/import_mixin.js'
 import { increOrderSettleList, increOrderSettleListExport, increOrderSettleDetail, increOrderSettleConfirm, increOrderSettleRefund } from "@/api/orderSettleManag.js"
+import ImageUpload from '@/components/file-upload'
 export default {
   props: {
     storageType: {
@@ -36,7 +37,7 @@ export default {
       default: ""
     }
   },
-  components: { TemplatePage },
+  components: { TemplatePage, ImageUpload },
   mixins: [import_mixin],
   data() {
     return {
@@ -74,7 +75,7 @@ export default {
       formTypeName: ["查看", "结算"],
       formType: -1,
       formData: {
-
+        pgIncreItems: []
       },
       formDialog: false,
     }
@@ -85,8 +86,208 @@ export default {
       return []
     },
     formItems() {
-      return []
-    }
+      return [{
+        md: 24,
+        isShow: true,
+        name: 'slot-component',
+        formItemAttributes: {
+          label: '',
+          prop: '',
+          'label-width': '0px'
+        },
+        render: (h, { props, onInput }) => {
+          var { value } = props
+          return (
+            <div>
+              <el-descriptions border title="" column={2} colon={false} labelStyle={{ width: '10%' }} contentStyle={{ width: '40%' }}>
+                <el-descriptions-item label="所属商户">
+                  {this.formData.companyWechatName}
+                </el-descriptions-item>
+                <el-descriptions-item label="销售网点">
+                  {this.formData.websitName}
+                </el-descriptions-item>
+                <el-descriptions-item label="订单单号" >
+                  {this.formData.id}
+                </el-descriptions-item>
+                <el-descriptions-item label="师傅姓名" >
+                  {this.formData.workerName}
+                </el-descriptions-item>
+                <el-descriptions-item label="师傅联系电话">
+                  {this.formData.workerMobile}
+                </el-descriptions-item>
+                <el-descriptions-item label="师傅身份证号">
+                  {this.formData.workerIdcard}
+                </el-descriptions-item>
+                <el-descriptions-item label="客户姓名" >
+                  {this.formData.userName}
+                </el-descriptions-item>
+                <el-descriptions-item label="客户电话" >
+                  {this.formData.userMobile}
+                </el-descriptions-item>
+                <el-descriptions-item label="详细地址">
+                  {this.formData.userAddress}
+                </el-descriptions-item>
+                <el-descriptions-item label="内机条码">
+                  {this.formData.insideCode}
+                </el-descriptions-item>
+                <el-descriptions-item label="服务单号" >
+                  {this.formData.serviceNo}
+                </el-descriptions-item>
+                <el-descriptions-item label="发票价格" >
+                  {this.formData.invoiceAmount}
+                </el-descriptions-item>
+                <el-descriptions-item label="发票时间">
+                  {this.formData.invoiceTime}
+                </el-descriptions-item>
+                <el-descriptions-item label="服务截止时间">
+                  {this.formData.serviceEndTime}
+                </el-descriptions-item>
+                <el-descriptions-item label="创建人" >
+                  {this.formData.createBy}
+                </el-descriptions-item>
+                <el-descriptions-item label="创建时间" >
+                  {this.formData.createTime}
+                </el-descriptions-item>
+                <el-descriptions-item label="支付状态">
+                  {this.formData.payStatus}
+                </el-descriptions-item>
+                <el-descriptions-item label="支付方式">
+                  {this.formData.payType}
+                </el-descriptions-item>
+                <el-descriptions-item label="支付订单号" >
+                  {this.formData.payNo}
+                </el-descriptions-item>
+                <el-descriptions-item label="支付时间" >
+                  {this.formData.payTime}
+                </el-descriptions-item>
+                <el-descriptions-item label="微信流水号">
+                  {this.formData.transcationId}
+                </el-descriptions-item>
+                <el-descriptions-item label="师傅销售佣金">
+                  {this.formData.workerAmount}
+                </el-descriptions-item>
+                <el-descriptions-item label="结算人员" >
+                  {this.formData.updateBy}
+                </el-descriptions-item>
+                <el-descriptions-item label="操作时间" >
+                  {this.formData.updateTime}
+                </el-descriptions-item>
+              </el-descriptions>
+            </div>
+          )
+        }
+      }]
+    },
+    formItemsList() {
+      return [{
+        md: 24,
+        isShow: true,
+        name: 'slot-component',
+        formItemAttributes: {
+          label: '',
+          prop: '',
+          'label-width': '0px'
+        },
+        render: (h, { props, onInput }) => {
+          var { value } = props
+          return (
+            <zj-table
+              columns={[{
+                columnAttributes: {
+                  label: '服务类型',
+                  prop: 'type'
+                }
+              },
+              {
+                columnAttributes: {
+                  label: '使用类型',
+                  prop: 'usedType'
+                }
+              }, {
+                columnAttributes: {
+                  label: '品牌',
+                  prop: 'brandName'
+                }
+              },
+              {
+                columnAttributes: {
+                  label: '产品大类',
+                  prop: 'mainName'
+                }
+              },
+              {
+                columnAttributes: {
+                  label: '服务内容',
+                  prop: 'content'
+                }
+              },
+              {
+                columnAttributes: {
+                  label: '服务金额(元)',
+                  prop: 'amount'
+                }
+              },
+              {
+                columnAttributes: {
+                  label: '使用限值',
+                  prop: 'limitNum'
+                }
+              },
+              {
+                columnAttributes: {
+                  label: '总手续费',
+                  prop: ''
+                },
+                render: (h, { row, column, index }) => {
+                  return <div style="padding-left:10px">{Number(row["amount"] || 0) / 1000 * 6}</div>
+                }
+              },
+              {
+                columnAttributes: {
+                  label: '师傅分成金额',
+                  prop: 'workerAmount'
+                }
+              },
+              {
+                columnAttributes: {
+                  label: '网点分成金额',
+                  prop: 'websitAmount'
+                }
+              }]}
+              tableData={[{ ...(this.formData.increItem || {}), ...(this.formData.incre || {}) }]}
+              tableAttributes={{
+                size: 'mini',
+                border: true,
+              }} />
+          )
+        }
+      }]
+    },
+    formItemsImgs() {
+      return [{
+        md: 24,
+        name: 'slot-component',
+        formItemAttributes: {
+          label: '',
+          prop: '',
+          'label-width': '0px'
+        },
+        render: (h, { props, onInput }) => {
+          return (
+            <ImageUpload
+              fileList={
+                [{ key: "insideCodeImg", name: "insideCodeImg" }, { key: "machineImg", name: "机器铭牌图片" }, { key: "buyCertImg", name: "购机凭证图片" }].map((item) => ({ url: this.formData[item.key], name: item.name }))
+              }
+              limit={1000}
+              isEdit={false}
+              viewOnline={false}
+              download={false}
+              showName={true}
+            />
+          )
+        }
+      }]
+    },
   },
   methods: {
     // 列表请求函数
@@ -156,7 +357,7 @@ export default {
           increOrderSettleConfirm({
             ids: [this.formData.id]
           }).then(res => {
-            this.$message({ type: 'success', message: `${this.formTypeName[this.formType]}成功!` })
+            this.$message({ type: 'success', message: `操作成功!` })
             this.formCancel()
             this.$refs.pageRef.refreshList()
           })

+ 9 - 8
src/views/workOrder/workOrderPool/index.vue

@@ -177,11 +177,6 @@ export default {
       ]
     }
   },
-  watch: {
-    $route() {
-      this.initFun()
-    }
-  },
   created() {
     this.initFun()
     EventBus.$on('handleOrderClone', () => {
@@ -216,7 +211,7 @@ export default {
           this.$nextTick(() => {
             this.defaultSearchData = [{ "param": "a.sale_order_id", "compare": "like", "value": this.$route.query.saleOrderId, label: "销售订单号" }]
             this.$nextTick(() => {
-              this.defaultSearchData = []
+              // this.defaultSearchData = []
               this.$router.push({ name: "workOrderPool", params: {}, query: {} })
             })
           })
@@ -226,9 +221,9 @@ export default {
           this.detailFormBool = false
           this.recordSelected = []
           this.$nextTick(() => {
-            this.defaultSearchData = [{ "param": "a.pg_incre_item_id", "compare": "like", "value": this.$route.query.pgIncreItemId, label: "销售订单号" }]
+            this.defaultSearchData = [{ "param": "a.pg_incre_item_id", "compare": "like", "value": this.$route.query.pgIncreItemId, label: "增置服务明细ID" }]
             this.$nextTick(() => {
-              this.defaultSearchData = []
+              // this.defaultSearchData = []
               this.$router.push({ name: "workOrderPool", params: {}, query: {} })
             })
           })
@@ -302,6 +297,12 @@ export default {
         if (pam.orderSmallType) {
           pam.params.push({ "param": "a.order_small_type", "compare": "=", "value": pam.orderSmallType })
         }
+        if (this.$route.query.saleOrderId) {
+          pam.params.push({ "param": "a.sale_order_id", "compare": "like", "value": this.$route.query.saleOrderId, label: "销售订单号" })
+        }
+        if (this.$route.query.pgIncreItemId) {
+          pam.params.push({ "param": "a.pg_incre_item_id", "compare": "like", "value": this.$route.query.pgIncreItemId, label: "增置服务明细ID" })
+        }
         cb && cb(pam)
         return orderBaseList(pam)
       } catch (err) {