aXin-0810 hai 1 ano
pai
achega
5e39150f7a

+ 23 - 23
src/App.vue

@@ -1,6 +1,6 @@
 <template>
 <template>
   <div id="app">
   <div id="app">
-    <router-view/>
+    <router-view />
   </div>
   </div>
 </template>
 </template>
 
 
@@ -17,8 +17,8 @@ export default {
 <style lang="scss">
 <style lang="scss">
 .el-tree {
 .el-tree {
   .is-current {
   .is-current {
-    &>div:nth-child(1) {
-      &>.custom-tree-node {
+    & > div:nth-child(1) {
+      & > .custom-tree-node {
         color: #409eff !important;
         color: #409eff !important;
       }
       }
     }
     }
@@ -41,33 +41,33 @@ export default {
   z-index: 999999 !important;
   z-index: 999999 !important;
 }
 }
 
 
-.diy-dialog{
+.diy-dialog {
   .el-dialog__header {
   .el-dialog__header {
     padding: 0 !important;
     padding: 0 !important;
   }
   }
-  .el-dialog__headerbtn{
+  .el-dialog__headerbtn {
     z-index: 9999999;
     z-index: 9999999;
   }
   }
-  .el-dialog__body{
+  .el-dialog__body {
     padding: 0 !important;
     padding: 0 !important;
   }
   }
-  .box-card{
+  .box-card {
     margin-bottom: 0 !important;
     margin-bottom: 0 !important;
   }
   }
-  .el-table-column--selection{
-    .cell{
+  .el-table-column--selection {
+    .cell {
       padding: 0 10px !important;
       padding: 0 10px !important;
     }
     }
   }
   }
-  .el-form-item__label{
+  .el-form-item__label {
     padding-bottom: 0 !important;
     padding-bottom: 0 !important;
   }
   }
-  .el-table__cell{
+  .el-table__cell {
     padding: 0 !important;
     padding: 0 !important;
   }
   }
-  .is-center{
-    .text-view{
-      div{
+  .is-center {
+    .text-view {
+      div {
         width: 100%;
         width: 100%;
         text-align: center !important;
         text-align: center !important;
       }
       }
@@ -94,10 +94,10 @@ export default {
     padding: 20px;
     padding: 20px;
     overflow-y: auto;
     overflow-y: auto;
   }
   }
-  .el-dialog__headerbtn{
+  .el-dialog__headerbtn {
     z-index: 99999 !important;
     z-index: 99999 !important;
   }
   }
-  .el-dialog__footer{
+  .el-dialog__footer {
     background: #fff !important;
     background: #fff !important;
   }
   }
 }
 }
@@ -121,18 +121,18 @@ export default {
     padding: 0px;
     padding: 0px;
     overflow-y: auto;
     overflow-y: auto;
   }
   }
-  .el-dialog__headerbtn{
+  .el-dialog__headerbtn {
     z-index: 99999 !important;
     z-index: 99999 !important;
   }
   }
-  .el-dialog__footer{
+  .el-dialog__footer {
     background: #fff !important;
     background: #fff !important;
   }
   }
 }
 }
-.custom-tree-node{
-  .el-input__inner{
-      border: none !important;
-      padding: 0 !important;
-      width: auto !important;
+.custom-tree-node {
+  .el-input__inner {
+    border: none !important;
+    padding: 0 !important;
+    width: auto !important;
   }
   }
 }
 }
 </style>
 </style>

+ 49 - 0
src/api/goodsPurchasedStored.js

@@ -0,0 +1,49 @@
+import request, { postBlob, getBlob, handleImport } from '@/utils/request'
+
+export function goodsPurchaseList(data) {
+  return request({
+    url: `/goods/purchase/list?moduleId=${data.moduleId}`,
+    method: 'post',
+    data
+  })
+}
+
+export function goodsPurchaseListExport(data, name) {
+  return postBlob({
+    url: '/goods/purchase/list/export',
+    data,
+    name
+  })
+}
+
+export function goodsPurchaseItemList(data) {
+  return request({
+    url: `/goods/purchase/item/list?moduleId=${data.moduleId}`,
+    method: 'post',
+    data
+  })
+}
+
+export function goodsPurchaseItemListExport(data, name) {
+  return postBlob({
+    url: '/goods/purchase/item/list/export',
+    data,
+    name
+  })
+}
+
+export function goodsPurchaseCodeList(data) {
+  return request({
+    url: `/goods/purchase/code/list?moduleId=${data.moduleId}`,
+    method: 'post',
+    data
+  })
+}
+
+export function goodsPurchaseCodeListExport(data, name) {
+  return postBlob({
+    url: '/goods/purchase/code/list/export',
+    data,
+    name
+  })
+}

+ 49 - 0
src/api/merchandisePurchaseReturn.js

@@ -0,0 +1,49 @@
+import request, { postBlob, getBlob, handleImport } from '@/utils/request'
+
+export function goodsPurchaseRetList(data) {
+  return request({
+    url: `/goods/purchase/ret/list?moduleId=${data.moduleId}`,
+    method: 'post',
+    data
+  })
+}
+
+export function goodsPurchaseRetListExport(data, name) {
+  return postBlob({
+    url: '/goods/purchase/ret/list/export',
+    data,
+    name
+  })
+}
+
+export function goodsPurchaseRetItemList(data) {
+  return request({
+    url: `/goods/purchase/ret/item/list?moduleId=${data.moduleId}`,
+    method: 'post',
+    data
+  })
+}
+
+export function goodsPurchaseRetItemListExport(data, name) {
+  return postBlob({
+    url: '/goods/purchase/ret/item/list/export',
+    data,
+    name
+  })
+}
+
+export function goodsPurchaseRetCodeList(data) {
+  return request({
+    url: `/goods/purchase/ret/code/list?moduleId=${data.moduleId}`,
+    method: 'post',
+    data
+  })
+}
+
+export function goodsPurchaseRetCodeListExport(data, name) {
+  return postBlob({
+    url: '/goods/purchase/ret/code/list/export',
+    data,
+    name
+  })
+}

+ 489 - 438
src/layout/components/Navbar.vue

@@ -34,10 +34,16 @@
             @select="handleSelect"
             @select="handleSelect"
           ></el-autocomplete>
           ></el-autocomplete>
         </div> -->
         </div> -->
-		<div style="margin-right: 20px;cursor: pointer;" @click="getList();isShow = true">
-			<i class="el-icon-message-solid"></i>
-			<el-badge :is-dot="isDot1 || isDot2"></el-badge>
-		</div>
+        <div
+          style="margin-right: 20px; cursor: pointer"
+          @click="
+            getList()
+            isShow = true
+          "
+        >
+          <i class="el-icon-message-solid"></i>
+          <el-badge :is-dot="isDot1 || isDot2"></el-badge>
+        </div>
         <shortcut />
         <shortcut />
         <template v-if="device !== 'mobile'">
         <template v-if="device !== 'mobile'">
           <!-- 全屏控制 -->
           <!-- 全屏控制 -->
@@ -62,136 +68,150 @@
       </div>
       </div>
     </div>
     </div>
     <notice-bar />
     <notice-bar />
-	<el-drawer
-	  title="系统消息"
-	  :visible.sync="isShow"
-	  :append-to-body="true"
-	  :with-header="false"
-	  direction="rtl"
-	  size="25%">
-		<div class="message">
-			<div class="head">
-				<div class="flex_asb">
-					<el-radio-group size="small" v-model="messageType" @change="getList">
-						<el-badge :is-dot="isDot1" class="item">
-							<el-radio-button :label="['WBI','WBK','CRE_ORDER','SEND_MALL','RP_MALL','CR_SALES']">系统消息</el-radio-button>
-						</el-badge>
-						<el-badge :is-dot="isDot2" class="item">
-							<el-radio-button :label="['NOTICE']">平台公告</el-radio-button>
-						</el-badge>
-					</el-radio-group>
-					<el-switch
-					  v-model="isOpen"
-					  @change="updateIsNotice"
-					  inactive-text="消息弹窗"
-					  active-color="#13ce66"
-					  inactive-color="#ff4949">
-					</el-switch>
-				</div>
-				<el-radio-group size="mini" v-model="dateType" @change="getList" style="margin: 10px 0;">
-				  <el-radio-button label="">全部</el-radio-button>
-				  <el-radio-button :label="0">今天</el-radio-button>
-				  <el-radio-button :label="1">昨天</el-radio-button>
-				  <el-radio-button :label="6">近7天</el-radio-button>
-				  <el-radio-button :label="29">近30天</el-radio-button>
-				</el-radio-group>
-				<div class="flex_asb">
-					<el-radio-group size="mini" v-model="readFlag" @change="getList">
-						<el-radio-button label="">全部</el-radio-button>
-						<el-badge :hidden="count>0?false:true" :value="count" class="item" style="margin: 0 10px">
-							<el-radio-button label="NO">未读</el-radio-button>
-						</el-badge>
-						<el-badge :value="count" :hidden="true" class="item" >
-							<el-radio-button label="YES">已读</el-radio-button>
-						</el-badge>
-					</el-radio-group>
-					<div style="color: #409EFF;cursor: pointer;" @click="confirmRead">
-						<i class="el-icon-message-solid"></i>
-						<span style="font-size: 14px;">全部已读</span>
-					</div>
-				</div>
-			</div>
-			<el-card class="box-card" v-for="(item,index) in messageData" style="margin-top: 10px;">
-				<div @click="isShow = false;toDetail(item.adminNoticeType,item.paidType,(item.adminNoticeType=='NOTICE'?item.noticeId:item.orderId),item.id)">
-					<div v-if="item.adminNoticeType == 'NOTICE'">
-						<div class="flex_asb item">
-							<div>
-								<span>公告类型:</span>
-								<span>{{statusFilter(item.adminNoticeType)}}</span>
-							</div>
-							<div class="read1" v-if="item.readFlag == 'NO'">未读</div>
-							<div class="read2" v-if="item.readFlag == 'YES'">已读</div>
-						</div>
-						<div class="item">
-							<div>
-								<span>文件标题:</span>
-								<span style="color: #409Eff">{{item.title}}</span>
-							</div>
-						</div>
-						<div class="item">
-							<div>
-								<span>发布人:</span>
-								<span>{{item.issueNickName | ''}}</span>
-							</div>
-						</div>
-						<div class="item">
-							<div>
-								<span>发布时间:</span>
-								<span>{{item.issueTime}}</span>
-							</div>
-						</div>
-						<div v-if="item.readFlag == 'YES'" class="item">
-							<span>阅读人:</span>
-							<span>{{item.adminNickName }} {{item.readTime}}</span>
-						</div>
-					</div>
-					<div v-else>
-						<div class="flex_asb item">
-							<div>
-								<span>消息类型:</span>
-								<span>{{statusFilter(item.adminNoticeType)}}</span>
-							</div>
-							<div class="read1" v-if="item.readFlag == 'NO'">未读</div>
-							<div class="read2" v-if="item.readFlag == 'YES'">已读</div>
-						</div>
-						<div class="item">
-							<div>
-								<span>订单编号:</span>
-								<span style="color: #409Eff">{{item.orderId}}</span>
-							</div>
-						</div>
-						<div class="item">
-							<div>
-								<span>消息内容:</span>
-								<span>{{item.content}}</span>
-							</div>
-						</div>
-						<div class="item">
-							<div>
-								<span>创建时间:</span>
-								<span>{{item.createTime}}</span>
-							</div>
-						</div>
-						<div v-if="item.readFlag == 'YES'" class="item">
-							<span>阅读人:</span>
-							<span>{{item.adminNickName }} {{item.readTime}}</span>
-						</div>
-					</div>
-				</div>
-			</el-card>
-			<el-empty v-if="messageData.length == 0" description="暂无数据"></el-empty>
-			<div class="flex_ac bottom">
-				<el-pagination
-					@current-change="handleCurrentChange"
-					:current-page="currentPage"
-					:page-size="pageSize"
-					layout="prev, pager, next"
-					background
-					:total="listTotal"
-				></el-pagination>
-			</div>
-		</div>
-	</el-drawer>
+    <el-drawer
+      title="系统消息"
+      :visible.sync="isShow"
+      :append-to-body="true"
+      :with-header="false"
+      direction="rtl"
+      size="25%"
+    >
+      <div class="message">
+        <div class="head">
+          <div class="flex_asb">
+            <el-radio-group size="small" v-model="messageType" @change="getList">
+              <el-badge :is-dot="isDot1" class="item">
+                <el-radio-button :label="['WBI', 'WBK', 'CRE_ORDER', 'SEND_MALL', 'RP_MALL', 'CR_SALES']"
+                  >系统消息</el-radio-button
+                >
+              </el-badge>
+              <el-badge :is-dot="isDot2" class="item">
+                <el-radio-button :label="['NOTICE']">平台公告</el-radio-button>
+              </el-badge>
+            </el-radio-group>
+            <el-switch
+              v-model="isOpen"
+              @change="updateIsNotice"
+              inactive-text="消息弹窗"
+              active-color="#13ce66"
+              inactive-color="#ff4949"
+            >
+            </el-switch>
+          </div>
+          <el-radio-group size="mini" v-model="dateType" @change="getList" style="margin: 10px 0">
+            <el-radio-button label="">全部</el-radio-button>
+            <el-radio-button :label="0">今天</el-radio-button>
+            <el-radio-button :label="1">昨天</el-radio-button>
+            <el-radio-button :label="6">近7天</el-radio-button>
+            <el-radio-button :label="29">近30天</el-radio-button>
+          </el-radio-group>
+          <div class="flex_asb">
+            <el-radio-group size="mini" v-model="readFlag" @change="getList">
+              <el-radio-button label="">全部</el-radio-button>
+              <el-badge :hidden="count > 0 ? false : true" :value="count" class="item" style="margin: 0 10px">
+                <el-radio-button label="NO">未读</el-radio-button>
+              </el-badge>
+              <el-badge :value="count" :hidden="true" class="item">
+                <el-radio-button label="YES">已读</el-radio-button>
+              </el-badge>
+            </el-radio-group>
+            <div style="color: #409eff; cursor: pointer" @click="confirmRead">
+              <i class="el-icon-message-solid"></i>
+              <span style="font-size: 14px">全部已读</span>
+            </div>
+          </div>
+        </div>
+        <el-card class="box-card" v-for="(item, index) in messageData" style="margin-top: 10px">
+          <div
+            @click="
+              isShow = false
+              toDetail(
+                item.adminNoticeType,
+                item.paidType,
+                item.adminNoticeType == 'NOTICE' ? item.noticeId : item.orderId,
+                item.id
+              )
+            "
+          >
+            <div v-if="item.adminNoticeType == 'NOTICE'">
+              <div class="flex_asb item">
+                <div>
+                  <span>公告类型:</span>
+                  <span>{{ statusFilter(item.adminNoticeType) }}</span>
+                </div>
+                <div class="read1" v-if="item.readFlag == 'NO'">未读</div>
+                <div class="read2" v-if="item.readFlag == 'YES'">已读</div>
+              </div>
+              <div class="item">
+                <div>
+                  <span>文件标题:</span>
+                  <span style="color: #409eff">{{ item.title }}</span>
+                </div>
+              </div>
+              <div class="item">
+                <div>
+                  <span>发布人:</span>
+                  <span>{{ item.issueNickName | '' }}</span>
+                </div>
+              </div>
+              <div class="item">
+                <div>
+                  <span>发布时间:</span>
+                  <span>{{ item.issueTime }}</span>
+                </div>
+              </div>
+              <div v-if="item.readFlag == 'YES'" class="item">
+                <span>阅读人:</span>
+                <span>{{ item.adminNickName }} {{ item.readTime }}</span>
+              </div>
+            </div>
+            <div v-else>
+              <div class="flex_asb item">
+                <div>
+                  <span>消息类型:</span>
+                  <span>{{ statusFilter(item.adminNoticeType) }}</span>
+                </div>
+                <div class="read1" v-if="item.readFlag == 'NO'">未读</div>
+                <div class="read2" v-if="item.readFlag == 'YES'">已读</div>
+              </div>
+              <div class="item">
+                <div>
+                  <span>订单编号:</span>
+                  <span style="color: #409eff">{{ item.orderId }}</span>
+                </div>
+              </div>
+              <div class="item">
+                <div>
+                  <span>消息内容:</span>
+                  <span>{{ item.content }}</span>
+                </div>
+              </div>
+              <div class="item">
+                <div>
+                  <span>创建时间:</span>
+                  <span>{{ item.createTime }}</span>
+                </div>
+              </div>
+              <div v-if="item.readFlag == 'YES'" class="item">
+                <span>阅读人:</span>
+                <span>{{ item.adminNickName }} {{ item.readTime }}</span>
+              </div>
+            </div>
+          </div>
+        </el-card>
+        <el-empty v-if="messageData.length == 0" description="暂无数据"></el-empty>
+        <div class="flex_ac bottom">
+          <el-pagination
+            @current-change="handleCurrentChange"
+            :current-page="currentPage"
+            :page-size="pageSize"
+            layout="prev, pager, next"
+            background
+            :total="listTotal"
+          ></el-pagination>
+        </div>
+      </div>
+    </el-drawer>
   </div>
   </div>
 </template>
 </template>
 
 
@@ -227,20 +247,20 @@ export default {
       visible: false,
       visible: false,
       noticeCount: 0,
       noticeCount: 0,
       path: `/${this.$route.path.split('/')[1] || ''}`,
       path: `/${this.$route.path.split('/')[1] || ''}`,
-	  isShow: false,
-	  isOpen: true,
-	  checked: false,
-	  messageType: ['WBI','WBK','CRE_ORDER','SEND_MALL','RP_MALL','CR_SALES'],
-	  messageData: [],
-	  dateType: '',
-	  readFlag: '',
-	  timer: null,
-	  listTotal: 0,
-	  currentPage: 1, // 当前页码
-	  pageSize: 10, // 每页数量
-		count: 0,
-		isDot1: false,
-		isDot2: false
+      isShow: false,
+      isOpen: true,
+      checked: false,
+      messageType: ['WBI', 'WBK', 'CRE_ORDER', 'SEND_MALL', 'RP_MALL', 'CR_SALES'],
+      messageData: [],
+      dateType: '',
+      readFlag: '',
+      timer: null,
+      listTotal: 0,
+      currentPage: 1, // 当前页码
+      pageSize: 10, // 每页数量
+      count: 0,
+      isDot1: false,
+      isDot2: false
     }
     }
   },
   },
   computed: {
   computed: {
@@ -250,61 +270,74 @@ export default {
     noticeVisible() {
     noticeVisible() {
       return this.noticeCount > 0
       return this.noticeCount > 0
     },
     },
-	...mapGetters([
-	  'userid'
-	]),
+    ...mapGetters(['userid']),
     ...mapGetters(['sidebar', 'avatar', 'device', 'name', 'isNotice']),
     ...mapGetters(['sidebar', 'avatar', 'device', 'name', 'isNotice']),
-	filterTime(){
-		if(this.dateType === ''){
-			return ['','']
-		}else{
-			var date = new Date();
-			var base = Date.parse(date); // 转换为时间戳
-			var year = date.getFullYear(); //获取当前年份
-			var mon = date.getMonth() + 1; //获取当前月份
-			var day = date.getDate(); //获取当前日
-			var oneDay = 24 * 3600 *1000
-			
-			var daytimeArr = []
-			var now = new Date((base - oneDay*this.dateType));
-			var myear = now.getFullYear();
-			var month = now.getMonth() + 1;
-			var mday = now.getDate()
-			if(this.dateType == 1){
-				return [`${myear}-${month>9?month:'0'+month}-${mday>9?mday:'0'+mday} 00:00:00`,`${myear}-${month>9?month:'0'+month}-${mday>9?mday:'0'+mday} 23:59:59`]
-			}else{
-				return [`${myear}-${month>9?month:'0'+month}-${mday>9?mday:'0'+mday} 00:00:00`,`${year}-${mon>9?mon:'0'+mon}-${day>9?day:'0'+day} 23:59:59`]
-			}
-		}
-	},
-	statusFilter() {
-		return function(val){
-			const MAP = {
-				NOTICE: '平台公告',
-				WBI: '维保消息费用申请',
-				WBK: '维保费用申请审批',
-				CRE_ORDER: '创建工单',
-				SEND_MALL: '商城订单发货',
-				RP_MALL: '商城订单维权',
-				CR_SALES: '订单支付成功'
-			}
-			return MAP[val]
-		}
-	},
-	typeFilter() {
-		return function(val,paidType){
-			const MAP = {
-				NOTICE: 'systemMessage',
-				WBI: 'applicationWithoutFee',
-				WBK: 'applicationWithoutFee',
-				CRE_ORDER: 'workOrderPool',
-				SEND_MALL: 'order_detail',
-				RP_MALL: 'order_pr',
-				CR_SALES: (paidType=='M'?'auxiliarySalesOrder':paidType=='P'?'attachmentSalesOrder':paidType=='YB'?'orderSettleManag':paidType=='MALL'?'order_list':'')
-			}
-			return MAP[val]
-		}
-	}
+    filterTime() {
+      if (this.dateType === '') {
+        return ['', '']
+      } else {
+        var date = new Date()
+        var base = Date.parse(date) // 转换为时间戳
+        var year = date.getFullYear() //获取当前年份
+        var mon = date.getMonth() + 1 //获取当前月份
+        var day = date.getDate() //获取当前日
+        var oneDay = 24 * 3600 * 1000
+
+        var daytimeArr = []
+        var now = new Date(base - oneDay * this.dateType)
+        var myear = now.getFullYear()
+        var month = now.getMonth() + 1
+        var mday = now.getDate()
+        if (this.dateType == 1) {
+          return [
+            `${myear}-${month > 9 ? month : '0' + month}-${mday > 9 ? mday : '0' + mday} 00:00:00`,
+            `${myear}-${month > 9 ? month : '0' + month}-${mday > 9 ? mday : '0' + mday} 23:59:59`
+          ]
+        } else {
+          return [
+            `${myear}-${month > 9 ? month : '0' + month}-${mday > 9 ? mday : '0' + mday} 00:00:00`,
+            `${year}-${mon > 9 ? mon : '0' + mon}-${day > 9 ? day : '0' + day} 23:59:59`
+          ]
+        }
+      }
+    },
+    statusFilter() {
+      return function (val) {
+        const MAP = {
+          NOTICE: '平台公告',
+          WBI: '维保消息费用申请',
+          WBK: '维保费用申请审批',
+          CRE_ORDER: '创建工单',
+          SEND_MALL: '商城订单发货',
+          RP_MALL: '商城订单维权',
+          CR_SALES: '订单支付成功'
+        }
+        return MAP[val]
+      }
+    },
+    typeFilter() {
+      return function (val, paidType) {
+        const MAP = {
+          NOTICE: 'systemMessage',
+          WBI: 'applicationWithoutFee',
+          WBK: 'applicationWithoutFee',
+          CRE_ORDER: 'workOrderPool',
+          SEND_MALL: 'order_detail',
+          RP_MALL: 'order_pr',
+          CR_SALES:
+            paidType == 'M'
+              ? 'auxiliarySalesOrder'
+              : paidType == 'P'
+              ? 'attachmentSalesOrder'
+              : paidType == 'YB'
+              ? 'orderSettleManag'
+              : paidType == 'MALL'
+              ? 'order_list'
+              : ''
+        }
+        return MAP[val]
+      }
+    }
   },
   },
   watch: {
   watch: {
     $route() {
     $route() {
@@ -325,10 +358,10 @@ export default {
       }
       }
     }
     }
   },
   },
-  created(){
-	  clearInterval(this.timer)
-	  this.getUserInfo()
-	  this.redDot()
+  created() {
+    clearInterval(this.timer)
+    this.getUserInfo()
+    this.redDot()
   },
   },
   mounted() {
   mounted() {
     this.$store.commit('app/SET_L1_PATH', this.path)
     this.$store.commit('app/SET_L1_PATH', this.path)
@@ -369,205 +402,208 @@ export default {
     toggleSideBar() {
     toggleSideBar() {
       this.$store.dispatch('app/toggleSideBar')
       this.$store.dispatch('app/toggleSideBar')
     },
     },
-	//获取最新消息并弹窗
-	getMessageTips(){
-		console.log(111)
-		const that = this
-		this.timer = setInterval(()=>{
-			request({
-			  url: `/notice/list/out`,
-			  method: 'get',
-			  params: {
-				  num: 30,
-			  }
-			}).then(res=>{
-				res.data.forEach(item=>{
-					this.$notify({
-						title: '新消息',
-						position: 'bottom-right',
-						duration: 30000,
-						message: that.$createElement(
-							"div",
-							{
-								style: 'cursor: pointer;',
-								on: {
-									click: that.toDetail.bind(that,item.adminNoticeType,item.paidType,(item.adminNoticeType=='NOTICE'?item.noticeId:item.orderId),item.id)
-								},
-							},[
-								that.$createElement(
-									"span",
-									null,
-									that.statusFilter(item.adminNoticeType) + ' '
-								),
-								that.$createElement(
-									"span",
-									{
-										style: 'color: #409EFF;',
-									},
-									' ' + item.adminNoticeType=='NOTICE'?item.title:item.orderId
-								),
-								that.$createElement(
-									"span",
-									null,
-									item.adminNoticeType=='NOTICE'?'':item.content
-								),
-							// that.$createElement(
-							// 	"el-checkbox",
-							// 	{
-							// 		on: {
-							// 			change: that.updateIsNotice.bind(that)
-							// 		},
-							// 	}, '不再弹窗新消息'
-							// )
-						])
-					});
-				})
-			})
-		},30000)
-		
-	},
-	getCount(){
-		request({
-		  url: `/notice/list/count`,
-		  method: 'get',
-		  params: {
-			  noticeType: this.messageType.join(','),
-			  readFlag: 'NO'
-		  }
-		}).then(res=>{
-			this.count = res.data
-		})
-	},
-	redDot(){
-		request({
-		  url: `/notice/list/count`,
-		  method: 'get',
-		  params: {
-			  noticeType: ['WBI','WBK','CRE_ORDER','SEND_MALL','RP_MALL','CR_SALES'].join(','),
-			  readFlag: 'NO'
-		  }
-		}).then(res=>{
-			this.isDot1 = res.data > 0?true:false
-		})
-		request({
-		  url: `/notice/list/count`,
-		  method: 'get',
-		  params: {
-			  noticeType: ['NOTICE'].join(','),
-			  readFlag: 'NO'
-		  }
-		}).then(res=>{
-			this.isDot2 = res.data > 0?true:false
-		})
-	},
-	getUserInfo(){
-		const that = this
-		request({
-		  url: `/admin/user/detail`,
-		  method: 'get',
-		  params: {
-			  adminUserId: this.userid
-		  }
-		}).then(res=>{
-			this.isOpen = res.data.isNotice=='YES'?true:false
-			if(res.data.isNotice=='NO'){
-				clearInterval(this.timer)
-			}else{
-				clearInterval(this.timer)
-				this.getMessageTips()
-			}
-		})
-	},
-	//全部已读
-	confirmRead(){
-		this.$confirm('是否全部设为已读, 是否继续?', '提示', {
-			confirmButtonText: '确定',
-			cancelButtonText: '取消',
-			type: 'warning'
-		}).then(() => {
-			request({
-			  url: `/notice/mark/read/all`,
-			  method: 'post',
-			  data: {}
-			}).then(res=>{
-				if(res.code == 200){
-					this.getList()
-					this.$message.success('全部已读成功!');
-				}
-			})
-		}).catch(() => {
-			this.$message({
-				type: 'info',
-				message: '已取消'
-			});
-		});
-	},
-	//点击不再弹窗新消息
-	updateIsNotice(e){
-		request({
-		  url: `/notice/updateIsNotice`,
-		  method: 'post',
-		  params: {
-			  isNotice: e?'YES':'NO',
-		  }
-		}).then(res=>{
-			if(res.code == 200){
-				this.getUserInfo()
-				this.$message.success(e?'已开启弹窗消息提醒':'已关闭弹窗消息提醒');
-				if(!e){
-					clearInterval(this.timer)
-				}
-			}
-		})
-	},
-	getList(){
-		request({
-		  url: `/notice/list`,
-		  method: 'post',
-		  data: {
-			  pageNum: this.currentPage,
-			  pageSize: this.pageSize,
-			  params: [{param: "nr.read_flag", compare: "=", value: this.readFlag},{param: 'nr.admin_notice_type', compare: "=", value: this.messageType},{param: 'nr.issue_time', compare: ">=", value: this.filterTime[0]},{param: 'nr.issue_time', compare: "<=", value: this.filterTime[1]}]
-		  }
-		}).then(res=>{
-			this.getCount()
-			this.redDot()
-			this.listTotal = res.data.total
-			this.messageData = res.data.records
-		})
-	},
-	// 更改当前页
-	handleCurrentChange(val) {
-		this.currentPage = val;
-		this.getList();
-	},
-	toDetail(type,paidType,orderId,id){
-		console.log(this.typeFilter(type,paidType))
-		this.read(id)
-		this.$router.push({
-			name: this.typeFilter(type,paidType),
-			params: {
-				pageName: orderId,
-				pageType: 'detail',
-				pageCode: orderId,
-			},
-			query: {
-				id: orderId,
-				orderId: orderId
-			}
-		})
-	},
-	read(id){
-		request({
-		  url: `/notice/mark/read`,
-		  method: 'post',
-		  params: {
-			  noticeIds: id,
-		  }
-		}).then(res=>{
-			
-		})
-	}
+    //获取最新消息并弹窗
+    getMessageTips() {
+      const that = this
+      this.timer = setInterval(() => {
+        request({
+          url: `/notice/list/out`,
+          method: 'get',
+          params: {
+            num: 30
+          }
+        }).then(res => {
+          res.data.forEach(item => {
+            this.$notify({
+              title: '新消息',
+              position: 'bottom-right',
+              duration: 30000,
+              message: that.$createElement(
+                'div',
+                {
+                  style: 'cursor: pointer;',
+                  on: {
+                    click: that.toDetail.bind(
+                      that,
+                      item.adminNoticeType,
+                      item.paidType,
+                      item.adminNoticeType == 'NOTICE' ? item.noticeId : item.orderId,
+                      item.id
+                    )
+                  }
+                },
+                [
+                  that.$createElement('span', null, that.statusFilter(item.adminNoticeType) + ' '),
+                  that.$createElement(
+                    'span',
+                    {
+                      style: 'color: #409EFF;'
+                    },
+                    ' ' + item.adminNoticeType == 'NOTICE' ? item.title : item.orderId
+                  ),
+                  that.$createElement('span', null, item.adminNoticeType == 'NOTICE' ? '' : item.content)
+                  // that.$createElement(
+                  // 	"el-checkbox",
+                  // 	{
+                  // 		on: {
+                  // 			change: that.updateIsNotice.bind(that)
+                  // 		},
+                  // 	}, '不再弹窗新消息'
+                  // )
+                ]
+              )
+            })
+          })
+        })
+      }, 30000)
+    },
+    getCount() {
+      request({
+        url: `/notice/list/count`,
+        method: 'get',
+        params: {
+          noticeType: this.messageType.join(','),
+          readFlag: 'NO'
+        }
+      }).then(res => {
+        this.count = res.data
+      })
+    },
+    redDot() {
+      request({
+        url: `/notice/list/count`,
+        method: 'get',
+        params: {
+          noticeType: ['WBI', 'WBK', 'CRE_ORDER', 'SEND_MALL', 'RP_MALL', 'CR_SALES'].join(','),
+          readFlag: 'NO'
+        }
+      }).then(res => {
+        this.isDot1 = res.data > 0 ? true : false
+      })
+      request({
+        url: `/notice/list/count`,
+        method: 'get',
+        params: {
+          noticeType: ['NOTICE'].join(','),
+          readFlag: 'NO'
+        }
+      }).then(res => {
+        this.isDot2 = res.data > 0 ? true : false
+      })
+    },
+    getUserInfo() {
+      const that = this
+      request({
+        url: `/admin/user/detail`,
+        method: 'get',
+        params: {
+          adminUserId: this.userid
+        }
+      }).then(res => {
+        this.isOpen = res.data.isNotice == 'YES' ? true : false
+        if (res.data.isNotice == 'NO') {
+          clearInterval(this.timer)
+        } else {
+          clearInterval(this.timer)
+          this.getMessageTips()
+        }
+      })
+    },
+    //全部已读
+    confirmRead() {
+      this.$confirm('是否全部设为已读, 是否继续?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      })
+        .then(() => {
+          request({
+            url: `/notice/mark/read/all`,
+            method: 'post',
+            data: {}
+          }).then(res => {
+            if (res.code == 200) {
+              this.getList()
+              this.$message.success('全部已读成功!')
+            }
+          })
+        })
+        .catch(() => {
+          this.$message({
+            type: 'info',
+            message: '已取消'
+          })
+        })
+    },
+    //点击不再弹窗新消息
+    updateIsNotice(e) {
+      request({
+        url: `/notice/updateIsNotice`,
+        method: 'post',
+        params: {
+          isNotice: e ? 'YES' : 'NO'
+        }
+      }).then(res => {
+        if (res.code == 200) {
+          this.getUserInfo()
+          this.$message.success(e ? '已开启弹窗消息提醒' : '已关闭弹窗消息提醒')
+          if (!e) {
+            clearInterval(this.timer)
+          }
+        }
+      })
+    },
+    getList() {
+      request({
+        url: `/notice/list`,
+        method: 'post',
+        data: {
+          pageNum: this.currentPage,
+          pageSize: this.pageSize,
+          params: [
+            { param: 'nr.read_flag', compare: '=', value: this.readFlag },
+            { param: 'nr.admin_notice_type', compare: '=', value: this.messageType },
+            { param: 'nr.issue_time', compare: '>=', value: this.filterTime[0] },
+            { param: 'nr.issue_time', compare: '<=', value: this.filterTime[1] }
+          ]
+        }
+      }).then(res => {
+        this.getCount()
+        this.redDot()
+        this.listTotal = res.data.total
+        this.messageData = res.data.records
+      })
+    },
+    // 更改当前页
+    handleCurrentChange(val) {
+      this.currentPage = val
+      this.getList()
+    },
+    toDetail(type, paidType, orderId, id) {
+      console.log(this.typeFilter(type, paidType))
+      this.read(id)
+      this.$router.push({
+        name: this.typeFilter(type, paidType),
+        params: {
+          pageName: orderId,
+          pageType: 'detail',
+          pageCode: orderId
+        },
+        query: {
+          id: orderId,
+          orderId: orderId
+        }
+      })
+    },
+    read(id) {
+      request({
+        url: `/notice/mark/read`,
+        method: 'post',
+        params: {
+          noticeIds: id
+        }
+      }).then(res => {})
+    }
   }
   }
 }
 }
 </script>
 </script>
@@ -587,43 +623,58 @@ export default {
 ::v-deep .slidingBlockClassName {
 ::v-deep .slidingBlockClassName {
   background: rgba(0, 0, 0, 0.05) !important;
   background: rgba(0, 0, 0, 0.05) !important;
 }
 }
-.flex_asb{
+.flex_asb {
   display: flex;
   display: flex;
   justify-content: space-between;
   justify-content: space-between;
   align-items: center;
   align-items: center;
 }
 }
-.flex_ac{
-	display: flex;
-	justify-content: center;
+.flex_ac {
+  display: flex;
+  justify-content: center;
 }
 }
-.message{
-	padding: 20px;position: relative;min-height: 100%;padding-bottom:60px;padding-top: 150px;box-sizing: border-box;
-	.head{
-		width:25%;position: fixed;top: 0;right:0;background: #ffffff;padding: 20px;
-	}
-	.bottom{
-		width:25%;position: fixed;bottom: 0;right:0;background: #ffffff;padding: 10px 0;
-	}
+.message {
+  padding: 20px;
+  position: relative;
+  min-height: 100%;
+  padding-bottom: 60px;
+  padding-top: 150px;
+  box-sizing: border-box;
+  .head {
+    width: 25%;
+    position: fixed;
+    top: 0;
+    right: 0;
+    background: #ffffff;
+    padding: 20px;
+  }
+  .bottom {
+    width: 25%;
+    position: fixed;
+    bottom: 0;
+    right: 0;
+    background: #ffffff;
+    padding: 10px 0;
+  }
 }
 }
-.box-card{
-	.item{
-		cursor: pointer;
-		margin-bottom: 6px;
-	}
-	.read1{
-		color: #f5680e;
-		background: #fff2da;
-		padding: 2px 4px;
-		border-radius: 4px;
-		font-size: 14px;
-	}
-	.read2{
-		color: #42b983;
-		background: #d7fdde;
-		padding: 2px 4px;
-		border-radius: 4px;
-		font-size: 14px;
-	}
+.box-card {
+  .item {
+    cursor: pointer;
+    margin-bottom: 6px;
+  }
+  .read1 {
+    color: #f5680e;
+    background: #fff2da;
+    padding: 2px 4px;
+    border-radius: 4px;
+    font-size: 14px;
+  }
+  .read2 {
+    color: #42b983;
+    background: #d7fdde;
+    padding: 2px 4px;
+    border-radius: 4px;
+    font-size: 14px;
+  }
 }
 }
 .navbar {
 .navbar {
   width: 100%;
   width: 100%;
@@ -750,7 +801,7 @@ export default {
     }
     }
   }
   }
 }
 }
-::v-deep .el-badge__content.is-fixed{
-	z-index: 99;
+::v-deep .el-badge__content.is-fixed {
+  z-index: 99;
 }
 }
 </style>
 </style>

+ 504 - 444
src/views/auxiliaryFittings/salesManagement/components/auxiliaryAdjustPriceOrderDetail.vue

@@ -1,451 +1,511 @@
 <template>
 <template>
-	<div class="s-page">
-		<el-page-header @back="goBack" :content="title"></el-page-header>
-		<el-divider></el-divider>
-		<el-card class="box-card">
-			<div slot="header" class="clearfix">
-				<span>单据信息</span>
-			</div>
-			<div class="mymain-container">
-				<el-form ref="formData" :rules="rules" :model="formData" label-width="110px" size="small" label-position="left">
-					<el-row :gutter="20" justify="start">
-						<el-col :span="12" v-if="id">
-							<el-form-item label="单据状态">
-								<el-input type="text" :value="formData.flag == 'SAVE'?'已保存':formData.flag == 'SUBMIT'?'已提交':formData.flag == 'OK'?'审核通过':formData.flag == 'FAIL'?'审核失败':''" disabled></el-input>
-							</el-form-item>
-						</el-col>
-						<el-col :span="12" v-if="id">
-							<el-form-item label="单据编号">
-								<el-input type="text" :value="formData.sheetId" disabled></el-input>
-							</el-form-item>
-						</el-col>
-						<el-col :span="6" v-if="id">
-							<el-form-item label="制单人">
-								<el-input type="text" :value="formData.createBy" disabled></el-input>
-							</el-form-item>
-						</el-col>
-						<el-col :span="6" v-if="id">
-							<el-form-item label="制单时间">
-								<el-input type="text" :value="formData.createTime" disabled></el-input>
-							</el-form-item>
-						</el-col>
-						<el-col :span="6" v-if="id">
-							<el-form-item label="审核人">
-								<el-input type="text" :value="formData.confirmBy" disabled></el-input>
-							</el-form-item>
-						</el-col>
-						<el-col :span="6" v-if="id">
-							<el-form-item label="审核时间">
-								<el-input type="text" :value="formData.confirmTime" disabled></el-input>
-							</el-form-item>
-						</el-col>
-						<el-col :span="12">
-							<el-form-item label="所属商户" :required="true" >
-								<el-input type="text" :value="companyName" disabled></el-input>
-							</el-form-item>
-						</el-col>
-						<el-col :span="12">
-							<el-form-item label="网点名称" prop="websitId" :required="true">
-								<el-select v-model="formData.websit" :disabled="formData.flag == 'OK'" value-key="websitId" @change="changeWebsit" placeholder="请选择" style="width: 100%;">
-								    <el-option
-								      v-for="item in websitList"
-								      :key="item.websitId"
-								      :label="item.name"
-								      :value="item">
-								    </el-option>
-								  </el-select>
-							</el-form-item>
-						</el-col>
-						<el-col :span="24">
-							<el-form-item label="附件">
-								<ImageUpload :fileList="formData.fileUrl" :limit="1" :isEdit="formType !== 2" />
-							</el-form-item>
-						</el-col>
-						<el-col :span="24">
-							<el-form-item label="备注">
-								<el-input type="textarea" :rows="4" :disabled="formData.flag == 'OK'" v-model="formData.remark" placeholder="请输入"></el-input>
-							</el-form-item>
-						</el-col>
-					</el-row>
-				</el-form>
-			</div>
-		</el-card>
-		<el-card class="box-card">
-			<div slot="header" class="clearfix">
-				<span>辅材信息</span>
-			</div>
-			<el-button size="small" v-if="formData.flag == 'SAVE' || formType==0" type="primary" @click="add()">添加</el-button>
-			<div class="table">
-				<el-table :data="dataList" element-loading-text="Loading" border fit highlight-current-row stripe>
-					<el-table-column label="大类名称" align="center">
-						<template slot-scope="scope">
-							<el-select v-model="scope.row.productCategory" value-key="categoryId" @change="changeMain" :disabled="isEdit != scope.$index || formData.flag == 'OK'" placeholder="请选择" style="width: 100%;">
-							    <el-option
-							      v-for="item in mainList"
-							      :key="item.categoryId"
-							      :label="item.categoryName"
-							      :value="item">
-							    </el-option>
-							  </el-select>
-						</template>
-					</el-table-column>
-					<el-table-column label="小类名称" align="center">
-						<template slot-scope="scope">
-							<el-select v-model="scope.row.goodsCategory" @change="changeSmall" @focus="()=>{
-									if(!scope.row.productCategory){return this.$message.warning('请先选择大类!');}
-								}" :disabled="isEdit != scope.$index || formData.flag == 'OK'" value-key="categoryId" placeholder="请选择" style="width: 100%;">
-							    <el-option
-							      v-for="item in scope.row.productCategory.items"
-							      :key="item.categoryId"
-							      :label="item.categoryName"
-							      :value="item">
-							    </el-option>
-							  </el-select>
-						</template>
-					</el-table-column>
-					<el-table-column label="辅材名称" align="center">
-						<template slot-scope="scope">
-							<el-select v-model="scope.row.goods" @change="changeGoods" value-key="goodsId" :disabled="isEdit != scope.$index || formData.flag == 'OK'" placeholder="请选择" style="width: 100%;">
-							    <el-option
-							      v-for="item in scope.row.goodsList"
-							      :key="item.goodsId"
-							      :label="item.goodsName"
-							      :value="item">
-							    </el-option>
-							  </el-select>
-						</template>
-					</el-table-column>
-					<el-table-column prop="goods.goodsSalesUnit" align="center" label="单位" ></el-table-column>
-					<el-table-column prop="goods.goodsCode" align="center" label="商品代码"></el-table-column>
-					<el-table-column prop="goods.goodsSpecification" align="center" label="规格型号"></el-table-column>
-					<el-table-column prop="" align="center" label="原售价">
-						<template slot-scope="scope">
-							{{scope.row.goods.oldPrice || scope.row.goods.price}}
-						</template>
-					</el-table-column>
-					<el-table-column prop="" align="center" label="新售价" >
-						<template slot-scope="scope">
-							<el-input type="number" v-model="scope.row.newPrice" :disabled="isEdit != scope.$index || formData.flag == 'OK'" placeholder="请输入"></el-input>
-						</template>
-					</el-table-column>
-					<el-table-column prop="goods.qty" align="center" label="库存数量"></el-table-column>
-					<el-table-column label="操作" align="right" width="140">
-						<template slot-scope="scope" v-if="formData.flag != 'OK'">
-							<el-button size="mini" type="primary" v-if="scope.$index != isEdit" @click="isEdit = scope.$index">编辑</el-button>
-							<el-button size="mini" type="danger" @click="dataList.splice(scope.$index,1)">删除</el-button>
-						</template>
-					</el-table-column>
-				</el-table>
-			</div>
-		</el-card>
-		<div class="page-footer">
-			<div class="footer">
-				<el-button size="small" type="info" @click="goBack">返回</el-button>
-				<el-button v-if="formType != 2" size="small" type="primary" @click="submit()">提交</el-button>
-				<el-button v-if="formType == 1" size="small" type="primary" @click="confirm()">审核通过</el-button>
-			</div>
-		</div>
-	</div>
+  <div class="s-page">
+    <el-page-header @back="goBack" :content="title"></el-page-header>
+    <el-divider></el-divider>
+    <el-card class="box-card">
+      <div slot="header" class="clearfix">
+        <span>单据信息</span>
+      </div>
+      <div class="mymain-container">
+        <el-form ref="formData" :rules="rules" :model="formData" label-width="110px" size="small" label-position="left">
+          <el-row :gutter="20" justify="start">
+            <el-col :span="12" v-if="id">
+              <el-form-item label="单据状态">
+                <el-input
+                  type="text"
+                  :value="
+                    formData.flag == 'SAVE'
+                      ? '已保存'
+                      : formData.flag == 'SUBMIT'
+                      ? '已提交'
+                      : formData.flag == 'OK'
+                      ? '审核通过'
+                      : formData.flag == 'FAIL'
+                      ? '审核失败'
+                      : ''
+                  "
+                  disabled
+                ></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12" v-if="id">
+              <el-form-item label="单据编号">
+                <el-input type="text" :value="formData.sheetId" disabled></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6" v-if="id">
+              <el-form-item label="制单人">
+                <el-input type="text" :value="formData.createBy" disabled></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6" v-if="id">
+              <el-form-item label="制单时间">
+                <el-input type="text" :value="formData.createTime" disabled></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6" v-if="id">
+              <el-form-item label="审核人">
+                <el-input type="text" :value="formData.confirmBy" disabled></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6" v-if="id">
+              <el-form-item label="审核时间">
+                <el-input type="text" :value="formData.confirmTime" disabled></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="所属商户" :required="true">
+                <el-input type="text" :value="companyName" disabled></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="网点名称" prop="websitId" :required="true">
+                <el-select
+                  v-model="formData.websit"
+                  :disabled="formData.flag == 'OK'"
+                  value-key="websitId"
+                  @change="changeWebsit"
+                  placeholder="请选择"
+                  style="width: 100%"
+                >
+                  <el-option v-for="item in websitList" :key="item.websitId" :label="item.name" :value="item">
+                  </el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item label="附件">
+                <ImageUpload :fileList="formData.fileUrl" :limit="1" :isEdit="formType !== 2" />
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item label="备注">
+                <el-input
+                  type="textarea"
+                  :rows="4"
+                  :disabled="formData.flag == 'OK'"
+                  v-model="formData.remark"
+                  placeholder="请输入"
+                ></el-input>
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </el-form>
+      </div>
+    </el-card>
+    <el-card class="box-card">
+      <div slot="header" class="clearfix">
+        <span>辅材信息</span>
+      </div>
+      <el-button size="small" v-if="formData.flag == 'SAVE' || formType == 0" type="primary" @click="add()"
+        >添加</el-button
+      >
+      <div class="table">
+        <el-table :data="dataList" element-loading-text="Loading" border fit highlight-current-row stripe>
+          <el-table-column label="大类名称" align="center">
+            <template slot-scope="scope">
+              <el-select
+                v-model="scope.row.productCategory"
+                value-key="categoryId"
+                @change="changeMain"
+                :disabled="isEdit != scope.$index || formData.flag == 'OK'"
+                placeholder="请选择"
+                style="width: 100%"
+              >
+                <el-option v-for="item in mainList" :key="item.categoryId" :label="item.categoryName" :value="item">
+                </el-option>
+              </el-select>
+            </template>
+          </el-table-column>
+          <el-table-column label="小类名称" align="center">
+            <template slot-scope="scope">
+              <el-select
+                v-model="scope.row.goodsCategory"
+                @change="changeSmall"
+                @focus="
+                  () => {
+                    if (!scope.row.productCategory) {
+                      return this.$message.warning('请先选择大类!')
+                    }
+                  }
+                "
+                :disabled="isEdit != scope.$index || formData.flag == 'OK'"
+                value-key="categoryId"
+                placeholder="请选择"
+                style="width: 100%"
+              >
+                <el-option
+                  v-for="item in scope.row.productCategory.items"
+                  :key="item.categoryId"
+                  :label="item.categoryName"
+                  :value="item"
+                >
+                </el-option>
+              </el-select>
+            </template>
+          </el-table-column>
+          <el-table-column label="辅材名称" align="center">
+            <template slot-scope="scope">
+              <el-select
+                v-model="scope.row.goods"
+                @change="changeGoods"
+                value-key="goodsId"
+                :disabled="isEdit != scope.$index || formData.flag == 'OK'"
+                placeholder="请选择"
+                style="width: 100%"
+              >
+                <el-option
+                  v-for="item in scope.row.goodsList"
+                  :key="item.goodsId"
+                  :label="item.goodsName"
+                  :value="item"
+                >
+                </el-option>
+              </el-select>
+            </template>
+          </el-table-column>
+          <el-table-column prop="goods.goodsSalesUnit" align="center" label="单位"></el-table-column>
+          <el-table-column prop="goods.goodsCode" align="center" label="商品代码"></el-table-column>
+          <el-table-column prop="goods.goodsSpecification" align="center" label="规格型号"></el-table-column>
+          <el-table-column prop="" align="center" label="原售价">
+            <template slot-scope="scope">
+              {{ scope.row.goods.oldPrice || scope.row.goods.price }}
+            </template>
+          </el-table-column>
+          <el-table-column prop="" align="center" label="新售价">
+            <template slot-scope="scope">
+              <el-input
+                type="number"
+                v-model="scope.row.newPrice"
+                :disabled="isEdit != scope.$index || formData.flag == 'OK'"
+                placeholder="请输入"
+              ></el-input>
+            </template>
+          </el-table-column>
+          <el-table-column prop="goods.qty" align="center" label="库存数量"></el-table-column>
+          <el-table-column label="操作" align="right" width="140">
+            <template slot-scope="scope" v-if="formData.flag != 'OK'">
+              <el-button size="mini" type="primary" v-if="scope.$index != isEdit" @click="isEdit = scope.$index"
+                >编辑</el-button
+              >
+              <el-button size="mini" type="danger" @click="dataList.splice(scope.$index, 1)">删除</el-button>
+            </template>
+          </el-table-column>
+        </el-table>
+      </div>
+    </el-card>
+    <div class="page-footer">
+      <div class="footer">
+        <el-button size="small" type="info" @click="goBack">返回</el-button>
+        <el-button v-if="formType != 2" size="small" type="primary" @click="submit()">提交</el-button>
+        <el-button v-if="formType == 1" size="small" type="primary" @click="confirm()">审核通过</el-button>
+      </div>
+    </div>
+  </div>
 </template>
 </template>
 
 
 <script>
 <script>
-	import { getWebsit } from "@/api/customerManagement";
-	import ImageUpload from '@/components/file-upload'
-	import { getWorker, getCategory, getGoods } from "@/api/auxiliaryFittings/auxiliarySalesOrder";
-	import { getDetail, add, edit, confirm } from "@/api/auxiliaryFittings/auxiliaryAdjustPriceOrder";
-	export default {
-		components: { ImageUpload },
-		props: ['id','title','formType'],
-		data() {
-			return {
-				dataList: [],
-				websitList: [],
-				workerList: [],
-				mainList: [],
-				formData: {
-					websit: {},
-					websitId: '',
-					websitName: '',
-					fileUrl: [],
-					sheetId: '',
-					flag: '',
-					createBy: '',
-					createTime: '',
-					confirmBy: '',
-					confirmTime: '',
-					remark: ''
-				},
-				productCategory: {},
-				goodsCategory: {},
-				isEdit: 0,
-				companyName: JSON.parse(localStorage.getItem('greemall_user')).companyName,
-				rules: {
-					websitId: [
-						{ required: true, message: '请选择网点', trigger: 'change' }
-					],
-					worker: [
-						{ required: true, message: '请选择师傅', trigger: 'change' }
-					],
-					source: [
-						{ required: true, message: '请选择订单来源', trigger: 'change' }
-					],
-					payType: [
-						{ required: true, message: '请选择订单来源', trigger: 'change' }
-					],
-					idcard: [
-						{ required: true, message: '请输入师傅身份证', trigger: 'blur' },
-						{ pattern:/(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/, message: '身份证号格式不正确', trigger: 'blur' }
-					],
-					phone: [
-						{ required: true, message: '请输入师傅联系电话', trigger: 'blur' },
-						{ pattern:/^((0\d{2,3}-\d{7,8})|(1[34578]\d{9}))$/, message: '电话号码格式不正确', trigger: 'blur' }
-					],
-				}
-			};
-		},
-		computed: {},
-		created() {
-			if(this.id){
-				this.getDetail()
-			}
-			this.getWebsit()
-		},
-		mounted() {
-			console.log(111,this.mainList)
-		},
-		methods: {
-			// 返回
-			goBack() {
-				this.$emit('back');
-			},
-			async getDetail(){
-				const that = this
-				getDetail({sheetId: this.id}).then(async res => {
-					Object.assign(this.formData, res.data, {
-						websit: {websitId: res.data.websitId,name: res.data.websitName},
-						fileUrl: res.data?.fileUrl ? res.data?.fileUrl?.split(",").map(item=>({url:item})) : []
-					})
-					this.getCategory(res.data.websitId)
-					this.formData.remark = res.data.remark
-					for(var item of res.data.items){
-						item.productCategory = {categoryId: item.parentCategoryId,categoryName: item.parentCategoryName,items: [{categoryId: item.goodsCategoryId,categoryName: item.goodsCategoryName}]}
-						item.goodsCategory = {categoryId: item.goodsCategoryId,categoryName: item.goodsCategoryName}
-						var ress = await that.getGoods(item.goodsCategoryId,item.goodsName, 1)
-						item.goods = {...ress.data,oldPrice:ress.data.price}
-						item.goodsList = ress.data ? [{...ress.data,oldPrice:ress.data.price}] : []
-					}
-					this.dataList = res.data.items
-				})
-			},
-			getWebsit(){
-				getWebsit({type: 'C'}).then(res => {
-					this.websitList = res.data
-				})
-			},
-			changeWebsit(e){
-				this.formData.websitId = e.websitId
-				this.formData.websitName = e.name
-				this.getWorker()
-				this.getCategory(e.websitId)
-			},
-			getCategory(websitId){
-				getCategory({websitId}).then(res => {
-					this.mainList = res.data
-				})
-			},
-			async getGoods(categoryId,goodsName,type){
-				const that = this
-				if(type == 1){
-					return new Promise((resolve, reject) => {
-						getGoods({websitId: this.formData.websitId,categoryId: categoryId,type: 'M',goodsName: goodsName}).then(res => {
-							resolve({
-								data: res.data[0]
-							})
-						})
-					})
-				}else{
-					getGoods({websitId: this.formData.websitId,categoryId: categoryId,type: 'M'}).then(res => {
-						that.dataList[that.isEdit].goodsList = res.data
-					})
-				}
-			},
-			getWorker(name){
-				const that = this
-				getWorker({pageNum: 1,pageSize: -1,params: [{param: 'a.nick_name',compare: '=',value: name},{param: 'b.websit_id',compare: '=',value: this.formData.websitId}]}).then(res => {
-					if(name){
-						that.formData.idcard = res.data.records[0].idCard
-						that.formData.phone = res.data.records[0].mobile
-					}else{
-						this.workerList = res.data.records
-					}
-				})
-			},
-			changeWorker(e){
-				this.getWorker(e)
-			},
-			workerBlur(e){
-				this.formData.worker = e.target.value
-				this.$forceUpdate()
-			},
-			changeMain(e){
-				this.dataList[this.isEdit].goodsList = [],
-				this.dataList[this.isEdit].productCategory = e,
-				this.dataList[this.isEdit].parentCategoryId = e.categoryId,
-				this.dataList[this.isEdit].parentCategoryName = e.categoryName,
-				this.dataList[this.isEdit].goodsCategory = {},
-				this.dataList[this.isEdit].goodsCategoryName = '',
-				this.dataList[this.isEdit].goodsCategoryId = '',
-				this.dataList[this.isEdit].goods = {},
-				this.dataList[this.isEdit].goodsId = '',
-				this.dataList[this.isEdit].goodsName = '',
-				this.dataList[this.isEdit].goodsSalesUnit = '',
-				this.dataList[this.isEdit].goodsSpecification = '',
-				this.dataList[this.isEdit].goodsCode = '',
-				this.dataList[this.isEdit].newPrice = '',
-				this.dataList[this.isEdit].oldPrice = '',
-				this.dataList[this.isEdit].qty = '',
-				this.dataList[this.isEdit].goodsType = 'M'
-			},
-			async changeSmall(e){
-				this.dataList[this.isEdit].goods = {},
-				this.dataList[this.isEdit].goodsId = '',
-				this.dataList[this.isEdit].goodsName = '',
-				this.dataList[this.isEdit].goodsSalesUnit = '',
-				this.dataList[this.isEdit].goodsSpecification = '',
-				this.dataList[this.isEdit].goodsCode = '',
-				this.dataList[this.isEdit].newPrice = '',
-				this.dataList[this.isEdit].oldPrice = '',
-				this.dataList[this.isEdit].qty = '',
-				this.dataList[this.isEdit].goodsCategoryId = e.categoryId
-				this.dataList[this.isEdit].goodsCategoryName = e.categoryName
-				getGoods({websitId: this.formData.websitId,categoryId: e.categoryId,type: 'M'}).then(res => {
-					this.dataList[this.isEdit].goodsList = res.data
-				})
-			},
-			changeGoods(e){
-				console.log(e)
-				this.dataList[this.isEdit].goodsId = e.goodsId
-				this.dataList[this.isEdit].goodsName = e.goodsName
-				this.dataList[this.isEdit].goodsSalesUnit = e.goodsSalesUnit
-				this.dataList[this.isEdit].goodsSpecification = e.goodsSpecification
-				this.dataList[this.isEdit].oldPrice = e.price
-				this.dataList[this.isEdit].goodsCode = e. goodsCode
-				this.dataList[this.isEdit].qty = e.qty
-			},
-			add(){
-				if(this.dataList.length != 0){this.isEdit += 1}
-				this.dataList.push({
-					goodsList: [],
-					productCategory: {},
-					parentCategoryId: '',
-					parentCategoryName: '',
-					goodsCategory: {},
-					goodsCategoryName: '',
-					goodsCategoryId: '',
-					goods: {},
-					goodsId: '',
-					goodsName: '',
-					goodsSalesUnit: '',
-					goodsSpecification: '',
-					goodsCode: '',
-					newPrice: '',
-					oldPrice: '',
-					qty: '',
-					goodsType: 'M'
-				})
-			},
-			confirm(){
-				this.$confirm(`请确认是否审核通过, 是否继续?`, '提示', {
-					confirmButtonText: '确定',
-					cancelButtonText: '取消',
-					type: 'warning'
-				}).then(() => {
-					confirm({
-						sheetId: this.formData.sheetId,
-						flag: 'OK'
-					}).then(res => {
-						if(res.code == 200){
-							this.$message.success('审核成功!')
-							this.goBack()
-						}
-					})
-				});
-			},
-			submit(){
-				this.$refs.formData.validate((valid, invalidFields, errLabels) => {
-					if (valid) {
-						if(this.formType == 0){
-							add({
-								remark: this.formData.remark,
-								websitId: this.formData.websitId,
-								websitName: this.formData.websitName,
-								fileUrl: this.formData.fileUrl.map(item=>item.url).join(","),
-								items: this.dataList
-							}).then(res => {
-								if(res.code == 200){
-									this.$message.success('提交成功!')
-									this.goBack()
-								}
-							})
-						}else if(this.formType == 1){
-							edit({
-								sheetId: this.formData.sheetId,
-								remark: this.formData.remark,
-								websitId: this.formData.websitId,
-								websitName: this.formData.websitName,
-								fileUrl: this.formData.fileUrl.map(item=>item.url).join(","),
-								items: this.dataList
-							}).then(res => {
-								if(res.code == 200){
-									this.dataList = []
-									this.$message.success('提交成功!')
-									this.goBack()
-								}
-							})
-						}
-					}
-				})
-			}
-		}
-	};
+import { getWebsit } from '@/api/customerManagement'
+import ImageUpload from '@/components/file-upload'
+import { getWorker, getCategory, getGoods } from '@/api/auxiliaryFittings/auxiliarySalesOrder'
+import { getDetail, add, edit, confirm } from '@/api/auxiliaryFittings/auxiliaryAdjustPriceOrder'
+export default {
+  components: { ImageUpload },
+  props: ['id', 'title', 'formType'],
+  data() {
+    return {
+      dataList: [],
+      websitList: [],
+      workerList: [],
+      mainList: [],
+      formData: {
+        websit: {},
+        websitId: '',
+        websitName: '',
+        fileUrl: [],
+        sheetId: '',
+        flag: '',
+        createBy: '',
+        createTime: '',
+        confirmBy: '',
+        confirmTime: '',
+        remark: ''
+      },
+      productCategory: {},
+      goodsCategory: {},
+      isEdit: 0,
+      companyName: JSON.parse(localStorage.getItem('greemall_user')).companyName,
+      rules: {
+        websitId: [{ required: true, message: '请选择网点', trigger: 'change' }],
+        worker: [{ required: true, message: '请选择师傅', trigger: 'change' }],
+        source: [{ required: true, message: '请选择订单来源', trigger: 'change' }],
+        payType: [{ required: true, message: '请选择订单来源', trigger: 'change' }],
+        idcard: [
+          { required: true, message: '请输入师傅身份证', trigger: 'blur' },
+          { pattern: /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/, message: '身份证号格式不正确', trigger: 'blur' }
+        ],
+        phone: [
+          { required: true, message: '请输入师傅联系电话', trigger: 'blur' },
+          { pattern: /^((0\d{2,3}-\d{7,8})|(1[34578]\d{9}))$/, message: '电话号码格式不正确', trigger: 'blur' }
+        ]
+      }
+    }
+  },
+  computed: {},
+  created() {
+    if (this.id) {
+      this.getDetail()
+    }
+    this.getWebsit()
+  },
+  methods: {
+    // 返回
+    goBack() {
+      this.$emit('back')
+    },
+    async getDetail() {
+      const that = this
+      getDetail({ sheetId: this.id }).then(async res => {
+        Object.assign(this.formData, res.data, {
+          websit: { websitId: res.data.websitId, name: res.data.websitName },
+          fileUrl: res.data?.fileUrl ? res.data?.fileUrl?.split(',').map(item => ({ url: item })) : []
+        })
+        this.getCategory(res.data.websitId)
+        this.formData.remark = res.data.remark
+        for (var item of res.data.items) {
+          item.productCategory = {
+            categoryId: item.parentCategoryId,
+            categoryName: item.parentCategoryName,
+            items: [{ categoryId: item.goodsCategoryId, categoryName: item.goodsCategoryName }]
+          }
+          item.goodsCategory = { categoryId: item.goodsCategoryId, categoryName: item.goodsCategoryName }
+          var ress = await that.getGoods(item.goodsCategoryId, item.goodsName, 1)
+          item.goods = { ...ress.data, oldPrice: ress.data.price }
+          item.goodsList = ress.data ? [{ ...ress.data, oldPrice: ress.data.price }] : []
+        }
+        this.dataList = res.data.items
+      })
+    },
+    getWebsit() {
+      getWebsit({ type: 'C' }).then(res => {
+        this.websitList = res.data
+      })
+    },
+    changeWebsit(e) {
+      this.formData.websitId = e.websitId
+      this.formData.websitName = e.name
+      this.getWorker()
+      this.getCategory(e.websitId)
+    },
+    getCategory(websitId) {
+      getCategory({ websitId }).then(res => {
+        this.mainList = res.data
+      })
+    },
+    async getGoods(categoryId, goodsName, type) {
+      const that = this
+      if (type == 1) {
+        return new Promise((resolve, reject) => {
+          getGoods({ websitId: this.formData.websitId, categoryId: categoryId, type: 'M', goodsName: goodsName }).then(
+            res => {
+              resolve({
+                data: res.data[0]
+              })
+            }
+          )
+        })
+      } else {
+        getGoods({ websitId: this.formData.websitId, categoryId: categoryId, type: 'M' }).then(res => {
+          that.dataList[that.isEdit].goodsList = res.data
+        })
+      }
+    },
+    getWorker(name) {
+      const that = this
+      getWorker({
+        pageNum: 1,
+        pageSize: -1,
+        params: [
+          { param: 'a.nick_name', compare: '=', value: name },
+          { param: 'b.websit_id', compare: '=', value: this.formData.websitId }
+        ]
+      }).then(res => {
+        if (name) {
+          that.formData.idcard = res.data.records[0].idCard
+          that.formData.phone = res.data.records[0].mobile
+        } else {
+          this.workerList = res.data.records
+        }
+      })
+    },
+    changeWorker(e) {
+      this.getWorker(e)
+    },
+    workerBlur(e) {
+      this.formData.worker = e.target.value
+      this.$forceUpdate()
+    },
+    changeMain(e) {
+      ;(this.dataList[this.isEdit].goodsList = []),
+        (this.dataList[this.isEdit].productCategory = e),
+        (this.dataList[this.isEdit].parentCategoryId = e.categoryId),
+        (this.dataList[this.isEdit].parentCategoryName = e.categoryName),
+        (this.dataList[this.isEdit].goodsCategory = {}),
+        (this.dataList[this.isEdit].goodsCategoryName = ''),
+        (this.dataList[this.isEdit].goodsCategoryId = ''),
+        (this.dataList[this.isEdit].goods = {}),
+        (this.dataList[this.isEdit].goodsId = ''),
+        (this.dataList[this.isEdit].goodsName = ''),
+        (this.dataList[this.isEdit].goodsSalesUnit = ''),
+        (this.dataList[this.isEdit].goodsSpecification = ''),
+        (this.dataList[this.isEdit].goodsCode = ''),
+        (this.dataList[this.isEdit].newPrice = ''),
+        (this.dataList[this.isEdit].oldPrice = ''),
+        (this.dataList[this.isEdit].qty = ''),
+        (this.dataList[this.isEdit].goodsType = 'M')
+    },
+    async changeSmall(e) {
+      ;(this.dataList[this.isEdit].goods = {}),
+        (this.dataList[this.isEdit].goodsId = ''),
+        (this.dataList[this.isEdit].goodsName = ''),
+        (this.dataList[this.isEdit].goodsSalesUnit = ''),
+        (this.dataList[this.isEdit].goodsSpecification = ''),
+        (this.dataList[this.isEdit].goodsCode = ''),
+        (this.dataList[this.isEdit].newPrice = ''),
+        (this.dataList[this.isEdit].oldPrice = ''),
+        (this.dataList[this.isEdit].qty = ''),
+        (this.dataList[this.isEdit].goodsCategoryId = e.categoryId)
+      this.dataList[this.isEdit].goodsCategoryName = e.categoryName
+      getGoods({ websitId: this.formData.websitId, categoryId: e.categoryId, type: 'M' }).then(res => {
+        this.dataList[this.isEdit].goodsList = res.data
+      })
+    },
+    changeGoods(e) {
+      console.log(e)
+      this.dataList[this.isEdit].goodsId = e.goodsId
+      this.dataList[this.isEdit].goodsName = e.goodsName
+      this.dataList[this.isEdit].goodsSalesUnit = e.goodsSalesUnit
+      this.dataList[this.isEdit].goodsSpecification = e.goodsSpecification
+      this.dataList[this.isEdit].oldPrice = e.price
+      this.dataList[this.isEdit].goodsCode = e.goodsCode
+      this.dataList[this.isEdit].qty = e.qty
+    },
+    add() {
+      if (this.dataList.length != 0) {
+        this.isEdit += 1
+      }
+      this.dataList.push({
+        goodsList: [],
+        productCategory: {},
+        parentCategoryId: '',
+        parentCategoryName: '',
+        goodsCategory: {},
+        goodsCategoryName: '',
+        goodsCategoryId: '',
+        goods: {},
+        goodsId: '',
+        goodsName: '',
+        goodsSalesUnit: '',
+        goodsSpecification: '',
+        goodsCode: '',
+        newPrice: '',
+        oldPrice: '',
+        qty: '',
+        goodsType: 'M'
+      })
+    },
+    confirm() {
+      this.$confirm(`请确认是否审核通过, 是否继续?`, '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        confirm({
+          sheetId: this.formData.sheetId,
+          flag: 'OK'
+        }).then(res => {
+          if (res.code == 200) {
+            this.$message.success('审核成功!')
+            this.goBack()
+          }
+        })
+      })
+    },
+    submit() {
+      this.$refs.formData.validate((valid, invalidFields, errLabels) => {
+        if (valid) {
+          if (this.formType == 0) {
+            add({
+              remark: this.formData.remark,
+              websitId: this.formData.websitId,
+              websitName: this.formData.websitName,
+              fileUrl: this.formData.fileUrl.map(item => item.url).join(','),
+              items: this.dataList
+            }).then(res => {
+              if (res.code == 200) {
+                this.$message.success('提交成功!')
+                this.goBack()
+              }
+            })
+          } else if (this.formType == 1) {
+            edit({
+              sheetId: this.formData.sheetId,
+              remark: this.formData.remark,
+              websitId: this.formData.websitId,
+              websitName: this.formData.websitName,
+              fileUrl: this.formData.fileUrl.map(item => item.url).join(','),
+              items: this.dataList
+            }).then(res => {
+              if (res.code == 200) {
+                this.dataList = []
+                this.$message.success('提交成功!')
+                this.goBack()
+              }
+            })
+          }
+        }
+      })
+    }
+  }
+}
 </script>
 </script>
 
 
 <style scoped="scoped" lang="scss">
 <style scoped="scoped" lang="scss">
-	.s-page {
-		padding: 20px;
-		background-color: #ffffff;
-	}
-	.page-footer {
-		height: 70px;
-	}
-	
-	.footer {
-		position: fixed;
-		bottom: 0;
-		left: 0;
-		z-index: 1;
-		width: 100%;
-		background: #fff;
-		padding: 15px 40px;
-		box-sizing: border-box;
-		transition: all 0.28s;
-		text-align: right;
-		box-shadow: 0 2px 5px 0 rgb(0 0 0 / 50%), 0 2px 5px 0 rgb(0 0 0 / 10%);
-	
-		&.hideSidebar {
-			margin-left: 54px;
-			width: calc(100vw - 54px);
-		}
-	
-		&.openSidebar {
-			margin-left: 210px;
-			width: calc(100vw - 210px);
-		}
-	
-		.tips {
-			font-size: 12px;
-			color: red;
-			margin-top: 10px;
-		}
-	}
-</style>
+.s-page {
+  padding: 20px;
+  background-color: #ffffff;
+}
+.page-footer {
+  height: 70px;
+}
+
+.footer {
+  position: fixed;
+  bottom: 0;
+  left: 0;
+  z-index: 1;
+  width: 100%;
+  background: #fff;
+  padding: 15px 40px;
+  box-sizing: border-box;
+  transition: all 0.28s;
+  text-align: right;
+  box-shadow: 0 2px 5px 0 rgb(0 0 0 / 50%), 0 2px 5px 0 rgb(0 0 0 / 10%);
+
+  &.hideSidebar {
+    margin-left: 54px;
+    width: calc(100vw - 54px);
+  }
+
+  &.openSidebar {
+    margin-left: 210px;
+    width: calc(100vw - 210px);
+  }
+
+  .tips {
+    font-size: 12px;
+    color: red;
+    margin-top: 10px;
+  }
+}
+</style>

+ 321 - 284
src/views/mallManagement/configCenter/slideshowConfig/index.vue

@@ -1,30 +1,54 @@
 <template>
 <template>
-	<zj-tab-page ref="tabPage" :defaultActives="[{ key: 'list', label: $route.meta.title+'-列表', essential: true }]">
-		<template slot-scope="{activeKey, data}">
-			<template-page v-if="activeKey == 'list'" ref="pageRef" :get-list="getList" :table-attributes="tableAttributes" :table-events="tableEvents"
-			  :options-evens-group="optionsEvensGroup" :moreParameters="moreParameters" :column-parsing="columnParsing"
-			  :operation="operation()" :exportList="exportList">
-			</template-page>
-			<div v-if="~['add', 'edit'].indexOf(activeKey)">
-				<zj-form-container ref="formRef" :form-data="formData" :styleSwitch="false">
-				  <zj-form-module title="" label-width="100px" :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="data.removeTab()">取 消</el-button>
-				  <el-button size="mini" @click="formConfirm(data.removeTab)" type="primary">确 定</el-button>
-				</div>
-			</div>
-		</template>
-	</zj-tab-page>
+  <zj-tab-page ref="tabPage" :defaultActives="[{ key: 'list', label: $route.meta.title + '-列表', essential: true }]">
+    <template slot-scope="{ activeKey, data }">
+      <template-page
+        v-if="activeKey == 'list'"
+        ref="pageRef"
+        :get-list="getList"
+        :table-attributes="tableAttributes"
+        :table-events="tableEvents"
+        :options-evens-group="optionsEvensGroup"
+        :moreParameters="moreParameters"
+        :column-parsing="columnParsing"
+        :operation="operation()"
+        :exportList="exportList"
+      >
+      </template-page>
+      <div v-if="~['add', 'edit'].indexOf(activeKey)">
+        <zj-form-container ref="formRef" :form-data="formData" :styleSwitch="false">
+          <zj-form-module
+            title=""
+            label-width="100px"
+            :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="data.removeTab()">取 消</el-button>
+          <el-button size="mini" @click="formConfirm(data.removeTab)" type="primary">确 定</el-button>
+        </div>
+      </div>
+    </template>
+  </zj-tab-page>
 </template>
 </template>
 
 
 <script>
 <script>
 import TemplatePage from '@/components/template/template-page-1.vue'
 import TemplatePage from '@/components/template/template-page-1.vue'
 import import_mixin from '@/components/template/import_mixin.js'
 import import_mixin from '@/components/template/import_mixin.js'
 import { required, mobileRequired, mobile } from '@/components/template/rules_verify.js'
 import { required, mobileRequired, mobile } from '@/components/template/rules_verify.js'
-import { carouselMapListPageV2, carouselMapPageExport, changeBannerStatus, addBanner, editBanner, getBannerDetail, deleteBanner, getGoodsList, batchDeleteBanner } from '@/api/setting'
+import {
+  carouselMapListPageV2,
+  carouselMapPageExport,
+  changeBannerStatus,
+  addBanner,
+  editBanner,
+  getBannerDetail,
+  deleteBanner,
+  getGoodsList,
+  batchDeleteBanner
+} from '@/api/setting'
 import ImageUpload from '@/components/file-upload'
 import ImageUpload from '@/components/file-upload'
 import operation_mixin from '@/components/template/operation_mixin.js'
 import operation_mixin from '@/components/template/operation_mixin.js'
 export default {
 export default {
@@ -45,173 +69,185 @@ export default {
       recordSelected: [],
       recordSelected: [],
       /** 表单变量 */
       /** 表单变量 */
       formDialogType: 0,
       formDialogType: 0,
-      formDialogTitles: ["新增", "编辑"],
+      formDialogTitles: ['新增', '编辑'],
       formDialog: false,
       formDialog: false,
       formData: {
       formData: {
-        carouselName: "",
+        carouselName: '',
         imgSrc: [],
         imgSrc: [],
         state: true,
         state: true,
-        sortNum: "",
-        type: "",
-        goodsId: "",
-        appId: "",
-        linkUrl: "",
+        sortNum: '',
+        type: '',
+        goodsId: '',
+        appId: '',
+        linkUrl: ''
       },
       },
       goodsList: [],
       goodsList: [],
-	  formType: 'add',
-	  formVisible: false,
+      formType: 'add',
+      formVisible: false
     }
     }
   },
   },
   computed: {
   computed: {
-	// 事件组合
-	optionsEvensGroup() {
-		return [
-			[
-				[
-					this.optionsEvensAuth("add", {
-						click: () => {
-							this.openForm('add')
-						}
-					})
-				],
-			],
-			[
-				[
-					this.optionsEvensAuth("del", {
-						name: '批量删除',
-						click: () => {
-							this.batchDelete()
-						}
-					})
-				],
-			]
-		]
-	},
+    // 事件组合
+    optionsEvensGroup() {
+      return [
+        [
+          [
+            this.optionsEvensAuth('add', {
+              click: () => {
+                this.openForm('add')
+              }
+            })
+          ]
+        ],
+        [
+          [
+            this.optionsEvensAuth('del', {
+              name: '批量删除',
+              click: () => {
+                this.batchDelete()
+              }
+            })
+          ]
+        ]
+      ]
+    },
     // 更多参数
     // 更多参数
     moreParameters() {
     moreParameters() {
       return []
       return []
     },
     },
     formItems() {
     formItems() {
-      return [{
-        md: 6,
-        isShow: true,
-        name: 'el-input',
-        attributes: { placeholder: '请输入' },
-        formItemAttributes: {
-          label: '轮播图名称',
-          prop: 'carouselName',
-          rules: [...required]
-        }
-      }, {
-        md: 6,
-        isShow: true,
-        name: 'el-input',
-        attributes: { placeholder: '请输入' },
-        formItemAttributes: {
-          label: '排序',
-          prop: 'sortNum',
-          rules: []
+      return [
+        {
+          md: 6,
+          isShow: true,
+          name: 'el-input',
+          attributes: { placeholder: '请输入' },
+          formItemAttributes: {
+            label: '轮播图名称',
+            prop: 'carouselName',
+            rules: [...required]
+          }
+        },
+        {
+          md: 6,
+          isShow: true,
+          name: 'el-input',
+          attributes: { placeholder: '请输入' },
+          formItemAttributes: {
+            label: '排序',
+            prop: 'sortNum',
+            rules: []
+          }
+        },
+        {
+          md: 8,
+          isShow: true,
+          name: 'el-radio',
+          options: [
+            { label: '商品链接', value: 1 },
+            { label: '凡科活动链接', value: 2 },
+            { label: '专区活动链接', value: 3 }
+          ],
+          attributes: { filterable: true, placeholder: '请选择' },
+          formItemAttributes: {
+            label: '链接类型',
+            prop: 'type',
+            rules: []
+          }
+        },
+        ...(() => {
+          if (this.formData.type == 1) {
+            this.formData.appid = ''
+            this.formData.linkUrl = ''
+            // this.formData.goodsId = ""
+            return [
+              {
+                md: 6,
+                isShow: true,
+                name: 'el-select',
+                options: this.goodsList,
+                attributes: { filterable: true, placeholder: '请选择' },
+                formItemAttributes: {
+                  label: '选择活动',
+                  prop: 'goodsId',
+                  rules: []
+                }
+              }
+            ]
+          } else if (this.formData.type == 2) {
+            this.formData.goodsId = ''
+            return [
+              {
+                md: 6,
+                isShow: true,
+                name: 'el-input',
+                attributes: { placeholder: '请输入' },
+                formItemAttributes: {
+                  label: '活动APPID',
+                  prop: 'appid',
+                  rules: []
+                }
+              },
+              {
+                md: 6,
+                isShow: true,
+                name: 'el-input',
+                attributes: { placeholder: '请输入' },
+                formItemAttributes: {
+                  label: '活动路径',
+                  prop: 'linkUrl',
+                  rules: []
+                }
+              }
+            ]
+          } else if (this.formData.type == 3) {
+            this.formData.appid = ''
+            this.formData.linkUrl = ''
+            // this.formData.goodsId = ""
+            return [
+              {
+                md: 6,
+                isShow: true,
+                name: 'el-select',
+                options: [
+                  { value: 2, label: '首页弹窗' },
+                  { value: 3, label: '胶囊图' },
+                  { value: 4, label: '活动专区2-左侧专区' },
+                  { value: 5, label: '活动专区2-右侧专区' },
+                  { value: 6, label: '专场专区-01' },
+                  { value: 7, label: '专场专区-02' },
+                  { value: 8, label: '专场专区-03' },
+                  { value: 9, label: '专场专区-04' },
+                  { value: 10, label: '专题精选-01' },
+                  { value: 11, label: '专题精选-02' },
+                  { value: 12, label: '专题精选-03' },
+                  { value: 13, label: '底部广告图' }
+                ],
+                attributes: { filterable: true, placeholder: '请选择' },
+                formItemAttributes: {
+                  label: '选择活动',
+                  prop: 'goodsId',
+                  rules: []
+                }
+              }
+            ]
+          }
+          return []
+        })(),
+        {
+          md: 24,
+          isShow: true,
+          name: 'slot-component',
+          formItemAttributes: {
+            label: '封面图片',
+            prop: 'imgSrc',
+            rules: [...required]
+          },
+          render: (h, { props, onInput }) => {
+            var { value } = props
+            return <ImageUpload fileList={this.formData.imgSrc} uid="imgSrc_materials_drawing_images" limit={1} />
+          }
         }
         }
-      }, {
-        md: 8,
-        isShow: true,
-        name: 'el-radio',
-        options: [{ label: "商品链接", value: 1 }, { label: "凡科活动链接", value: 2 }, { label: "专区活动链接", value: 3 }],
-        attributes: { filterable: true, placeholder: '请选择' },
-        formItemAttributes: {
-          label: '链接类型',
-          prop: 'type',
-          rules: []
-        }
-      },
-      ...(() => {
-        if (this.formData.type == 1) {
-          this.formData.appid = ""
-          this.formData.linkUrl = ""
-          // this.formData.goodsId = ""
-          return [{
-            md: 6,
-            isShow: true,
-            name: 'el-select',
-            options: this.goodsList,
-            attributes: { filterable: true, placeholder: '请选择' },
-            formItemAttributes: {
-              label: '选择活动',
-              prop: 'goodsId',
-              rules: []
-            }
-          }]
-        } else if (this.formData.type == 2) {
-          this.formData.goodsId = ""
-          return [{
-            md: 6,
-            isShow: true,
-            name: 'el-input',
-            attributes: { placeholder: '请输入' },
-            formItemAttributes: {
-              label: '活动APPID',
-              prop: 'appid',
-              rules: []
-            }
-          }, {
-            md: 6,
-            isShow: true,
-            name: 'el-input',
-            attributes: { placeholder: '请输入' },
-            formItemAttributes: {
-              label: '活动路径',
-              prop: 'linkUrl',
-              rules: []
-            }
-          }]
-        } else if (this.formData.type == 3) {
-          this.formData.appid = ""
-          this.formData.linkUrl = ""
-          // this.formData.goodsId = ""
-          return [{
-            md: 6,
-            isShow: true,
-            name: 'el-select',
-            options: [
-              { value: 2, label: '首页弹窗' },
-              { value: 3, label: '胶囊图' },
-              { value: 4, label: '活动专区2-左侧专区' },
-              { value: 5, label: '活动专区2-右侧专区' },
-              { value: 6, label: '专场专区-01' },
-              { value: 7, label: '专场专区-02' },
-              { value: 8, label: '专场专区-03' },
-              { value: 9, label: '专场专区-04' },
-              { value: 10, label: '专题精选-01' },
-              { value: 11, label: '专题精选-02' },
-              { value: 12, label: '专题精选-03' },
-              { value: 13, label: '底部广告图' },
-            ],
-            attributes: { filterable: true, placeholder: '请选择' },
-            formItemAttributes: {
-              label: '选择活动',
-              prop: 'goodsId',
-              rules: []
-            }
-          }]
-        }
-        return []
-      })()
-	  , {
-	    md: 24,
-	    isShow: true,
-	    name: 'slot-component',
-	    formItemAttributes: {
-	      label: '封面图片',
-	      prop: 'imgSrc',
-	      rules: [...required]
-	    },
-	    render: (h, { props, onInput }) => {
-	      var { value } = props
-	      return (
-	        <ImageUpload fileList={this.formData.imgSrc} uid="imgSrc_materials_drawing_images" limit={1} />
-	      )
-	    }
-	  }
       ]
       ]
     }
     }
   },
   },
@@ -230,102 +266,103 @@ export default {
     },
     },
     // 表格操作列
     // 表格操作列
     operation() {
     operation() {
-		return this.operationBtn({
-		  edit: {
-			btnType: 'text',
-		    click: ({ row, index, column }) => {
-				this.openForm('edit',row.id)
-		    }
-		  },
-		  del: {
-			btnType: 'text',
-			prompt: '确定删除吗?',
-		    click: ({ row, index, column }) => {
-		      deleteBanner({ carouselMapId: row.id }).then(() => {
-		        this.$message({ type: 'success', message: '删除成功!' })
-		        this.$refs.pageRef.refreshList()
-		      })
-		    }
-		  },
-		  status: {
-			btnType: 'text',
-			name: ({ row, index, column }) => {
-				return row.state ? '隐藏' : '显示'
-			},
-		  	prompt:  ({ row, index, column }) => {
-				return `确定${row.state ? '隐藏' : '显示'}吗?`
-			},
-		    click: ({ row, index, column }) => {
-		      changeBannerStatus({ carouselMapId: row.id, state: !row.state }).then(() => {
-		        this.$message({ type: 'success', message: `${row.state ? '隐藏' : '显示'}成功!` })
-		        this.$refs.pageRef.refreshList()
-		      })
-		    }
-		  },
-		})
+      return this.operationBtn({
+        edit: {
+          btnType: 'text',
+          click: ({ row, index, column }) => {
+            this.openForm('edit', row.id)
+          }
+        },
+        del: {
+          btnType: 'text',
+          prompt: '确定删除吗?',
+          click: ({ row, index, column }) => {
+            deleteBanner({ carouselMapId: row.id }).then(() => {
+              this.$message({ type: 'success', message: '删除成功!' })
+              this.$refs.pageRef.refreshList()
+            })
+          }
+        },
+        status: {
+          btnType: 'text',
+          name: ({ row, index, column }) => {
+            return row.state ? '隐藏' : '显示'
+          },
+          prompt: ({ row, index, column }) => {
+            return `确定${row.state ? '隐藏' : '显示'}吗?`
+          },
+          click: ({ row, index, column }) => {
+            changeBannerStatus({ carouselMapId: row.id, state: !row.state }).then(() => {
+              this.$message({ type: 'success', message: `${row.state ? '隐藏' : '显示'}成功!` })
+              this.$refs.pageRef.refreshList()
+            })
+          }
+        }
+      })
+    },
+    // 取消 新增编辑
+    formCancel() {
+      this.formVisible = false
+      this.$refs?.formRef?.resetFields()
+      this.$data.formData = this.$options.data().formData
+    },
+    // 打开 新增编辑 网点表单
+    openForm(type, id) {
+      this.$refs.tabPage.addTab({
+        // 对应显示的模块
+        activeKey: type,
+        // 唯一标识
+        key: type,
+        // 页签名称
+        label: { edit: '编辑', add: '新增' }[type],
+        // 打开时事件
+        triggerEvent: () => {
+          this.formCancel()
+          this.$nextTick(() => {
+            this.formType = type
+            this.formVisible = true
+            if (type == 'add') {
+              this.formDialogType = 0
+            } else {
+              this.formDialogType = 1
+              getBannerDetail({ id }).then(res => {
+                Object.assign(this.formData, res.data, {
+                  imgSrc: res.data.imgSrc ? [{ url: res.data.imgSrc }] : []
+                })
+                getGoodsList({
+                  pageNum: 1,
+                  pageSize: -1
+                }).then(res => {
+                  this.goodsList = res.data.records.map(item => ({
+                    value: item.goodsId,
+                    label: item.goodsName
+                  }))
+                })
+              })
+            }
+          })
+        },
+        // 关闭时事件
+        closeEvent: () => {
+          this.formCancel()
+        }
+      })
     },
     },
-	// 取消 新增编辑
-	formCancel() {
-	  this.formVisible = false
-	  this.$refs?.formRef?.resetFields()
-	  this.$data.formData = this.$options.data().formData
-	},
-	// 打开 新增编辑 网点表单
-	openForm(type, id) {
-	  this.$refs.tabPage.addTab({
-	    // 对应显示的模块
-	    activeKey: type,
-	    // 唯一标识
-	    key: type,
-	    // 页签名称
-	    label: ({ edit: "编辑", add: "新增" })[type],
-	    // 打开时事件
-	    triggerEvent: () => {
-	      this.formCancel()
-	      this.$nextTick(()=>{
-	        this.formType = type
-	        this.formVisible = true
-	        if (type == 'add') {
-	          this.formDialogType = 0
-	        } else {
-				this.formDialogType = 1
-	          getBannerDetail({ id }).then(res => {
-	            Object.assign(this.formData, res.data, {
-	              imgSrc: res.data.imgSrc ? [{ url: res.data.imgSrc }] : [],
-	            })
-	            getGoodsList({
-	              pageNum: 1,
-	              pageSize: -1
-	            }).then(res => {
-	              this.goodsList = res.data.records.map(item => ({
-	                value: item.goodsId,
-	                label: item.goodsName
-	              }));
-	            })
-	          })
-	        }
-	      })
-	    },
-	    // 关闭时事件
-	    closeEvent: () => {
-			console.log(111)
-	      this.formCancel()
-	    }
-	  })
-	},
     formConfirm(cancel) {
     formConfirm(cancel) {
-		this.$refs.formRef.validate((valid, invalidFields, errLabels) => {
-			if (valid) {
-				([addBanner, editBanner][this.formDialogType])({
-					...this.formData,
-					imgSrc: this.formData.imgSrc.map(item => item.url).join(","),
-				}).then(res => {
-					this.$message({ type: 'success', message: `${({ edit: "编辑", add: "新增" })[this.formType]}成功!` })
-					cancel('list')
-					this.$refs.pageRef.refreshList()
-				})
-			}
-		})
+      this.$refs.formRef.validate((valid, invalidFields, errLabels) => {
+        if (valid) {
+          ;[addBanner, editBanner]
+            [this.formDialogType]({
+              ...this.formData,
+              imgSrc: this.formData.imgSrc.map(item => item.url).join(',')
+            })
+            .then(res => {
+              this.$message({ type: 'success', message: `${{ edit: '编辑', add: '新增' }[this.formType]}成功!` })
+              cancel('list')
+              this.$refs.pageRef.refreshList()
+            })
+        }
+      })
     },
     },
     batchDelete() {
     batchDelete() {
       if (this.recordSelected && this.recordSelected.length > 0) {
       if (this.recordSelected && this.recordSelected.length > 0) {
@@ -333,31 +370,31 @@ export default {
           confirmButtonText: '确定',
           confirmButtonText: '确定',
           cancelButtonText: '取消',
           cancelButtonText: '取消',
           type: 'warning'
           type: 'warning'
-        }).then(() => {
-          let ids = []
-          this.recordSelected.forEach(value => {
-            ids.push(value.id)
+        })
+          .then(() => {
+            let ids = []
+            this.recordSelected.forEach(value => {
+              ids.push(value.id)
+            })
+            batchDeleteBanner(ids).then(() => {
+              this.$message({ type: 'success', message: '删除成功!' })
+              this.$refs.pageRef.refreshList()
+            })
           })
           })
-          batchDeleteBanner(ids).then(() => {
-            this.$message({ type: 'success', message: '删除成功!' })
-            this.$refs.pageRef.refreshList()
-          })
-        }).catch(() => { });
+          .catch(() => {})
       } else {
       } else {
         this.$errorMsg('请选择要删除的轮播图')
         this.$errorMsg('请选择要删除的轮播图')
       }
       }
-    },
+    }
   }
   }
 }
 }
 </script>
 </script>
 
 
-<style lang="scss" scoped>
-	
-</style>
+<style lang="scss" scoped></style>
 <style>
 <style>
-	.dialog-footer{
-		padding: 0 30px;
-		display: flex;
-		justify-content: flex-end;
-	}
+.dialog-footer {
+  padding: 0 30px;
+  display: flex;
+  justify-content: flex-end;
+}
 </style>
 </style>

+ 104 - 56
src/views/salesPurchasing/goodsPurchasedStored/index.vue

@@ -1,70 +1,118 @@
 <template>
 <template>
-	<template-page ref="pageRef" :get-list="getList" :table-attributes="tableAttributes" :table-events="tableEvents"
-		:options-evens-group="optionsEvensGroup" :moreParameters="moreParameters" :column-parsing="columnParsing"
-		:exportList="exportList">
-	</template-page>
+  <template-page
+    v-if="pageShow"
+    ref="pageRef"
+    :get-list="getList"
+    :table-attributes="tableAttributes"
+    :table-events="tableEvents"
+    :options-evens-group="optionsEvensGroup"
+    :moreParameters="moreParameters"
+    :column-parsing="columnParsing"
+    :exportList="exportList"
+    key="pageType"
+  >
+    <div slot="moreSearch">
+      <el-radio-group v-model="pageType" size="mini" @change="changePageType">
+        <el-radio-button label="list">列表</el-radio-button>
+        <el-radio-button label="goodsder">商品明细</el-radio-button>
+        <el-radio-button label="codeder">条码明细</el-radio-button>
+      </el-radio-group>
+      <br /><br />
+    </div>
+  </template-page>
 </template>
 </template>
 
 
 <script>
 <script>
 import TemplatePage from '@/components/template/template-page-1.vue'
 import TemplatePage from '@/components/template/template-page-1.vue'
 import import_mixin from '@/components/template/import_mixin.js'
 import import_mixin from '@/components/template/import_mixin.js'
+import {
+  goodsPurchaseList,
+  goodsPurchaseListExport,
+  goodsPurchaseItemList,
+  goodsPurchaseItemListExport,
+  goodsPurchaseCodeList,
+  goodsPurchaseCodeListExport
+} from '@/api/goodsPurchasedStored.js'
 export default {
 export default {
-	components: { TemplatePage },
-	mixins: [import_mixin],
-	data() {
-		return {
-			// 事件组合
-			optionsEvensGroup: [],
-			// 表格属性
-			tableAttributes: {
-				// 启用勾选列
-				selectColumn: false
-			},
-			// 表格事件
-			tableEvents: {
-				'selection-change': this.selectionChange
-			},
-			// 勾选选中行
-			recordSelected: [],
-			/** 表单变量 */
-			formDialogType: 0,
-			formDialogTitles: ["新增", "编辑", "详情"],
-			formDialog: false,
-			appraise_status: ''
-		}
-	},
-	computed: {
-		// 更多参数
-		moreParameters() {
-			return []
-		},
-		formItems() {
-			return []
-		}
-	},
-	methods: {
-		// 列表请求函数
-		getList(p, cb) {
-			return {}
-		},
-		// 列表导出函数
-		exportList(){
-			return {}
-		},
-		// 表格列解析渲染数据更改
-		columnParsing(item, defaultData) {
-			return defaultData
-		},
-		// 监听勾选变化
-		selectionChange(data) {
-			this.recordSelected = data
-		},
-	}
+  components: { TemplatePage },
+  mixins: [import_mixin],
+  data() {
+    return {
+      pageType: 'list',
+      pageShow: true,
+      // 事件组合
+      optionsEvensGroup: [],
+      // 表格属性
+      tableAttributes: {
+        // 启用勾选列
+        selectColumn: false
+      },
+      // 表格事件
+      tableEvents: {
+        'selection-change': this.selectionChange
+      },
+      // 勾选选中行
+      recordSelected: [],
+      /** 表单变量 */
+      formDialogType: 0,
+      formDialogTitles: ['新增', '编辑', '详情'],
+      formDialog: false,
+      appraise_status: ''
+    }
+  },
+  computed: {
+    // 更多参数
+    moreParameters() {
+      return []
+    },
+    formItems() {
+      return []
+    }
+  },
+  watch: {
+    pageType() {
+      this.pageShow = false
+      this.$nextTick(() => {
+        this.pageShow = true
+      })
+    }
+  },
+  methods: {
+    // 列表请求函数
+    getList(p, cb) {
+      if (this.pageType == 'list') {
+        return goodsPurchaseList(p)
+      } else if (this.pageType == 'list') {
+        return goodsPurchaseItemList(p)
+      } else if (this.pageType == 'list') {
+        return goodsPurchaseCodeList(p)
+      }
+    },
+    // 列表导出函数
+    exportList(...p) {
+      if (this.pageType == 'list') {
+        return goodsPurchaseListExport(...p)
+      } else if (this.pageType == 'list') {
+        return goodsPurchaseItemListExport(...p)
+      } else if (this.pageType == 'list') {
+        return goodsPurchaseCodeListExport(...p)
+      }
+    },
+    // 表格列解析渲染数据更改
+    columnParsing(item, defaultData) {
+      return defaultData
+    },
+    // 监听勾选变化
+    selectionChange(data) {
+      this.recordSelected = data
+    },
+    changePageType() {}
+  }
 }
 }
 </script>
 </script>
 
 
 <style lang="scss" scoped>
 <style lang="scss" scoped>
 .tab {
 .tab {
-	padding: 20px 20px 0 20px;
+  padding: 20px 20px 0 20px;
 }
 }
 </style>
 </style>

+ 104 - 56
src/views/salesPurchasing/merchandisePurchaseReturn/index.vue

@@ -1,70 +1,118 @@
 <template>
 <template>
-	<template-page ref="pageRef" :get-list="getList" :table-attributes="tableAttributes" :table-events="tableEvents"
-		:options-evens-group="optionsEvensGroup" :moreParameters="moreParameters" :column-parsing="columnParsing"
-		:exportList="exportList">
-	</template-page>
+  <template-page
+    v-if="pageShow"
+    ref="pageRef"
+    :get-list="getList"
+    :table-attributes="tableAttributes"
+    :table-events="tableEvents"
+    :options-evens-group="optionsEvensGroup"
+    :moreParameters="moreParameters"
+    :column-parsing="columnParsing"
+    :exportList="exportList"
+    key="pageType"
+  >
+    <div slot="moreSearch">
+      <el-radio-group v-model="pageType" size="mini" @change="changePageType">
+        <el-radio-button label="list">列表</el-radio-button>
+        <el-radio-button label="goodsder">商品明细</el-radio-button>
+        <el-radio-button label="codeder">条码明细</el-radio-button>
+      </el-radio-group>
+      <br /><br />
+    </div>
+  </template-page>
 </template>
 </template>
 
 
 <script>
 <script>
 import TemplatePage from '@/components/template/template-page-1.vue'
 import TemplatePage from '@/components/template/template-page-1.vue'
 import import_mixin from '@/components/template/import_mixin.js'
 import import_mixin from '@/components/template/import_mixin.js'
+import {
+  goodsPurchaseRetList,
+  goodsPurchaseRetListExport,
+  goodsPurchaseRetItemList,
+  goodsPurchaseRetItemListExport,
+  goodsPurchaseRetCodeList,
+  goodsPurchaseRetCodeListExport
+} from '@/api/merchandisePurchaseReturn.js'
 export default {
 export default {
-	components: { TemplatePage },
-	mixins: [import_mixin],
-	data() {
-		return {
-			// 事件组合
-			optionsEvensGroup: [],
-			// 表格属性
-			tableAttributes: {
-				// 启用勾选列
-				selectColumn: false
-			},
-			// 表格事件
-			tableEvents: {
-				'selection-change': this.selectionChange
-			},
-			// 勾选选中行
-			recordSelected: [],
-			/** 表单变量 */
-			formDialogType: 0,
-			formDialogTitles: ["新增", "编辑", "详情"],
-			formDialog: false,
-			appraise_status: ''
-		}
-	},
-	computed: {
-		// 更多参数
-		moreParameters() {
-			return []
-		},
-		formItems() {
-			return []
-		}
-	},
-	methods: {
-		// 列表请求函数
-		getList(p, cb) {
-			return {}
-		},
-		// 列表导出函数
-		exportList(){
-			return {}
-		},
-		// 表格列解析渲染数据更改
-		columnParsing(item, defaultData) {
-			return defaultData
-		},
-		// 监听勾选变化
-		selectionChange(data) {
-			this.recordSelected = data
-		},
-	}
+  components: { TemplatePage },
+  mixins: [import_mixin],
+  data() {
+    return {
+      pageType: 'list',
+      pageShow: true,
+      // 事件组合
+      optionsEvensGroup: [],
+      // 表格属性
+      tableAttributes: {
+        // 启用勾选列
+        selectColumn: false
+      },
+      // 表格事件
+      tableEvents: {
+        'selection-change': this.selectionChange
+      },
+      // 勾选选中行
+      recordSelected: [],
+      /** 表单变量 */
+      formDialogType: 0,
+      formDialogTitles: ['新增', '编辑', '详情'],
+      formDialog: false,
+      appraise_status: ''
+    }
+  },
+  computed: {
+    // 更多参数
+    moreParameters() {
+      return []
+    },
+    formItems() {
+      return []
+    }
+  },
+  watch: {
+    pageType() {
+      this.pageShow = false
+      this.$nextTick(() => {
+        this.pageShow = true
+      })
+    }
+  },
+  methods: {
+    // 列表请求函数
+    getList(p, cb) {
+      if (this.pageType == 'list') {
+        return goodsPurchaseRetList(p)
+      } else if (this.pageType == 'list') {
+        return goodsPurchaseRetItemList(p)
+      } else if (this.pageType == 'list') {
+        return goodsPurchaseRetCodeList(p)
+      }
+    },
+    // 列表导出函数
+    exportList(...p) {
+      if (this.pageType == 'list') {
+        return goodsPurchaseRetListExport(...p)
+      } else if (this.pageType == 'list') {
+        return goodsPurchaseRetItemListExport(...p)
+      } else if (this.pageType == 'list') {
+        return goodsPurchaseRetCodeListExport(...p)
+      }
+    },
+    // 表格列解析渲染数据更改
+    columnParsing(item, defaultData) {
+      return defaultData
+    },
+    // 监听勾选变化
+    selectionChange(data) {
+      this.recordSelected = data
+    },
+    changePageType() {}
+  }
 }
 }
 </script>
 </script>
 
 
 <style lang="scss" scoped>
 <style lang="scss" scoped>
 .tab {
 .tab {
-	padding: 20px 20px 0 20px;
+  padding: 20px 20px 0 20px;
 }
 }
 </style>
 </style>