Pārlūkot izejas kodu

Merge branch 'linwenxin_dev' into pengyouhao_dev

pengyh 1 gadu atpakaļ
vecāks
revīzija
5ce8faabe6

+ 8 - 0
src/api/setActivity.js

@@ -31,3 +31,11 @@ export function promotionQuestionnaireDetail(params) {
     params
   })
 }
+
+export function promotionQuestionnaireStop(params) {
+  return request({
+    url: '/promotion/questionnaire/stop',
+    method: 'post',
+    params
+  })
+}

+ 12 - 12
src/views/auxiliaryFittings/home/index.vue

@@ -204,7 +204,7 @@
 			<div class="mode" >
 				<div class="title">辅材销售退货单统计</div>
 				<div class="flex head">
-					<div class="tab" @click="gotopage('auxiliarySalesReturnOrder','取消订单数量','CANCEL')">
+					<div class="tab" @click="gotopage('auxiliarySalesReturnOrder','已保存数量','SAVE')">
 						<div class="text">
 							<div class="num">{{collectData.saveSalesRetNum}}</div>
 							<div class="title">已保存数量</div>
@@ -374,7 +374,7 @@
 				</div>
 			</div>
 			<div class="mode" >
-				<div class="title">配件旧件返单统计</div>
+				<div class="title">配件旧件返单统计</div>
 				<div class="flex head">
 					<div class="tab" @click="gotopage('oldPartsReturnFactory','已保存数量','SAVE')">
 						<div class="text">
@@ -402,28 +402,28 @@
 					</div>
 				</div>
 			</div>
-			<div class="mode"  @click="gotopage('settleAccountWeixinPay','','')">
+			<div class="mode">
 				<div class="title">微信支付结算统计</div>
 				<div class="flex head">
-					<div class="tab">
+					<div class="tab" @click="gotopage('settleAccountWeixinPay','待结算','WAIT','2')">
 						<div class="text">
 							<div class="num">{{collectData.waitWechatNum}}</div>
 							<div class="title">待结算</div>
 						</div>
 					</div>
-					<div class="tab">
+					<div class="tab" @click="gotopage('settleAccountWeixinPay','可提现','WAIT_ING','2')">
 						<div class="text">
 							<div class="num">{{collectData.waitingWechatNum}}</div>
 							<div class="title">可提现</div>
 						</div>
 					</div>
-					<div class="tab">
+					<div class="tab" @click="gotopage('settleAccountWeixinPay','提现中','ING','2')">
 						<div class="text">
 							<div class="num">{{collectData.ingWechatNum}}</div>
 							<div class="title">提现中</div>
 						</div>
 					</div>
-					<div class="tab">
+					<div class="tab" @click="gotopage('settleAccountWeixinPay','已提现','OVER','2')">
 						<div class="text">
 							<div class="num">{{collectData.overWechatNum}}</div>
 							<div class="title">已提现</div>
@@ -433,16 +433,16 @@
 			</div>
 		</div>
     <div class="flex">
-			<div class="mode"  @click="gotopage('settleAccountOfflinePay','','')">
+			<div class="mode">
 				<div class="title">线下支付结算统计</div>
 				<div class="flex head">
-					<div class="tab">
+					<div class="tab" @click="gotopage('settleAccountOfflinePay','待结算','WAIT','2')">
 						<div class="text">
 							<div class="num">{{collectData.waitWechatLineNum}}</div>
 							<div class="title">待结算</div>
 						</div>
 					</div>
-					<div class="tab">
+					<div class="tab" @click="gotopage('settleAccountOfflinePay','已完成','OVER','2')">
 						<div class="text">
 							<div class="num">{{collectData.overWechatLineNum}}</div>
 							<div class="title">已完成</div>
@@ -630,13 +630,13 @@
           this.collectData = res.data
         })
       },
-      gotopage(name,pageName,pageCode){
+      gotopage(name, pageName, pageCode, pageType){
         if(pageCode){
           this.$router.push({
             name: name,
             params: {
               pageName: pageName,
-              pageType: '-',
+              pageType: pageType || '-',
               pageCode: pageCode,
             },
           })

+ 3 - 3
src/views/auxiliaryFittings/salesManagement/attachmentNewReturn/index.vue

@@ -76,9 +76,9 @@ export default {
 		formItems() { }
 	},
 	created(){
-		if(this.pageCode){
-			this.orderEnginBaseId = this.pageCode
-		}
+    if (this.pageCode && !~['SAVE','SUBMIT','OK'].indexOf(this.pageCode)) {
+      this.orderEnginBaseId = this.pageCode
+    }
 	},
 	watch: {
 		flag(){

+ 3 - 3
src/views/auxiliaryFittings/salesManagement/auxiliarySalesOrder/index.vue

@@ -138,9 +138,9 @@ export default {
 			this.formDialogType = 2
 			this.openForm()
 		}
-		if(this.pageCode){
-			this.orderEnginBaseId = this.pageCode
-		}
+    if (this.pageCode && !~['SAVE','SUBMIT','PAY_NOT_TAKE','PAY_TAKE','CANCEL'].indexOf(this.pageCode)) {
+      this.orderEnginBaseId = this.pageCode
+    }
 	},
 	watch: {
 		flag(){

+ 2 - 2
src/views/auxiliaryFittings/settleAccountManagement/settleAccountOfflinePay/index.vue

@@ -158,11 +158,11 @@ export default {
 		formDialogTitles: ["新增","编辑", "详情"],
 		formDialog: false,
 		formData: {},
-		status: '',
+		tabIndex: this?.$route?.params?.pageType || 1,
+		status: this?.$route?.params?.pageCode || '',
 		totalAmount: 0,
 		workerAmount: 0,
 		websitAmount: 0,
-		tabIndex: 1,
 		workerId: '',
 		websitId: '',
 		tabIndexShow: true,

+ 2 - 2
src/views/auxiliaryFittings/settleAccountManagement/settleAccountWeixinPay/index.vue

@@ -205,12 +205,12 @@ export default {
 			formDialogTitles: ["新增", "编辑", "详情"],
 			formDialog: false,
 			formData: {},
-			status: '',
+			tabIndex: this?.$route?.params?.pageType || 1,
+			status: this?.$route?.params?.pageCode || '',
 			totalAmount: 0,
 			workerAmount: 0,
 			websitAmount: 0,
 			commissionAmount: 0,
-			tabIndex: 1,
 			workerId: '',
 			websitId: '',
 			tabIndexShow: true,

+ 28 - 26
src/views/mallManagement/setActivity/answer.vue

@@ -62,7 +62,7 @@ export default {
         md: 24,
         isShow: true,
         name: 'el-radio',
-        options: [{ label: "单选题", value: 1 }, { label: "多选题", value: 2 }, { label: "填写", value: 3 }],
+        options: [{ label: "单选题", value: 1 }, { label: "多选题", value: 2 }, { label: "填写", value: 3 }, { label: "图片", value: 4 }, { label: "视频", value: 5 }],
         attributes: { filterable: true, placeholder: '请选择', disabled: this.formData.id ? true : false },
         formItemAttributes: {
           label: '类型',
@@ -156,33 +156,35 @@ export default {
               )
             }
           }]
-        }
-        return [{
-          md: 24,
-          name: 'slot-component',
-          attributes: { placeholder: '请输入' },
-          formItemAttributes: {
-            label: '限制字数',
-            prop: 'answer',
-            rules: []
-          },
-          render: (h, { props, onInput }) => {
-            var { value } = props
-            return (
-              <div>
-                {this.formData.answer.map((item, index) => {
-                  return (
-                    <div>
+        }else if(!!~[3].indexOf(this.formData.type)){
+          return [{
+            md: 24,
+            name: 'slot-component',
+            attributes: { placeholder: '请输入' },
+            formItemAttributes: {
+              label: '限制字数',
+              prop: 'answer',
+              rules: []
+            },
+            render: (h, { props, onInput }) => {
+              var { value } = props
+              return (
+                <div>
+                  {this.formData.answer.map((item, index) => {
+                    return (
                       <div>
-                        <el-input type='number' placeholder="请输入限制长度" value={this.formData.answer[index].option_limit} onInput={(val) => { this.formData.answer[index].option_limit = val }}></el-input>
+                        <div>
+                          <el-input type='number' placeholder="请输入限制长度" value={this.formData.answer[index].option_limit} onInput={(val) => { this.formData.answer[index].option_limit = val }}></el-input>
+                        </div>
                       </div>
-                    </div>
-                  )
-                })}
-              </div>
-            )
-          }
-        }]
+                    )
+                  })}
+                </div>
+              )
+            }
+          }]
+        }
+        return []
       })()]
     },
   },

+ 78 - 8
src/views/mallManagement/setActivity/index.vue

@@ -1,7 +1,7 @@
 <template>
   <template-page ref="pageRef" :get-list="getList" :exportList="exportList" :table-attributes="tableAttributes"
     :table-events="tableEvents" :options-evens-group="optionsEvensGroup"
-    :column-parsing="columnParsing" :operation="operation()">
+    :column-parsing="columnParsing" :operation="operation()" :operationColumnWidth="200">
     <div class="cartographer">
       <el-dialog :title="formData.id?'详情':'新增'" width="100%" :modal="false" :visible.sync="formDialog"
         :before-close="formCancel">
@@ -16,6 +16,7 @@
         <div slot="footer" class="dialog-footer">
           <el-button size="mini" @click="formCancel">取 消</el-button>
           <el-button v-if="!formData.id" size="mini" type="primary" @click="formConfirm">确 定</el-button>
+          <el-button v-if="formData.id && !!~[0, 1].indexOf(formData.status)" size="mini" type="primary" @click="zhongzhi">终 止</el-button>
         </div>
       </el-dialog>
     </div>
@@ -27,11 +28,12 @@
 import TemplatePage from '@/components/template/template-page-1.vue'
 import import_mixin from '@/components/template/import_mixin.js'
 import operation_mixin from '@/components/template/operation_mixin.js'
-import {promotionQuestionnaireList,promotionQuestionnaireExport,promotionQuestionnaireAdd,promotionQuestionnaireDetail} from "@/api/setActivity.js"
+import {promotionQuestionnaireList,promotionQuestionnaireExport,promotionQuestionnaireAdd,promotionQuestionnaireStop,promotionQuestionnaireDetail} from "@/api/setActivity.js"
 import answer from "./answer.vue"
 import ImageUpload from '@/components/file-upload'
 import quillEditor from '@/components/v-quill-editor'
 import editTable from "@/components/template/editTable.js"
+import { required, mobileRequired, mobile, httpUrl, email } from '@/components/template/rules_verify.js'
 export default {
   components: { TemplatePage, answer, ImageUpload, quillEditor },
   mixins: [import_mixin, operation_mixin, editTable],
@@ -215,7 +217,11 @@ export default {
         {
           name: 'slot-component',
           md: 24,
-          formItemAttributes: { label: '提交记录', prop: 'promotionQuestionnaireUsers' },
+          formItemAttributes: { 
+            label: '提交记录', 
+            prop: 'promotionQuestionnaireUsers',
+            rules: [{ required: true, message: '请设置', trigger: 'blur' }]
+          },
           render: (h, { props, onInput }) => {
             var { value } = props
             return this.convertTableJson(value, [
@@ -245,7 +251,7 @@ export default {
                 editRender: (h, { row, column, index }) => {
                   return (
                     <div class="redbordererr">
-                      <el-form-item label="" label-width="0px" prop={`promotionQuestionnaireUsers.${index}.${column.columnAttributes.prop}`} rules={[{ required: true, message: '请填写', trigger: 'blur' }]}>
+                      <el-form-item label="" label-width="0px" prop={`promotionQuestionnaireUsers.${index}.${column.columnAttributes.prop}`} rules={mobileRequired}>
                         <el-input value={row[column.columnAttributes.prop]} onInput={val => { row[column.columnAttributes.prop] = val }} placeholder="请输入内容"></el-input>
                       </el-form-item>
                     </div>
@@ -348,7 +354,7 @@ export default {
           label: '',
           'label-width': '0px',
           prop: 'promotionQuestionnaireItems',
-          rules: []
+          rules: [{ required: true, message: '请设置', trigger: 'blur' }]
         },
         render: (h, { props, onInput }) => {
           return (
@@ -366,7 +372,7 @@ export default {
                     render: (h, { row, column, index }) => {
                       return (
                         <div style="padding:6px;">
-                          <div style="font-weight:bold;">{row.isRequire?<span style="color:red">*</span> : null}{index+1}、{row.question}({['单选','多选','填写'][row.type-1]})</div>
+                          <div style="font-weight:bold;">{row.isRequire?<span style="color:red">*</span> : null}{index+1}、{row.question}({['单选','多选','填写','图片','视频'][row.type-1]})</div>
                           {[
                           <div>
                             {row.answer.map(item=><el-radio disabled label="">{item.option_value}</el-radio>)}
@@ -376,7 +382,8 @@ export default {
                           </div>,
                           <div>
                             <el-input disabled placeholder="请输入内容"></el-input>
-                          </div>
+                          </div>,
+                          null
                           ][row.type-1]}
                         </div>
                       )
@@ -431,6 +438,33 @@ export default {
     exportList: promotionQuestionnaireExport,
     // 表格列解析渲染数据更改
     columnParsing(item, defaultData) {
+      if (item.jname === 'qrcode') {
+				defaultData.render = (h, { row, index, column }) => {
+					return (
+						<div style="padding:0 6px;cursor: pointer;">
+							{row.qrcode ? row.qrcode.split(",").map(url => <el-image src={url} preview-src-list={[url]} fit="fit" style="width:80px;height:80px;" />) : null}
+						</div>
+					)
+				}
+			}
+      if (item.jname == 'startTime') {
+				defaultData.render = (h, { row, index, column }) => {
+					return (
+						<div style="padding:0 6px;cursor: pointer;">
+							{row.startTime && row.startTime.split(" ")[0]}
+						</div>
+					)
+				}
+			}
+      if (item.jname == 'endTime') {
+				defaultData.render = (h, { row, index, column }) => {
+					return (
+						<div style="padding:0 6px;cursor: pointer;">
+							{row.endTime && row.endTime.split(" ")[0]}
+						</div>
+					)
+				}
+			}
       return defaultData
     },
     // 操作按钮
@@ -459,6 +493,28 @@ export default {
             })
           }
         },
+        createActivity: {
+          click: ({ row, index, column }) => {
+            this.$router.push({
+              name: "activityOrder",
+              query: {
+                type: "detail",
+                id: row.id,
+              },
+            })
+          }
+        },
+        viewActivity: {
+          click: ({ row, index, column }) => {
+            this.$router.push({
+              name: "activityOrder",
+              query: {
+                type: "list",
+                id: row.id,
+              },
+            })
+          }
+        },
       })
     },
     // 新增
@@ -476,6 +532,7 @@ export default {
         if (valid) {
           var data = {
             ...this.formData,
+            endTime: this.formData.endTime ? `${this.formData.endTime.split(" ")[0]} 23:59:59` : '',
             banner:this.formData.banner.map(item=>item.url).join(","),
             detailImgs:this.formData.detailImgs.map(item=>item.url).join(","),
             promotionQuestionnaireItems:this.formData.promotionQuestionnaireItems.map(item=>{
@@ -489,7 +546,7 @@ export default {
           promotionQuestionnaireAdd(data).then(res=>{
             this.$message({
 							type: 'success',
-							message: `添加成功成功!`,
+							message: `添加成功!`,
 						})
 						this.$refs.pageRef.refreshList()
             this.formCancel()
@@ -497,6 +554,19 @@ export default {
         }
       })
     },
+    // 终止
+    zhongzhi(){
+      promotionQuestionnaireStop({
+        id:this.formData.id
+      }).then(res=>{
+        this.$message({
+          type: 'success',
+          message: `终止成功!`,
+        })
+        this.$refs.pageRef.refreshList()
+        this.formCancel()
+      })
+    },
     // 关闭题目编辑
     questionClose(){
       this.showQuestion = false

+ 1 - 1
src/views/workOrder/workOrderPool/detailModule/PartsApplication/index.vue

@@ -2,7 +2,7 @@
   <zj-page-container>
     <zj-page-fill class="neibuview">
       <template v-if="payData.length">
-        <zj-form-container :formAttributes="{ 'label-position': 'top' }">
+        <zj-form-container>
           <template v-for="(item, index) in payData">
             <formModule :item="payData[index]" :index="index" @shuaxin="shuaxin">
             </formModule>

+ 1 - 1
src/views/workOrder/workOrderPool/detailModule/Payment/index.vue

@@ -2,7 +2,7 @@
   <zj-page-container>
     <zj-page-fill class="neibuview">
       <template v-if="payData.length">
-        <zj-form-container :formAttributes="{ 'label-position': 'top' }">
+        <zj-form-container>
           <template v-for="(item, index) in payData">
             <zj-form-module :title="'支付费用' + (index + 1)" :form-data="payData[index]"
               :form-items="[formItemsL1, formItems(item)][!!~[1,2,3].indexOf(workOrderType) ? 0 : workOrderType == 4 ? 1 : 0]">

+ 1 - 2
src/views/workOrder/workOrderPool/detailModule/SettleAccounts/index.vue

@@ -1,8 +1,7 @@
 <template>
   <zj-page-container>
     <zj-page-fill class="neibuview">
-      <zj-form-container ref="formRef" v-if="formData.orderType" :form-data="formData"
-        :formAttributes="{ 'label-position': 'top' }">
+      <zj-form-container ref="formRef" v-if="formData.orderType" :form-data="formData">
         <zj-form-module :title="`费用结算-${({ INSTALL: '安装', REPAIR: '维修' })[formData.orderType]}`" :form-data="formData"
           :form-items="repairInfo" />
       </zj-form-container>