瀏覽代碼

no message

linwenxin 1 年之前
父節點
當前提交
6cfefef8fc

+ 17 - 0
src/api/orderBranchAccount.js

@@ -0,0 +1,17 @@
+import request, { postBlob, getBlob, handleImport } from '@/utils/request'
+
+export function increOrderSettleCountList(data) {
+  return request({
+    url: `/incre/order/settle/count/list?moduleId=${data.moduleId}`,
+    method: 'post',
+    data
+  })
+}
+
+export function increOrderSettleCountListExport(data, name) {
+  return postBlob({
+    url: '/incre/order/settle/count/list/export',
+    data,
+    name
+  })
+}

+ 42 - 0
src/api/orderSettleManag.js

@@ -0,0 +1,42 @@
+import request, { postBlob, getBlob, handleImport } from '@/utils/request'
+
+export function increOrderSettleList(data) {
+  return request({
+    url: `/incre/order/settle/list?moduleId=${data.moduleId}`,
+    method: 'post',
+    data
+  })
+}
+
+export function increOrderSettleListExport(data, name) {
+  return postBlob({
+    url: '/incre/order/settle/list/export',
+    data,
+    name
+  })
+}
+
+export function increOrderSettleDetail(params) {
+  return request({
+    url: '/incre/order/settle/detail',
+    method: 'post',
+    params: params
+  })
+}
+
+export function increOrderSettleConfirm(data) {
+  return request({
+    url: '/incre/order/settle/confirm',
+    method: 'post',
+    params: data
+  })
+}
+
+export function increOrderSettleRefund(params) {
+  return request({
+    url: '/incre/order/settle/refund',
+    method: 'post',
+    params: params
+  })
+}
+

+ 50 - 0
src/api/valueAddedConfig.js

@@ -0,0 +1,50 @@
+import request, { postBlob, getBlob, handleImport } from '@/utils/request'
+
+export function increConfigList(data) {
+  return request({
+    url: `/increConfig/list?moduleId=${data.moduleId}`,
+    method: 'post',
+    data
+  })
+}
+
+export function increConfigListExport(data, name) {
+  return postBlob({
+    url: '/increConfig/list/export',
+    data,
+    name
+  })
+}
+
+export function increConfigDetail(params) {
+  return request({
+    url: '/increConfig/detail',
+    method: 'post',
+    params: params
+  })
+}
+
+export function increConfigAdd(data) {
+  return request({
+    url: '/increConfig/add',
+    method: 'post',
+    params: data
+  })
+}
+
+export function increConfigUpdate(data) {
+  return request({
+    url: '/increConfig/update',
+    method: 'post',
+    params: data
+  })
+}
+
+export function increConfigUpOrDown(data) {
+  return request({
+    url: '/increConfig/upOrDown',
+    method: 'post',
+    params: data
+  })
+}
+

+ 123 - 0
src/views/valueAddedService/extendedWarrantyWork/index.vue

@@ -0,0 +1,123 @@
+<template>
+  <template-page ref="pageRef" :getList="getList" :operation="operation" :exportList="exportList"
+    :columnParsing="columnParsing" :tableAttributes="tableAttributes" :tableEvents="tableEvents"
+    :screeningAnalysis="screeningAnalysis" :filterMethod="filterMethod" :replaceOrNotMap="true">
+  </template-page>
+</template>
+
+<script>
+import TemplatePage from '@/components/template/template-page-1.vue'
+import import_mixin from '@/components/template/import_mixin.js'
+import { orderBaseList, orderBaseListExport } from "@/api/workOrderPool.js"
+import ywgdjs from "@/assets/ywgdjs.png"
+import yjs from "@/assets/yjs.png"
+export default {
+  components: {
+    TemplatePage,
+  },
+  mixins: [import_mixin],
+  data() {
+    return {
+      // 表格属性
+      tableAttributes: {
+        // 启用勾选列
+        selectColumn: false,
+      },
+      // 表格事件
+      tableEvents: {
+        'selection-change': this.selectionChange
+      },
+    }
+  },
+  methods: {
+    screeningAnalysis(jname, val) {
+      if (jname == 'orderFlags') {
+        return (val || []).map(item => item.tagName).join(',')
+      } else {
+        return val
+      }
+    },
+    filterMethod(value, row, column) {
+      if (column['property'] == 'orderFlags') {
+        return (row[column['property']] || []).map(item => item.tagName).join(',') === value
+      }
+      return row[column['property']] === value
+    },
+
+    // 列表请求函数
+    getList(p, cb) {
+      var pam = JSON.parse(JSON.stringify(p))
+      try {
+        pam.isYb = true
+        cb && cb(pam)
+        return orderBaseList(pam)
+      } catch (err) {
+      }
+    },
+
+    // 列表导出函数
+    exportList: orderBaseListExport,
+
+    // 表格列解析渲染数据更改
+    columnParsing(item, defaultData) {
+      if (item.jname === 'orderFlags') {
+        defaultData.render = (h, { row, index, column }) => {
+          return (
+            <div style="padding:0 6px;display:flex;align-items:center;">
+              {(row[column.columnAttributes.prop] || []).map(item => {
+                if (item.tagName == "已完工") {
+                  return (
+                    <img src={ywgdjs} style="width:22px;height:22px;" />
+                  )
+                } else if (item.tagName == "已结算") {
+                  return (
+                    <img src={yjs} style="width:22px;height:22px;" />
+                  )
+                } else {
+                  return (
+                    <div style="display: inline-block;border:1px solid #409EFF; color:#409EFF;padding:0 2px;border-radius: 4px;margin:2px 2px 0 0;">
+                      {item.tagName}
+                    </div>
+                  )
+                }
+              })}
+            </div>
+          )
+        }
+      }
+      if (item.jname === 'appointmentTime') {
+        defaultData.render = (h, { row, index, column }) => {
+          return (
+            <div style="padding:0 6px;cursor: pointer;">
+              {row[column.columnAttributes.prop] ? row[column.columnAttributes.prop].split(" ")[0] : ""}
+            </div>
+          )
+        }
+      }
+      return defaultData
+    },
+
+    // 监听勾选变化
+    selectionChange(data) {
+      this.recordSelected = data
+    },
+
+    operation(h, { row, index, column }) {
+      return (
+        <div class='operation-btns'>
+          <el-button type="text" onClick={() => {
+            this.$router.push({
+              name: "workOrderPool",
+              query: {
+                id: row.id,
+              }
+            })
+          }}>详情</el-button>
+        </div>
+      )
+    },
+  }
+}
+</script>
+
+<style lang="scss" scoped></style>

+ 97 - 0
src/views/valueAddedService/orderBranchAccount/index.vue

@@ -0,0 +1,97 @@
+<template>
+  <template-page ref="pageRef" :get-list="getList" :table-attributes="tableAttributes" :table-events="tableEvents"
+    :options-evens-group="optionsEvensGroup" :more-parameters="moreParameters" :column-parsing="columnParsing"
+    :operation="operation">
+    <div class="cartographer">
+      <el-dialog title="明细" width="100%" :modal="false" :visible.sync="formDialog" :before-close="formDialog = false">
+        <template-page v-if="formDialog" :get-list="getList2" />
+      </el-dialog>
+    </div>
+  </template-page>
+</template>
+
+<script>
+import TemplatePage from '@/components/template/template-page-1.vue'
+import import_mixin from '@/components/template/import_mixin.js'
+import {
+  increOrderSettleCountList,
+  increOrderSettleCountListExport
+} from '@/api/orderBranchAccount'
+import { increOrderSettleList } from "@/api/orderSettleManag.js"
+export default {
+  components: { TemplatePage },
+  mixins: [import_mixin],
+  data() {
+    return {
+      // 事件组合
+      optionsEvensGroup: [],
+      // 表格属性
+      tableAttributes: {
+        // 启用勾选列
+        selectColumn: false
+      },
+      // 表格事件
+      tableEvents: {
+        'selection-change': this.selectionChange
+      },
+      // 勾选选中数据
+      recordSelected: [],
+      formDialog: false,
+      detailParams: []
+    }
+  },
+  computed: {
+    // 更多参数
+    moreParameters() {
+      return []
+    },
+  },
+  methods: {
+    // 列表请求函数
+    getList(p) {
+      this.detailParams = p.params.filter(item => item.param === "a.pay_time")
+      return increOrderSettleCountList(p)
+    },
+    // 列表导出函数
+    exportList: increOrderSettleCountListExport,
+    // 表格列解析渲染数据更改
+    columnParsing(item, defaultData) {
+      return defaultData
+    },
+    // 监听勾选变化
+    selectionChange(data) {
+      this.recordSelected = data
+    },
+    // 操作按钮
+    operation(h, { row, index, column }) {
+      return (
+        <div class="operation-btns">
+          <el-button type="text" onClick={() => {
+            this.detailParams.push(
+              {
+                param: "a.websit_id",
+                compare: "=",
+                value: row.websitId
+              }
+            )
+            this.$nextTick(() => {
+              this.formDialog = true
+            })
+          }}>明细</el-button>
+        </div>
+      )
+    },
+    // 明细列表
+    getList2(p) {
+      var pam = JSON.parse(JSON.stringify(p))
+      pam.params = [...pam.params, ...this.detailParams,]
+      try {
+        return increOrderSettleList(pam)
+      } catch (err) {
+      }
+    },
+  }
+}
+</script>
+
+<style lang="scss" scoped></style>

+ 177 - 0
src/views/valueAddedService/orderSettleManag/index.vue

@@ -0,0 +1,177 @@
+<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">
+    <div class="cartographer">
+      <el-dialog :title="formTypeName[formType]" width="100%" :modal="false" :visible.sync="formDialog"
+        :before-close="formCancel">
+        <zj-form-container v-if="formDialog" ref="formRef" :form-data="formData" :styleSwitch="false">
+          <zj-form-module title="基础信息" label-width="120px" :showPackUp="false" :form-data="formData"
+            :form-items="formItems">
+          </zj-form-module>
+          <zj-form-module title="订单信息" label-width="120px" :showPackUp="false" :form-data="formData"
+            :form-items="formItems">
+          </zj-form-module>
+          <zj-form-module title="附件图片" label-width="120px" :showPackUp="false" :form-data="formData"
+            :form-items="formItems">
+          </zj-form-module>
+        </zj-form-container>
+        <div slot="footer" class="dialog-footer">
+          <el-button size="mini" @click="formCancel">取 消</el-button>
+          <el-button size="mini" @click="formConfirm" type="primary">确定</el-button>
+        </div>
+      </el-dialog>
+    </div>
+  </template-page>
+</template>
+
+<script>
+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"
+export default {
+  props: {
+    storageType: {
+      type: String,
+      default: ""
+    }
+  },
+  components: { TemplatePage },
+  mixins: [import_mixin],
+  data() {
+    return {
+      // 事件组合
+      optionsEvensGroup: [[
+        [
+          {
+            name: '批量结算',
+            click: () => {
+              if (this.recordSelected.length === 0) {
+                this.$message.warning('请勾选订单')
+                return
+              }
+              increOrderSettleConfirm({
+                ids: this.recordSelected.map(item => item.id)
+              }).then(res => {
+                this.$message({ type: 'success', message: `成功!` })
+                this.$refs.pageRef.refreshList()
+              })
+            }
+          },
+        ]
+      ]],
+      // 表格属性
+      tableAttributes: {
+        // 启用勾选列
+        selectColumn: true
+      },
+      // 表格事件
+      tableEvents: {
+        'selection-change': this.selectionChange
+      },
+      // 勾选选中数据
+      recordSelected: [],
+      formTypeName: ["查看", "结算"],
+      formType: -1,
+      formData: {
+
+      },
+      formDialog: false,
+    }
+  },
+  computed: {
+    // 更多参数
+    moreParameters() {
+      return []
+    },
+    formItems() {
+      return []
+    }
+  },
+  methods: {
+    // 列表请求函数
+    getList: increOrderSettleList,
+    // 列表导出函数
+    exportList: increOrderSettleListExport,
+    // 表格列解析渲染数据更改
+    columnParsing(item, defaultData) {
+      return defaultData
+    },
+    // 监听勾选变化
+    selectionChange(data) {
+      this.recordSelected = data
+    },
+    // 操作按钮
+    operation(h, { row, index, column }) {
+      return (
+        <div class='operation-btns'>
+          <el-button type="text" onClick={() => {
+            this.formType = 0
+            this.getDetail(row.id)
+          }}>查看</el-button>
+          <el-button type="text" onClick={() => {
+            this.$router.push({
+              name: "workOrderPool",
+              query: {
+                pgIncreItemId: row.id,
+              }
+            })
+          }}>服务单明细</el-button>
+          <el-popconfirm
+            title={`是否确定退款?`}
+            onConfirm={() => {
+              increOrderSettleRefund({ id: row.id }).then(res => {
+                this.$message({ type: 'success', message: `退款成功!` })
+                this.$refs.pageRef.refreshList()
+              })
+            }}
+          >
+            <el-button type="text" slot="reference">退款</el-button>
+          </el-popconfirm>
+          <el-button type="text" onClick={() => {
+            this.formType = 1
+            this.getDetail(row.id)
+          }}>结算</el-button>
+        </div>
+      )
+    },
+    getDetail(id) {
+      increOrderSettleDetail({ id }).then(res => {
+        Object.assign(this.formData, res.data)
+        this.openForm()
+      })
+    },
+    openForm() {
+      this.formDialog = true
+    },
+    // 关闭弹窗
+    formCancel() {
+      this.$refs.formRef.$refs.inlineForm.clearValidate()
+      this.$data.formData = this.$options.data().formData
+      this.formDialog = false
+    },
+    formConfirm() {
+      this.$refs.formRef.validate((valid, invalidFields, errLabels) => {
+        if (valid) {
+          increOrderSettleConfirm({
+            ids: [this.formData.id]
+          }).then(res => {
+            this.$message({ type: 'success', message: `${this.formTypeName[this.formType]}成功!` })
+            this.formCancel()
+            this.$refs.pageRef.refreshList()
+          })
+        }
+      })
+    },
+  }
+}
+</script>
+
+<style lang="scss">
+.redbordererr {
+  .el-form-item {
+    margin: 0 !important;
+    overflow: hidden;
+  }
+}
+</style>

+ 126 - 0
src/views/valueAddedService/valueAddedConfig/index.vue

@@ -0,0 +1,126 @@
+<template>
+  <template-page ref="pageRef" :get-list="getList" :exportList="exportList" :table-attributes="tableAttributes"
+    :table-events="tableEvents" :options-evens-group="optionsEvensGroup" :moreParameters="moreParameters"
+    :column-parsing="columnParsing" :operation="operation" :replaceOrNotMap="false">
+    <div class="cartographer">
+      <el-dialog title="增值服务配置" width="100%" :modal="false" :visible.sync="formDialog" :before-close="formCancel">
+        <zj-form-container v-if="formDialog" ref="formRef" :form-data="formData" :styleSwitch="false">
+          <zj-form-module title="" label-width="120px" :showPackUp="false" :form-data="formData"
+            :form-items="formItems">
+          </zj-form-module>
+        </zj-form-container>
+        <div slot="footer" class="dialog-footer">
+          <el-button size="mini" @click="formCancel">取 消</el-button>
+          <el-button size="mini" @click="formConfirm" type="primary">确定</el-button>
+        </div>
+      </el-dialog>
+    </div>
+  </template-page>
+</template>
+
+<script>
+import TemplatePage from '@/components/template/template-page-1.vue'
+import import_mixin from '@/components/template/import_mixin.js'
+import { increConfigList, increConfigListExport, increConfigDetail, increConfigAdd, increConfigUpdate, increConfigUpOrDown } from "@/api/valueAddedConfig.js"
+export default {
+  props: {
+    storageType: {
+      type: String,
+      default: ""
+    }
+  },
+  components: { TemplatePage },
+  mixins: [import_mixin],
+  data() {
+    return {
+      // 事件组合
+      optionsEvensGroup: [],
+      // 表格属性
+      tableAttributes: {
+        // 启用勾选列
+        selectColumn: false
+      },
+      // 表格事件
+      tableEvents: {
+        'selection-change': this.selectionChange
+      },
+      // 勾选选中数据
+      recordSelected: [],
+      formData: {
+
+      },
+      formDialog: false,
+    }
+  },
+  computed: {
+    // 更多参数
+    moreParameters() {
+      return []
+    },
+    formItems() {
+      return []
+    }
+  },
+  methods: {
+    // 列表请求函数
+    getList: increConfigList,
+    // 列表导出函数
+    exportList: increConfigListExport,
+    // 表格列解析渲染数据更改
+    columnParsing(item, defaultData) {
+      return defaultData
+    },
+    // 监听勾选变化
+    selectionChange(data) {
+      this.recordSelected = data
+    },
+    // 操作按钮
+    operation(h, { row, index, column }) {
+      return (
+        <div class='operation-btns'>
+          <el-button type="text" onClick={() => {
+            this.getDetail(row.purchaseId, 2)
+          }}>详情</el-button>
+        </div>
+      )
+    },
+    getDetail(id, type) {
+      increConfigDetail({ id }).then(res => {
+        Object.assign(this.formData, res.data)
+        this.openForm()
+      })
+    },
+    openForm() {
+      this.formDialog = true
+    },
+    // 关闭弹窗
+    formCancel() {
+      this.$refs.formRef.$refs.inlineForm.clearValidate()
+      this.$data.formData = this.$options.data().formData
+      this.formDialog = false
+    },
+    formConfirm() {
+      this.$refs.formRef.validate((valid, invalidFields, errLabels) => {
+        if (valid) {
+          increConfigAdd({
+            ids: [this.formData.id]
+          }).then(res => {
+            this.$message({ type: 'success', message: `成功!` })
+            this.formCancel()
+            this.$refs.pageRef.refreshList()
+          })
+        }
+      })
+    },
+  }
+}
+</script>
+
+<style lang="scss">
+.redbordererr {
+  .el-form-item {
+    margin: 0 !important;
+    overflow: hidden;
+  }
+}
+</style>

+ 12 - 0
src/views/workOrder/workOrderPool/index.vue

@@ -221,6 +221,18 @@ export default {
             })
           })
         }
+        if (this.$route.query.pgIncreItemId) {
+          this.createFormBool = false
+          this.detailFormBool = false
+          this.recordSelected = []
+          this.$nextTick(() => {
+            this.defaultSearchData = [{ "param": "a.pg_incre_item_id", "compare": "like", "value": this.$route.query.pgIncreItemId, label: "销售订单号" }]
+            this.$nextTick(() => {
+              this.defaultSearchData = []
+              this.$router.push({ name: "workOrderPool", params: {}, query: {} })
+            })
+          })
+        }
       }
     },
     selectable(row, index) {