Просмотр исходного кода

Merge branch 'master' of http://110.41.163.243:9980/kd-aiot/aiot-app into dengfei

695593266@qq.com 1 год назад
Родитель
Сommit
4d65aa33b9
44 измененных файлов с 1706 добавлено и 996 удалено
  1. 3 3
      .hbuilderx/launch.json
  2. 16 1
      api/common.js
  3. 8 8
      api/myTicket/index.js
  4. 1 1
      api/wt/index.js
  5. BIN
      assets/xyy.jpg
  6. 22 20
      components/Assign.vue
  7. 25 12
      components/MySearch/MySearch.vue
  8. 134 143
      pages/center/center.vue
  9. 15 8
      pages/doc/docList.vue
  10. 5 1
      pages/doc/index.vue
  11. 21 34
      pages/home/components/KdCard/config.js
  12. 1 1
      pages/home/components/KdCard/index.vue
  13. 2 0
      pages/home/components/navigation.vue
  14. 16 2
      pages/home/home.vue
  15. 50 6
      pages/home/myTicket/myTicket.vue
  16. 20 243
      pages/index/index.vue
  17. 1 1
      pages/internalManagement/apply/index.vue
  18. 175 58
      pages/maintenance/order/order.vue
  19. 2 4
      pages/maintenanceWorkorder/components/unfinishedApplication.vue
  20. 5 3
      pages/maintenanceWorkorder/detail/detail.vue
  21. 196 69
      pages/maintenanceWorkorder/order/order.vue
  22. 1 1
      pages/saleManage/businessOpportunity/components/drawer.vue
  23. 1 1
      pages/saleManage/businessOpportunity/index.vue
  24. 43 25
      pages/saleManage/components/selectContact.vue
  25. 1 0
      pages/salesServiceManagement/demandList/add.vue
  26. 62 15
      pages/salesServiceManagement/demandList/components/AfterSales.vue
  27. 5 5
      pages/salesServiceManagement/demandList/components/Invoice.vue
  28. 2 2
      pages/salesServiceManagement/demandList/components/contactList.vue
  29. 22 9
      pages/salesServiceManagement/demandList/components/itemSelect.vue
  30. 130 19
      pages/salesServiceManagement/demandList/index.vue
  31. 0 1
      pages/salesServiceManagement/recycle/index.vue
  32. 213 2
      pages/salesServiceManagement/workOrder/components/accessoryAdd.vue
  33. 3 2
      pages/salesServiceManagement/workOrder/components/forWork/transfer.vue
  34. 13 12
      pages/salesServiceManagement/workOrder/components/planInfo.vue
  35. 51 21
      pages/salesServiceManagement/workOrder/index.vue
  36. 203 194
      pages/systemSettings/index.vue
  37. 1 0
      pages/tour_tally/detail/detail.vue
  38. 179 59
      pages/tour_tally/order/order.vue
  39. 1 1
      pages/warehouse/enterHouse/index.vue
  40. 1 1
      pages/warehouse/inventoryAllocation/index.vue
  41. 1 1
      pages/warehouse/outHouse/index.vue
  42. 2 0
      store/index.js
  43. 11 6
      uni_modules/zxz-uni-data-select/components/zxz-uni-data-select/zxz-uni-data-select.vue
  44. 42 1
      utils/utils.js

+ 3 - 3
.hbuilderx/launch.json

@@ -19,17 +19,17 @@
             "type" : "uniCloud"
         },
         {
-            "openVueDevtools" : false,
+            "openVueDevtools" : true,
             "playground" : "standard",
             "type" : "uni-app:app-android"
         },
         {
-            "openVueDevtools" : false,
+            "openVueDevtools" : true,
             "playground" : "custom",
             "type" : "uni-app:app-ios"
         },
         {
-            "openVueDevtools" : true,
+            "openVueDevtools" : false,
             "type" : "uni-app:h5"
         }
     ]

+ 16 - 1
api/common.js

@@ -1,4 +1,8 @@
-import { postJ, post, get } from '@/utils/request'
+import {
+	postJ,
+	post,
+	get
+} from '@/utils/request'
 import Vue from 'vue'
 
 /**
@@ -90,3 +94,14 @@ export async function getParentIdListByDeptId(id) {
 	}
 	return Promise.reject(new Error(res.message))
 }
+
+// 获取字典
+export async function getDictByCode(code) {
+	const data = await get(
+		Vue.prototype.apiUrl + `/system/dict/getByCode/${code}`,
+	);
+	if (data.code == 0) {
+		return data.data;
+	}
+	return Promise.reject(data.message);
+}

+ 8 - 8
api/myTicket/index.js

@@ -1,7 +1,8 @@
 import {
 	postJ,
 	post,
-	get
+	get,
+	getJ
 } from '@/utils/request'
 import Vue from 'vue'
 
@@ -101,7 +102,7 @@ export async function getUserPage(params) {
 
 // 转派
 export async function workOrderRotate(params) {
-	const data = await get(Vue.prototype.apiUrl + `/eam/workordermaintenance/rotate`, params)
+	const data = await getJ(Vue.prototype.apiUrl + `/eam/workordermaintenance/rotate`, params)
 	if (data.code == 0) {
 		return data.data
 	}
@@ -145,13 +146,12 @@ export async function deviceListQrCode(params) {
 	return Promise.reject(new Error(data.message))
 }
 
-// 维修工单获取数据不对,用pc端的接口
-export async function getRepairList(params) {
-	const data = await get(Vue.prototype.apiUrl + `/eam/workorder/getWorkOrderList`, params)
+// 获取规则名称下拉
+export async function getRuleList(params) {
+	const data = await get(Vue.prototype.apiUrl + `/main/ruleinfo/page`, params)
 	console.log(data)
 	if (data.code == 0) {
-		return data.data
+		return data.data.list
 	}
 	return Promise.reject(new Error(data.message))
-}
-
+}

+ 1 - 1
api/wt/index.js

@@ -406,7 +406,7 @@ export async function getBpmCustomFormList(params) {
   };
 //动态表单 我发起的申请
 export async function getProcessInstancePage(params) {
-	const res = await get(Vue.prototype.apiUrl + '/bpm/process-instance/my-page', params );
+	const res = await postJ(Vue.prototype.apiUrl + '/bpm/process-instance/my-page', params );
 	if (res.code == 0) {
 	  return res.data;
 	}

BIN
assets/xyy.jpg


+ 22 - 20
components/Assign.vue

@@ -155,7 +155,7 @@
 					workOrderId: this.formData.workOrderId
 				}
 				console.log(param, 'param')
-				if (this.Usertype == 1) {
+				// if (this.Usertype == 1) {
 					workOrderRotate(param).then(() => {
 						this.close()
 						const _this = this
@@ -171,23 +171,23 @@
 							}
 						})
 					})
-				} else {
-					addAssists(param).then(() => {
-						this.close()
-						const _this = this
-						uni.showModal({
-							title: `此工单已转派成功`,
-							content: '',
-							confirmText: '确认',
-							showCancel: false, // 是否显示取消按钮,默认为 true
-							success: function(res) {
-								if (res.confirm) {
-									_this.$emit('success', _this.formData)
-								}
-							}
-						})
-					})
-				}
+				// } else {
+				// 	addAssists(param).then(() => {
+				// 		this.close()
+				// 		const _this = this
+				// 		uni.showModal({
+				// 			title: `此工单已转派成功`,
+				// 			content: '',
+				// 			confirmText: '确认',
+				// 			showCancel: false, // 是否显示取消按钮,默认为 true
+				// 			success: function(res) {
+				// 				if (res.confirm) {
+				// 					_this.$emit('success', _this.formData)
+				// 				}
+				// 			}
+				// 		})
+				// 	})
+				// }
 
 
 				// postJ(this.apiUrl + '/workOrder/anewSendOrders', [param]).then(res => {
@@ -286,8 +286,8 @@
 			color: #fff;
 
 			.btn {
-				width: 80rpx;
-				height: 32rpx;
+				padding: 10rpx 20rpx;
+			
 				display: inline-block;
 				font-size: 32rpx;
 				border: 1px solid #fff;
@@ -365,4 +365,6 @@
 			}
 		}
 	}
+	
+	
 </style>

+ 25 - 12
components/MySearch/MySearch.vue

@@ -7,7 +7,7 @@
 					<!-- <slot name='slot'></slot> -->
 					<u-form-item :label="item.label" :prop="item.prop">
 						<component :is="item.component" v-model="formData[item.prop]" v-bind="item.props"
-							v-on="item.events" />
+							v-on="item.events" :ref="item.prop" />
 					</u-form-item>
 				</block>
 
@@ -17,8 +17,13 @@
 				<u-button text="重置" shape="circle" style="color: #000;" @click="reset"></u-button>
 				<u-button type="primary" text="确定" shape="circle" @click="search"></u-button>
 			</view>
-			
-			
+
+
+
+
+			<!-- <u--input ref="kk" placeholder="请输入内容" border="surround" clearable focus></u--input> -->
+
+			<!-- <slot name="picker"></slot> -->
 
 		</view>
 	</u-popup>
@@ -30,13 +35,17 @@
 	import MyPicker from '@/uni_modules/uview-ui/components/u-picker/u-picker.vue'
 	import MyDateRange from '@/uni_modules/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker.vue'
 
+	import MySelect from '@/uni_modules/zxz-uni-data-select/components/zxz-uni-data-select/zxz-uni-data-select.vue'
+	// <zxz-uni-data-select :localdata="option.dimension" v-model="form.dimension" dataValue='type'
+	// 							dataKey="name" filterable format='{name}'></zxz-uni-data-select>
 
 	export default {
 		name: "MySearch",
 		components: {
 			MyInput,
 			MyPicker,
-			MyDateRange
+			MyDateRange,
+			MySelect
 		},
 		props: {
 			show: {
@@ -55,11 +64,13 @@
 		data() {
 			return {
 				formData: {},
+				
 			};
 		},
 		watch: {
 			initialData: {
 				handler(newVal) {
+					console.log(newVal);
 					this.formData = {
 						...newVal
 					};
@@ -68,14 +79,9 @@
 			}
 		},
 		methods: {
-			
-			
-			
-			change(){
-				console.log(this);
-			},
 			open() {
-
+				console.log(this.formData);
+				console.log(this.formItems);
 			},
 			close() {
 				this.$emit('update:show', false)
@@ -84,12 +90,15 @@
 				console.log('maskClick事件:', e);
 			},
 			reset() {
+				// this.form = {
+				// 	...this.initialData
+				// }
 				this.formData = {}
 				console.log(this.formData);
 			},
 			search() {
 				this.close()
-				this.$emit('search',this.formData)
+				this.$emit('search', this.formData)
 			}
 		},
 		created() {
@@ -127,4 +136,8 @@
 		justify-content: space-around;
 		margin-top: 20px;
 	}
+
+	/deep/.uni-stat__select {
+		background-color: #fff;
+	}
 </style>

+ 134 - 143
pages/center/center.vue

@@ -1,155 +1,146 @@
 <template>
-  <view class="content">
-    <view class="logo_bg">
-      <view class="logo-content">
-        <image :src="src1" model="aspectFit "></image>
-        <view class="user_name">
-          <view>{{ userInfo.name  }}</view>
-          <view>{{ userInfo.groupName }}</view>
-        </view>
-        <uni-icons
-          class="tuichu"
-          type="gear"
-          @click="goSystemSettings"
-          size="38"
-          color="#fff"
-        ></uni-icons>
-      </view>
-    </view>
-    <view class="bg_content">
-      <view class="tab-data">
-        <label class="tab-lable">我的任务</label>
-        <view class="tab-content">
-			  <!-- @click="onDataOrderTab(index)" -->
-          <label
-            :class="{ 'data-action': DataOrderType == index }"
-          
-            v-for="(item, index) in taskList"
-            >{{ item.name }}</label
-          >
-        </view>
-      </view>
-      <view class="tab">
-        <view class="tab-content">
-          <view class="tab-content-title">
-            <label>{{ taskList[DataOrderType].workNum }}</label
-            ><label>总工单(次)</label></view
-          >
-          <view class="tab-content-title">
-            <label>{{ taskList[DataOrderType].manHour }}</label
-            ><label>总工时(小时)</label></view
-          >
-        </view>
-        <label class="tab-check-lable" @click="gomiss">查看详情</label>
-      </view>
-      <view class="options">
-        <image src="../../static/sop.jpg" model="aspectFit "></image>
-      </view>
-<!--      <view class="notice" @click="goAbout">
+	<view class="content">
+		<view class="logo_bg">
+			<view class="logo-content">
+				<image :src="src1" model="aspectFit "></image>
+				<view class="user_name">
+					<view>{{ userInfo.name  }}</view>
+					<view>{{ userInfo.groupName }}</view>
+				</view>
+				<uni-icons class="tuichu" type="gear" @click="goSystemSettings" size="38" color="#fff"></uni-icons>
+			</view>
+		</view>
+		<view class="bg_content">
+			<view class="tab-data">
+				<label class="tab-lable">我的任务</label>
+				<view class="tab-content">
+					<!-- @click="onDataOrderTab(index)" -->
+					<label :class="{ 'data-action': DataOrderType == index }"
+						v-for="(item, index) in taskList">{{ item.name }}</label>
+				</view>
+			</view>
+			<view class="tab">
+				<view class="tab-content">
+					<view class="tab-content-title">
+						<label>{{ taskList[DataOrderType].workNum }}</label><label>总工单(次)</label>
+					</view>
+					<view class="tab-content-title">
+						<label>{{ taskList[DataOrderType].manHour }}</label><label>总工时(小时)</label>
+					</view>
+				</view>
+				<label class="tab-check-lable" @click="gomiss">查看详情</label>
+			</view>
+			<view class="options">
+				<image src="../../static/sop.jpg" model="aspectFit "></image>
+			</view>
+			<!--      <view class="notice" @click="goAbout">
         <image class="icon" src="@/static/u79.svg" model="aspectFit "></image>
         <text class="text1">关于株洲硬质合金集团型材分公司</text>
         <text class="iconfont icon-youjiantou icos"></text>
       </view> -->
-    </view>
-  </view>
+		</view>
+	</view>
 </template>
 
 <script>
-import { postJ } from '@/utils/api.js'
-import dayjs from 'dayjs'
-export default {
-  data () {
-    return {
-      src1: 'https://cdn.uviewui.com/uview/album/1.jpg',
-      userInfo: null,
-      DataOrderType: 0,
-      taskList: [
-        {
-          name: '今天',
-          type: 'day',
-          list: [],
-          workNum: '',
-          manHour: ''
-        },
-        {
-          name: '本周',
-          type: 'week',
-          list: [],
-          workNum: '',
-          manHour: ''
-        },
-        {
-          name: '本月',
-          type: 'month',
-          list: [],
-          workNum: '',
-          manHour: ''
-        }
-      ]
-    }
-  },
-  onLoad () {
-    this.userInfo = uni.getStorageSync('userInfo')
-    console.log(this.userInfo)
-    // this.getdata()
-  },
-  methods: {
-    click (name) {
-      console.log('click', name)
-    },
-    onDataOrderTab (index) {
-      this.DataOrderType = index
-      this.getdata()
-    },
-    getdata () {
-      let par = {
-        endTime: '',
-        startTime: ''
-      }
-      let type = this.taskList[this.DataOrderType].type
-      switch (type) {
-        case 'day':
-          par.startTime = dayjs().startOf('day').format('YYYY-MM-DD')
-          par.endTime = dayjs().endOf('day').format('YYYY-MM-DD')
-          break
-        case 'week':
-          par.startTime = dayjs().startOf('week').format('YYYY-MM-DD')
-          par.endTime = dayjs().endOf('week').format('YYYY-MM-DD')
-          break
-        case 'month':
-          par.startTime = dayjs().startOf('month').format('YYYY-MM-DD')
-          par.endTime = dayjs().endOf('month').format('YYYY-MM-DD')
-          break
-        default:
-          break
-      }
-      postJ(this.apiUrl + '/workOrder/getMyTaskStatistics', par).then(res => {
-        if (res.success) {
-          this.taskList[this.DataOrderType].workNum = res.data.num
-          this.taskList[this.DataOrderType].manHour = res.data.workingHours
-        }
-      })
-    },
-    goAbout () {
-      // uni.navigateTo({
-      //   url: './about/about'
-      // })
-    },
-    gomiss () {
-      uni.navigateTo({
-        url: '/pages/home/work/work'
-      })
-    },
+	import xyy from '@/assets/xyy.jpg'
+	import {
+		postJ
+	} from '@/utils/api.js'
+	import dayjs from 'dayjs'
+	export default {
+		data() {
+			return {
+				src1: '',
+				userInfo: null,
+				DataOrderType: 0,
+				taskList: [{
+						name: '今天',
+						type: 'day',
+						list: [],
+						workNum: '',
+						manHour: ''
+					},
+					{
+						name: '本周',
+						type: 'week',
+						list: [],
+						workNum: '',
+						manHour: ''
+					},
+					{
+						name: '本月',
+						type: 'month',
+						list: [],
+						workNum: '',
+						manHour: ''
+					}
+				]
+			}
+		},
+		onLoad() {
+			this.userInfo = uni.getStorageSync('userInfo')
+			this.src1 = this.userInfo?.avatar[0]?.url || xyy
+			console.log(this.userInfo)
+			// this.getdata()
+		},
+		methods: {
+			click(name) {
+				console.log('click', name)
+			},
+			onDataOrderTab(index) {
+				this.DataOrderType = index
+				this.getdata()
+			},
+			getdata() {
+				let par = {
+					endTime: '',
+					startTime: ''
+				}
+				let type = this.taskList[this.DataOrderType].type
+				switch (type) {
+					case 'day':
+						par.startTime = dayjs().startOf('day').format('YYYY-MM-DD')
+						par.endTime = dayjs().endOf('day').format('YYYY-MM-DD')
+						break
+					case 'week':
+						par.startTime = dayjs().startOf('week').format('YYYY-MM-DD')
+						par.endTime = dayjs().endOf('week').format('YYYY-MM-DD')
+						break
+					case 'month':
+						par.startTime = dayjs().startOf('month').format('YYYY-MM-DD')
+						par.endTime = dayjs().endOf('month').format('YYYY-MM-DD')
+						break
+					default:
+						break
+				}
+				postJ(this.apiUrl + '/workOrder/getMyTaskStatistics', par).then(res => {
+					if (res.success) {
+						this.taskList[this.DataOrderType].workNum = res.data.num
+						this.taskList[this.DataOrderType].manHour = res.data.workingHours
+					}
+				})
+			},
+			goAbout() {
+				// uni.navigateTo({
+				//   url: './about/about'
+				// })
+			},
+			gomiss() {
+				uni.navigateTo({
+					url: '/pages/home/work/work'
+				})
+			},
 
-    goSystemSettings () {
-      uni.navigateTo({
-        url: '/pages/systemSettings/index'
-      })
-    }
-  }
-}
+			goSystemSettings() {
+				uni.navigateTo({
+					url: '/pages/systemSettings/index'
+				})
+			}
+		}
+	}
 </script>
 
 <style lang="scss" scoped>
-@import 'center.scss';
-</style>
+	@import 'center.scss';
+</style>

+ 15 - 8
pages/doc/docList.vue

@@ -4,8 +4,8 @@
 
 		</uni-nav-bar>
 		<view class="topBtn">
-			<u-button type="primary" @click="add" text="本地上传"></u-button>
-			<u-button @click="selectDoc" text="关联文档库"></u-button>
+			<u-button v-if="type!=='view'" type="primary" @click="add" text="本地上传"></u-button>
+			<u-button v-if="type!=='view'" @click="selectDoc" text="关联文档库"></u-button>
 		</view>
 
 		<u-cell-group>
@@ -17,7 +17,7 @@
 				<view slot="value" class="listBtn">
 
 					<u-button text="浏览" size='mini'></u-button>
-					<u-button text="删除" size='mini' @click="del(index)"></u-button>
+					<u-button v-if="type!=='view'" text="删除" size='mini' @click="del(index)"></u-button>
 				</view>
 			</u-cell>
 		</u-cell-group>
@@ -25,9 +25,9 @@
 		<view style="height: 84rpx;"></view>
 		<view class="footerButton">
 			<u-button type="primary" @click="back" text="返回"></u-button>
-			<u-button @click="save" text="保存"></u-button>
+			<u-button v-if="type!=='view'" @click="save" text="保存"></u-button>
 		</view>
-		<fileEdit  ref="fileEditRef" @success="done"></fileEdit>
+		<fileEdit ref="fileEditRef" @success="done"></fileEdit>
 	</view>
 </template>
 
@@ -40,17 +40,24 @@
 		components: {
 			fileEdit
 		},
+		computed: {
+
+		},
 
 		data() {
 			return {
 				tableList: [],
-				fileId: []
+				fileId: [],
+				type: ''
 
 			}
 		},
 		onLoad({
-			fileId
+			fileId,
+			type
 		}) {
+			this.type = type
+			console.log(type);
 			if (fileId) {
 				this.fileId = JSON.parse(fileId)
 			}
@@ -90,7 +97,7 @@
 			add() {
 				this.$refs.fileEditRef.open()
 			},
-			done(id){
+			done(id) {
 				this.fileId.push(...id);
 				this.init()
 			}

+ 5 - 1
pages/doc/index.vue

@@ -58,9 +58,13 @@
 		},
 		methods: {
 			handleUpload() {
+				let type=this.type
+				console.log(this.type);
+				console.log(JSON.stringify(this.selectVal));
 				console.log('1111111')
+				// return
 				uni.navigateTo({
-					url: '/pages/doc/docList?fileId=' + JSON.stringify(this.selectVal)
+					url: '/pages/doc/docList?fileId=' + JSON.stringify(this.selectVal) + '&type=' + type
 				})
 			},
 			getFiles(val = []) {

+ 21 - 34
pages/home/components/KdCard/config.js

@@ -10,13 +10,16 @@ const urgent = {
 // 状态(点巡检·保养)
 const status = {
 	0: '待接收',
+	1: '已接收',
 	2: '执行中',
-	3: '完成'
+	3: '待验收',
+	4: '已验收'
 }
 
 // 状态(维修)
 const repairStatus = {
 	0: '待接收',
+	1: '已接收',
 	2: '执行中',
 	3: '待验收',
 	4: '已验收'
@@ -24,8 +27,7 @@ const repairStatus = {
 
 export default {
 	// 维修工单
-	repair: [
-		{
+	repair: [{
 			label: '紧急程度',
 			key: 'urgent',
 			formatter: formatter(urgent)
@@ -45,8 +47,7 @@ export default {
 		}
 	],
 	// 计划性维修工单
-	planWx: [
-		{
+	planWx: [{
 			label: '报修人',
 			key: 'createUserName2'
 		},
@@ -57,8 +58,7 @@ export default {
 	],
 
 	// 保养
-	maintenance: [
-		{
+	maintenance: [{
 			label: '名称',
 			key: 'planName'
 		},
@@ -81,8 +81,7 @@ export default {
 		}
 	],
 	// 巡点检
-	patrol: [
-		{
+	patrol: [{
 			label: '名称',
 			key: 'planName'
 		},
@@ -105,8 +104,7 @@ export default {
 		}
 	],
 	// 量具送检
-	quantity: [
-		{
+	quantity: [{
 			label: '名称',
 			key: 'planName'
 		},
@@ -129,8 +127,7 @@ export default {
 		}
 	],
 	// 盘点
-	check: [
-		{
+	check: [{
 			label: '盘点名称',
 			key: 'planName'
 		},
@@ -152,8 +149,7 @@ export default {
 		}
 	],
 	// 维修报工 待办
-	backlog_repair: [
-		{
+	backlog_repair: [{
 			label: '维修工单号',
 			key: 'workOrderCode'
 		},
@@ -175,8 +171,7 @@ export default {
 		}
 	],
 	// 维修计划审批 待办
-	backlog_repairPlan: [
-		{
+	backlog_repairPlan: [{
 			label: '计划单号',
 			key: 'workOrderCode'
 		},
@@ -202,8 +197,7 @@ export default {
 	// 	{label: "申请人", key: ""},
 	// ],
 	// 保养计划审批 待办
-	backlog_maintenancePlan: [
-		{
+	backlog_maintenancePlan: [{
 			label: '计划单号',
 			key: 'workOrderCode'
 		},
@@ -234,8 +228,7 @@ export default {
 	// 	{label: "申请人", key: ""},
 	// ],
 	// 巡点检计划审批 待办
-	backlog_patrolPlan: [
-		{
+	backlog_patrolPlan: [{
 			label: '计划单号',
 			key: 'workOrderCode'
 		},
@@ -258,8 +251,7 @@ export default {
 		}
 	],
 	// 盘点工单验收
-	backlog_check: [
-		{
+	backlog_check: [{
 			label: '盘点单号',
 			key: 'workOrderCode'
 		},
@@ -283,8 +275,7 @@ export default {
 		}
 	],
 	// 盘点计划审批
-	backlog_checkPlan: [
-		{
+	backlog_checkPlan: [{
 			label: '计划单号',
 			key: 'workOrderCode'
 		},
@@ -303,8 +294,7 @@ export default {
 		}
 	],
 	// 出库审批
-	backlog_OUT_WAREPlan: [
-		{
+	backlog_OUT_WAREPlan: [{
 			label: '出库单号',
 			key: 'workOrderCode'
 		},
@@ -326,8 +316,7 @@ export default {
 		}
 	],
 	// 入库申请
-	backlog_IN_WAREPlan: [
-		{
+	backlog_IN_WAREPlan: [{
 			label: '入库单号',
 			key: 'workOrderCode'
 		},
@@ -349,8 +338,7 @@ export default {
 		}
 	],
 	// 库存调拨
-	backlog_TRANSFERPlan: [
-		{
+	backlog_TRANSFERPlan: [{
 			label: '调拨单号',
 			key: 'workOrderCode'
 		},
@@ -388,8 +376,7 @@ export default {
 		}
 	],
 	// 报损报溢 工单审批
-	backlog_REPORT_LOSS_OVERFLOW: [
-		{
+	backlog_REPORT_LOSS_OVERFLOW: [{
 			label: '报损报溢单号',
 			key: 'workOrderCode'
 		},
@@ -410,4 +397,4 @@ export default {
 			key: 'applicantName'
 		}
 	]
-}
+}

+ 1 - 1
pages/home/components/KdCard/index.vue

@@ -167,7 +167,7 @@
 
 				.label {
 					// text-align: right;
-					width: 28%;
+					width: 30%;
 					font-size: 28rpx;
 					font-style: normal;
 					font-weight: 400;

+ 2 - 0
pages/home/components/navigation.vue

@@ -88,6 +88,8 @@
 				// this.workList[0].badge = res.count
 				const messageCount = await getUnreadNotifyMessageCountAPI()
 				this.workList[2].badge = Number(messageCount)
+				
+				
 			}
 		}
 	}

+ 16 - 2
pages/home/home.vue

@@ -200,6 +200,9 @@
 			ScanCode
 		},
 		onShow() {
+
+
+
 			this.init()
 			let _this = this
 			uni.$off('scancodedate') // 每次进来先 移除全局自定义事件监听器
@@ -207,12 +210,12 @@
 				console.log(data, '-----scancodedate')
 				_this.cbScancodedate(data)
 			})
-			this.getStatistics()
+			// this.getStatistics()
 			// this.Scancodedate()
 		},
 		onLoad() {
 			this.getHomeData()
-			this.getStatistics()
+			// this.getStatistics()
 		},
 		onUnload() {
 			uni.$off('scancodedate')
@@ -270,8 +273,17 @@
 				}
 			})
 		},
+		onHide() {
+			clearTimeout(this.timer);
+		},
+		onUnload() {
+			clearTimeout(this.timer);
+		},
+
+
 		methods: {
 			init() {
+				this.getStatistics()
 				this.$refs.navigationRef && this.$refs.navigationRef.getCount()
 				this.$refs.equipmentRef && this.$refs.equipmentRef.getData()
 				this.$refs.mochaRef && this.$refs.mochaRef.getData()
@@ -532,6 +544,7 @@
 			}
 
 			.table-content {
+				font-size: 28rpx;
 				display: flex;
 				padding: 10rpx 0;
 				width: 100%;
@@ -561,6 +574,7 @@
 					white-space: nowarp;
 					over-flow: hidden;
 					text-overflow: ellipsip;
+					word-break: break-all;
 				}
 
 				.total {

+ 50 - 6
pages/home/myTicket/myTicket.vue

@@ -6,19 +6,26 @@
 				<view @click="HandlScanCode" class="scan_btn"></view>
 			</view>
 		</uni-nav-bar>
+
 		<view class="top-wrapper">
 			<view class="tab_box rx-sc">
 				<view class="tab_item" :class="{active: activeIndex == item.index}" v-for="(item,index) in tabList"
 					:key="index">
-					<view @click="handleTabChange(item)">
+					<view @click="handleTabChange(item)" class="badge-c">
 						{{item.name}}
+							<u-badge max="99" :value="item.badge.value" absolute v-show="orderType==1"></u-badge>
 					</view>
+
+
 				</view>
 			</view>
+
+
 			<view class="more_search">
 				<image src="~@/static/moreSearch.svg" mode="" @click="searchShow = true"></image>
 			</view>
 		</view>
+
 		<view class="work-list">
 			<u-list @scrolltolower="scrolltolower" :key="activeType" :preLoadScreen="page * 10">
 				<u-list-item v-for="(item, index) in dataList" :key="index">
@@ -31,6 +38,7 @@
 				</u-list-item>
 			</u-list>
 		</view>
+
 		<SearchPopup mode="top" v-if="searchShow">
 			<template v-slot:list>
 				<view class="search_list">
@@ -62,6 +70,11 @@
 </template>
 
 <script>
+	
+	import {
+		getByCode
+	} from '@/api/pda/common.js'
+	
 	import SearchPopup from '@/pages/pda/components/searchPopup.vue'
 	import {
 		getWorkOrderList,
@@ -295,7 +308,8 @@
 				codeData: [],
 			}
 		},
-		onLoad(e) {
+		async onLoad(e) {
+			
 			this.$nextTick(() => {
 				console.log(this)
 				this.isInstall = false
@@ -310,6 +324,7 @@
 			})
 		},
 		onShow(e) {
+			console.log(this.orderType);
 			if (this.isInstall) return
 			this.dataList = []
 			this.getList()
@@ -402,7 +417,7 @@
 				}
 				if (this.orderType == 1) {
 					// 待办 执行中
-					this.searchFrom.orderStatus = [0, 2, 3]
+					this.searchFrom.orderStatus = [0, 2]
 				} else {
 					// 已完成
 					this.searchFrom.orderStatus = [4]
@@ -503,11 +518,11 @@
 				}
 				// 维修
 				if (this.tabList[this.activeIndex].workOrderType == 3) {
-					let userInfo = uni.getStorageSync('userInfo')
-					params.executeUserId = userInfo.userId
+					// let userInfo = uni.getStorageSync('userInfo')
+					// params.executeUserId = userInfo.userId
 					if (this.orderType == 1) {
 						if (!params.orderStatus.includes(3)) {
-							params.orderStatus.push(3)
+							// params.orderStatus.push(3)
 						}
 					}
 				} else {
@@ -737,4 +752,33 @@
 	.mg-20 {
 		margin-right: 20rpx;
 	}
+
+	.badge-c {
+		position: relative;
+	}
+
+	.badge {
+		position: absolute;
+		top: 0;
+		right: 0;
+		transform: translate(100%, -20%);
+		font-size: 24rpx;
+
+
+		// position: absolute;
+		// top: -8rpx;
+		// left: 100rpx;
+		// font-size: 24rpx;
+		padding: 0rpx 10rpx;
+		border-radius: 38rpx;
+		background-color: #ff4949;
+		color: #fff;
+		font-style: normal;
+	}
+
+	/deep/.u-badge {
+		top: 0;
+		right: 0;
+		transform: translate(90%, 20%);
+	}
 </style>

+ 20 - 243
pages/index/index.vue

@@ -136,63 +136,11 @@
 		},
 		data() {
 			return {
+				timer: null,
 				src1: 'https://cdn.uviewui.com/uview/album/1.jpg',
 				workOrder: {}, // 工单统计数据
 				//生产类
-				productionList: [
-					// {
-					// 	class: "iconfont icon-gongdanguanli",
-					// 	title: "生产工单",
-					// 	link_url: "/pages/pda/workOrder/index/index",
-					// },
-					// {
-					// 	class: "iconfont icon-gongdanguanli",
-					// 	title: "领料",
-					// 	link_url: "/pages/pda/picking/index/index",
-					// },
-					// {
-					// 	class: "iconfont icon-gongdanguanli",
-					// 	title: "投料",
-					// 	link_url: "/pages/pda/feeding/index/index",
-					// },
-					// {
-					// 	class: "iconfont icon-gongdanguanli",
-					// 	title: "退料",
-					// 	link_url: "/pages/pda/material_return/index/index",
-					// },
-					// {
-					// 	class: "iconfont icon-gongdanguanli",
-					// 	title: "不合格品处置",
-					// 	link_url: "/pages/pda/nonconforming/index/index",
-					// },
-					// {
-					// 	class: "iconfont icon-gongdanguanli",
-					// 	title: "副产品回收",
-					// 	link_url: "/pages/pda/by_product_recovery/index/index",
-					// },
-					// {
-					// 	class: "iconfont icon-gongdanguanli",
-					// 	title: "工单交接",
-					// 	link_url: "/pages/pda/work_order_handover/index/index",
-					// },
-					// {
-					// 	class: "iconfont icon-gongdanguanli",
-					// 	title: "工单详情",
-					// 	link_url: "/pages/pda/work_order_details/index/index",
-					// },
-					// {
-					//   class: "iconfont icon-gongdanguanli",
-					//   title: "生产报工",
-					//   link_url: "/pages/production/report/index",
-					//   "num": 1
-					// },
-					// {
-					//   class: "iconfont icon-gongdanguanli",
-					//   title: "生产工单",
-					//   link_url: "/pages/production/order/index",
-					//   // "num": 1
-					// x},
-				],
+				productionList: [],
 				// executeList: [
 				//   {
 				//     class: "iconfont icon-gongdanguanli",
@@ -228,196 +176,18 @@
 				//仓储管理
 
 				warehousingList: [
-					// {
-					// 	class: 'iconfont icon-shebeikucun',
-					// 	title: '库存管理',
-					// 	link_url: '/pages/warehouse/inventory/index'
-					// 	//"num": 1
-					// },
-					// {
-					// 	class: 'iconfont icon-wuliaoruku',
-					// 	title: '入库管理',
-					// 	link_url: '/pages/warehouse/enterHouse/index'
-					// 	//"num": 34
-					// },
-					// {
-					// 	class: 'iconfont icon-shebeichuku',
-					// 	title: '出库管理',
-					// 	link_url: '/pages/warehouse/outHouse/index'
-					// 	// num: 34
-					// },
-					// {
-					// 	class: 'iconfont icon-shebeiruku',
-					// 	title: '库存调拨',
-					// 	link_url: '/pages/warehouse/inventoryAllocation/index'
-					// 	//"num": 133
-					// },
-					// {
-					// 	class: 'iconfont icon-wuliaoruku',
-					// 	title: '物料入库',
-					// 	link_url: '/pages/warehouse/material/index'
-					// 	//"num": 34
-					// },
-					// {
-					// 	class: 'iconfont icon-shebeiruku',
-					// 	title: '设备入库',
-					// 	link_url: '/pages/warehouse/equipment/index'
-					// 	//"num": 23
-					// },
-					// {
-					// 	class: 'iconfont icon-shebeichuku',
-					// 	title: '设备出库',
-					// 	link_url: '/pages/warehouse/outbound/index'
-					// 	//"num": 23
-					// },
-					// {
-					// 	class: 'iconfont icon-pandiangongdan',
-					// 	title: '盘点工单',
-					// 	link_url: '/pages/warehouse/workOrder/index'
-					// 	// num: 133
-					// },
-					// {
-					// 	class: 'iconfont icon-shebeikucuntongji',
-					// 	title: '报损报溢',
-					// 	link_url: '/pages/warehouse/reportLoss/index'
-					// 	//"num": 133
-					// },
-					// {
-					// 	class: 'iconfont icon-gongdanguanli',
-					// 	title: '拣货管理',
-					// 	link_url: '/pages/warehouse/picking/index'
-					// 	//"num": 133
-					// }
-					// {
-					// 	class: 'iconfont icon-shebeikucuntongji',
-					// 	title: '设备库存统计',
-					// 	link_url: '/pages/warehouse/inventory/stat'
-					// 	//"num": 1
-					// }
+
 				],
 
 				//运维类
 				operationsList: [
-					// {
-					// 	name: '我的工单',
-					// 	type: '',
-					// 	workOrderType: 2,
-					// 	url: `/pages/home/myTicket/myTicket`,
-					// 	icon: 'icon-gongdanguanli',
-					// 	badge: 0
-					// },
-					// {
-					// 	name: '保养工单',
-					// 	type: 'maintenance',
-					// 	workOrderType: 2,
-					// 	url: `/pages/maintenance/order/order`,
-					// 	icon: 'icon-gongdanguanli',
-					// 	badge: 0
-					// },
-					// {
-					// 	name: '巡点检工单',
-					// 	type: 'patrol',
-					// 	workOrderType: 1,
-					// 	url: `/pages/tour_tally/order/order`,
-					// 	icon: 'icon-gongdanguanli',
-					// 	badge: 0
-					// },
-					// {
-					// 	name: '量具送检工单',
-					// 	type: 'quantity',
-					// 	workOrderType: 5,
-					// 	url: `/pages/home/myTicket/myTicket?index=2`,
-					// 	icon: 'icon-gongdanguanli',
-					// 	badge: 0
-					// },
-					// {
-					// 	name: '维修工单',
-					// 	type: 'repaire',
-					// 	workOrderType: 3,
-					// 	url: `/pages/maintenanceWorkorder/order/order`,
-					// 	icon: 'icon-gongdanguanli',
-					// 	badge: 0
-					// },
-					// {
-					// 	name: '报修',
-					// 	type: 'repairReport',
-					// 	workOrderType: 4,
-					// 	url: `/pages/repair/repair/index`,
-					// 	icon: 'icon-gongdanguanli',
-					// 	badge: 0
-					// },
-					// {
-					// 	name: '备品备件申请单',
-					// 	type: 'sparepart',
-					// 	workOrderType: 4,
-					// 	url: `/pages/maintenanceWorkorder/sparepart/index`,
-					// 	icon: 'icon-gongdanguanli',
-					// 	badge: 0
-					// }
-					/*	{
-							class: "iconfont icon-xundianjian",
-							title: "巡点检",
-							link_url: "/pages/tour_tally/order/order",
-							//"num": 34
-						},
-						{
-							class: "iconfont icon-a-baoyangputong",
-							title: "保养工单",
-							link_url: "/pages/maintenance/order/order",
-							//"num": 23
-						},
-						{
-							class: "iconfont icon-weixiugongdan",
-							title: "维修工单",
-							link_url: "/pages/maintain_service/order/order",
-							//"num": 23
-						},
-						/*        {
-						  class: 'iconfont icon-beijian',
-						  title: '备品备件',
-						  link_url: '/pages/sparepart/order/order',
-						  //"num": 1
-						},
-						{
-							class: "iconfont icon-baoxiu",
-							title: "报修单",
-							link_url: "/pages/repair/order/order",
-							//"num": 1
-						},*/
-					/* {
-		  class: 'iconfont icon-wuliaoruku',
-		  title: '入库登记',
-		  link_url: '/pages/put_storage/order/index',
-		  //"num": 34
-		},
-		{
-		  class: 'iconfont icon-shebeichuku',
-		  title: '出库登记',
-		  link_url: '/pages/outbound/order/index',
-		  //"num": 34
-		}, */
+
 				],
 				dispatchList: [
-					// {
-					// 	name: '任务工单',
-					// 	url: `/pages/dispatchManage/taskWork/index`,
-					// 	icon: 'icon-gongdanguanli',
-					// 	badge: 0
-					// },
-					// {
-					// 	name: '发货确认单',
-					// 	url: `/pages/invoiceConfirm/index`,
-					// 	icon: 'icon-gongdanguanli',
-					// 	badge: 0
-					// }
+
 				],
 				internalManagementList: [
-					// {
-					// 	name: '申请',
-					// 	url: `/pages/internalManagement/apply/index`,
-					// 	icon: 'icon-gongdanguanli',
-					// 	badge: 0
-					// }
+
 				],
 				treeList: [],
 				saleManageList: [],
@@ -428,24 +198,31 @@
 		created() {
 			this.getTree()
 		},
-		// onShow() {
-		// 	this.getStatistics()
-		// },
+		onShow() {
+			this.getStatistics()
+		},
+		onHide() {
+			clearTimeout(this.timer);
+		},
+		onUnload() {
+			clearTimeout(this.timer);
+		},
 		methods: {
 			getStatistics() {
 				// 获取工单统计数
-				statistics().then(res => {
+				statistics().then((res) => {
 					this.workOrder = res
 					console.log('this.operationsList---', this.operationsList)
 					console.log('res', res)
 					this.operationsList.forEach(item => {
 						if (item.name == '保养工单') item.badge = res.maintenanceNum
 						if (item.name == '巡点检工单') item.badge = res.patrolInspection
-						// if (item.name == '量具送检工单') item.badge = res.quantityNum
 						if (item.name == '维修工单') item.badge = res.repairsNum
-						// if(item.badge)
 					})
-					console.log(this.operationsList)
+				}).finally(() => {
+					this.timer = setTimeout(() => {
+						this.getStatistics()
+					}, 12000)
 				})
 			},
 			getTree() {

+ 1 - 1
pages/internalManagement/apply/index.vue

@@ -107,7 +107,7 @@
 	let [page, size, isEnd] = [1, 10, true]
 	let [donePage, doneSize, doneIsEnd] = [1, 10, true]
 	import {
-		getBpmCustomFormList
+		getBpmCustomFormList,
 	} from '@/api/wt/index.js'
 	import {
 		getByCode

+ 175 - 58
pages/maintenance/order/order.vue

@@ -1,49 +1,66 @@
 <template>
 	<view>
 		<uni-nav-bar fixed="true" statusBar="true" left-icon="back" title="保养工单" @clickLeft="back"></uni-nav-bar>
-		<!-- <template>
-			<view class="tab-title">
-				<view v-for="(item, index) in tabList" :key="index" class="tab-item" :class="index === pickTabIndex ? 'active' : ''" @click="changeChartsTab(index)">
-					{{ item.label }}
-					<text v-if="item.number > 0" class="title-red">{{ item.number }}</text>
-				</view>
-			</view>
-			<view class="tab-title__placeholder"></view>
-		</template> -->
-		<view class="top-wrapper">
-			<view class="tab_box rx-sc">
-				<view class="tab_item" v-for="(item,index) in tabList" :key="index"
-					:class="{active: pickTabIndex == index}">
-					<view @click="changeChartsTab(index)">
-						{{item.label}}
-						<!-- <text v-if="item.number > 0" class="title-red">{{ item.number }}</text> -->
+
+		<view class="search-box">
+			<uni-section>
+				<uni-easyinput @clear="clearSearch" prefixIcon="search" style="width: 460rpx" v-model="searchForm.code"
+					placeholder="工单编号">
+				</uni-easyinput>
+			</uni-section>
+			<button class="search_btn" @click="doSearch">搜索</button>
+			<!-- <image class="menu_icon" @click="showSearch" src="~@/static/pda/menu.svg"></image> -->
+		</view>
+
+
+		<view v-show="showTab">
+			<view class="top-wrapper">
+				<view class="tab_box rx-sc">
+					<view class="tab_item" v-for="(item,index) in tabList" :key="index"
+						:class="{active: pickTabIndex == index}">
+						<view @click="changeChartsTab(index)" class="badge-c">
+							{{item.label}}
+							<u-badge max="99" :value="item.number" absolute></u-badge>
+							<!-- <text v-if="item.number > 0" class="title-red">{{ item.number }}</text> -->
+						</view>
 					</view>
 				</view>
 			</view>
 		</view>
 
-
 		<OrderTask v-for="(item, index) in tabList" :key="index" v-show="index === pickTabIndex" :list="item.list"
 			:type="tabList.value"></OrderTask>
+
+		<u-toast ref="uToast"></u-toast>
+
+		<MySearch :show.sync="searchShow" :formItems="formItems" @search="confirmSearch" ref="mySearchRef"></MySearch>
 	</view>
 </template>
 
 <script>
 	import {
-		getWorkOrderList
+		isObjectEmpty
+	} from '@/utils/utils.js'
+	import {
+		getWorkOrderList,
+		getRuleList
 	} from '@/api/myTicket'
 	import OrderTask from './OrderTask.vue'
 	import {
 		post,
 		postJ
 	} from '@/utils/api.js'
-	let [page, size, isEnd] = [1, 10, true]
+
 	export default {
 		components: {
 			OrderTask
 		},
 		data() {
 			return {
+				showTab: true,
+				page: 1,
+				size: 10,
+				isEnd: false,
 				tabList: [{
 						value: 0,
 						label: '待接收',
@@ -65,22 +82,41 @@
 				],
 				pickTabIndex: 0,
 				qrContent: null,
-				barType: 0
+				barType: 0,
+				searchShow: false,
+				searchForm: {
+					code: ''
+				},
+				formItems: [{
+						label: '规则名称:',
+						prop: 'ruleId',
+						component: 'MySelect',
+						props: {
+							localdata: [],
+							dataKey: 'name',
+							dataValue: 'id'
+						}
+					},
+					{
+						label: '时间:',
+						prop: 'startEndTime',
+						component: 'MyDateRange',
+						props: {
+							type: 'daterange',
+						}
+					}
+				]
 			}
 		},
+		onLoad() {
+			this.getRuleList()
+		},
 		onShow() {
 			this.getFirstList()
 			this.getStatus()
 		},
-		onReachBottom: function() {
-			if (isEnd) {
-				return
-			}
-			// 显示加载图标
-			uni.showLoading({
-				title: '数据加载中'
-			})
-			this.getMoreLists()
+		onReachBottom() {
+			this.getList()
 		},
 		methods: {
 			getStatus() {
@@ -100,22 +136,7 @@
 				}).then(res => {
 					this.tabList[1].number = res.count
 				})
-				getWorkOrderList({
-					orderStatus: [3],
-					type: 2,
-					pageNum: 1,
-					size: 1
-				}).then(res => {
-					this.tabList[2].number = res.count
-				})
-				getWorkOrderList({
-					orderStatus: [4],
-					type: 2,
-					pageNum: 1,
-					size: 1
-				}).then(res => {
-					this.tabList[3].number = res.count
-				})
+
 			},
 			getCount() {
 				statistics().then(data => {
@@ -152,29 +173,41 @@
 				})
 			},
 			getFirstList: function() {
-				page = 1
-				isEnd = true
-				this.getList()
-			},
-			getMoreLists: function() {
-				//获取更多数据
-				page++
+				this.page = 1
+				this.isEnd = false
 				this.getList()
 			},
+
 			getList() {
+				if (this.isEnd) {
+					this.$refs.uToast.show({
+						message: "暂无更多数据",
+						duration: 1000
+					})
+					return
+				}
 				uni.showLoading({
-					title: '数据加载中'
+					title: '加载中'
 				})
 				let params = {
 					orderStatus: [this.tabList[this.pickTabIndex].value],
 					type: 2,
-					pageNum: page,
-					size
+					pageNum: this.page,
+					size: this.size,
+					...this.searchForm
+				}
+				if (!this.showTab) {
+					delete params.orderStatus
 				}
 				getWorkOrderList(params)
 					.then(res => {
-						this.tabList[this.pickTabIndex].list = res.list
-						isEnd = this.tabList[this.pickTabIndex].list >= res.count
+						if (this.page == 1) {
+							this.tabList[this.pickTabIndex].list = res.list
+						} else {
+							this.tabList[this.pickTabIndex].list.push(...res.list);
+						}
+						this.page += 1
+						this.isEnd = this.tabList[this.pickTabIndex].list.length >= res.count
 						uni.hideLoading()
 					})
 					.catch(() => {
@@ -184,7 +217,42 @@
 			changeChartsTab(index) {
 				this.pickTabIndex = index
 				this.getFirstList()
-			}
+			},
+			async getRuleList() {
+				let params = {
+					status: 1,
+					type: 1,
+					pageNum: 1,
+					size: -1
+				}
+				const res = await getRuleList(params)
+				this.formItems.find(item => item.prop === 'ruleId').props.localdata = res
+			},
+			clearSearch() {
+				this.searchForm.code = ''
+				this.doSearch()
+			},
+			doSearch() {
+				this.isEnd = false;
+				this.page = 1;
+				this.showTab = isObjectEmpty(this.searchForm)
+				this.getList();
+			},
+			showSearch() {
+				this.searchShow = true
+			},
+			confirmSearch(e) {
+				console.log(e);
+				let data = JSON.parse(JSON.stringify(e))
+				this.searchForm = {
+					...this.searchForm,
+					...data
+				}
+				console.log(this.searchForm);
+				this.doSearch()
+			},
+
+
 		}
 	}
 </script>
@@ -220,6 +288,17 @@
 		}
 	}
 
+	.badge-c {
+		position: relative;
+	}
+
+	/deep/.u-badge {
+		top: 0;
+		right: 0;
+		transform: translate(90%, 20%);
+	}
+
+
 	// .tab-title {
 	// 	position: fixed;
 	// 	z-index: 99;
@@ -289,4 +368,42 @@
 	// 	top: 10rpx;
 	// 	min-width: 18rpx;
 	// }
+
+	.search-box {
+		background-color: #fff;
+		display: flex;
+		width: 750rpx;
+		height: 88rpx;
+		padding: 16rpx 32rpx;
+		align-items: center;
+		gap: 16rpx;
+		justify-content: space-between;
+
+		/deep/.uni-section {
+			margin-top: 0px;
+		}
+
+		/deep/.uni-section-header {
+			padding: 0px;
+
+		}
+
+		.search_btn {
+			width: 120rpx;
+			height: 70rpx;
+			line-height: 70rpx;
+			padding: 0 24rpx;
+			background: $theme-color;
+			font-size: 32rpx;
+			color: #fff;
+			margin: 0;
+			margin-left: 26rpx;
+		}
+
+		.menu_icon {
+			width: 44rpx;
+			height: 44rpx;
+			margin-left: 14rpx;
+		}
+	}
 </style>

+ 2 - 4
pages/maintenanceWorkorder/components/unfinishedApplication.vue

@@ -57,8 +57,7 @@
 			baTreePicker,
 			fileMain
 		},
-		props: {
-		},
+		props: {},
 		data() {
 			return {
 				popShow: false,
@@ -193,8 +192,7 @@
 			color: #fff;
 
 			.btn {
-				width: 80rpx;
-				height: 32rpx;
+				padding: 10rpx 20rpx;
 				display: inline-block;
 				font-size: 32rpx;
 				border: 1px solid #fff;

+ 5 - 3
pages/maintenanceWorkorder/detail/detail.vue

@@ -84,6 +84,7 @@
 						<view class="zp-btn btns" @click="handlbpbj">申请备品备件</view>
 						<view class="zx-btn btns" @click="handlbg">报工</view>
 						<view class="zx-btn btns" style="margin-top: 20rpx;" @click="handlNobg">非完成报工</view>
+						<view class="zp-btn btns" @click="handlZp">转派</view>
 						<!-- <view class="zp-btn btns" @click="handlbpbj" v-if="!worksheetInfo.applyOrder">
 							申请备品备件
 						</view>
@@ -102,10 +103,11 @@
 						<view class="zp-btn btns" @click="handlZp" v-if="worksheetInfo.status.code === 8">转派</view>
 					</div> -->
 				</view>
-				<view class="zxpg-wrap"
+
+				<!-- 	<view class="zxpg-wrap"
 					v-if="orderType == 1 && repairInfo.orderStatus == 3 && repairInfo.requestUserId == userId && ParentIndex !=4">
 					<view class="zx-btn btns" @click="searchShow = true">验收</view>
-				</view>
+				</view> -->
 
 				<Assign ref="Assign" @success="handleAssign"></Assign>
 				<SearchPopup mode="center" v-if="searchShow">
@@ -534,7 +536,7 @@
 			getInfo() {
 				getWorkOrderDetail(this.workOrderCode).then(data => {
 					// *** 新增 照片数据接收
-					if(data.ticketsInfoResponse.workOrderImg){
+					if (data.ticketsInfoResponse.workOrderImg) {
 						data.ticketsInfoResponse.workOrderImg = JSON.parse(data.ticketsInfoResponse.workOrderImg);
 					}
 					console.log(data, '看看数据')

+ 196 - 69
pages/maintenanceWorkorder/order/order.vue

@@ -1,48 +1,67 @@
 <template>
 	<view>
 		<uni-nav-bar fixed="true" statusBar="true" left-icon="back" title="维修工单" @clickLeft="back"></uni-nav-bar>
-		<!-- <template>
-			<view class="tab-title">
-				<view v-for="(item, index) in tabList" :key="index" class="tab-item" :class="index === pickTabIndex ? 'active' : ''" @click="changeChartsTab(index)">
-					{{ item.label }}
-					<text v-if="item.number > 0" class="title-red">{{ item.number }}</text>
-				</view>
-			</view>
-			<view class="tab-title__placeholder"></view>
-		</template> -->
-		<view class="top-wrapper">
-			<view class="tab_box rx-sc">
-				<view class="tab_item" v-for="(item,index) in tabList" :key="index"
-					:class="{active: pickTabIndex == index}">
-					<view @click="changeChartsTab(index)">
-						{{item.label}}
-						<!-- <text v-if="item.number > 0" class="title-red">{{ item.number }}</text> -->
+
+
+		<view class="search-box">
+			<uni-section>
+				<uni-easyinput @clear="clearSearch" prefixIcon="search" style="width: 460rpx" v-model="searchForm.code"
+					placeholder="工单编号">
+				</uni-easyinput>
+			</uni-section>
+			<button class="search_btn" @click="doSearch">搜索</button>
+			<!-- <image class="menu_icon" @click="showSearch" src="~@/static/pda/menu.svg"></image> -->
+		</view>
+
+
+		<view v-show="showTab">
+			<view class="top-wrapper">
+				<view class="tab_box rx-sc">
+					<view class="tab_item" v-for="(item,index) in tabList" :key="index"
+						:class="{active: pickTabIndex == index}">
+						<view @click="changeChartsTab(index)" class="badge-c">
+							{{item.label}}
+							<u-badge max="99" :value="item.number" absolute></u-badge>
+							<!-- <text v-if="item.number > 0" class="title-red">{{ item.number }}</text> -->
+						</view>
 					</view>
 				</view>
 			</view>
 		</view>
+
 		<OrderTask v-for="(item, index) in tabList" :key="index" v-show="index === pickTabIndex" :list="item.list"
 			:type="tabList.value" :ParentIndex="pickTabIndex"></OrderTask>
+		<u-toast ref="uToast"></u-toast>
+
+		<MySearch :show.sync="searchShow" :formItems="formItems" @search="confirmSearch" ref="mySearchRef"></MySearch>
 	</view>
 </template>
 
 <script>
+	import {
+		isObjectEmpty
+	} from '@/utils/utils.js'
 	import {
 		getWorkOrderList,
-		getAssistList
+		getAssistList,
+		getRuleList
 	} from '@/api/myTicket'
 	import OrderTask from './OrderTask.vue'
 	import {
 		post,
 		postJ
 	} from '@/utils/api.js'
-	let [page, size, isEnd] = [1, 10, false]
+
 	export default {
 		components: {
 			OrderTask
 		},
 		data() {
 			return {
+				showTab: true,
+				page: 1,
+				size: 10,
+				isEnd: false,
 				tabList: [{
 						value: 0,
 						label: '待接收',
@@ -76,22 +95,48 @@
 				],
 				pickTabIndex: 0,
 				qrContent: null,
-				barType: 0
+				barType: 0,
+				searchShow: false,
+				searchForm: {
+					code: ''
+				},
+				formItems: [{
+						label: '规则名称:',
+						prop: 'ruleId',
+						component: 'MySelect',
+						props: {
+							localdata: [],
+							dataKey: 'name',
+							dataValue: 'id'
+						}
+					},
+					{
+						label: '时间:',
+						prop: 'startEndTime',
+						component: 'MyDateRange',
+						props: {
+							type: 'daterange',
+						}
+					}
+				]
+
+
 			}
 		},
+		onLoad() {
+			this.getRuleList()
+		},
 		onShow() {
-			this.getFirstList()
+			this.changeChartsTab(this.pickTabIndex)
 			this.getStatus()
 		},
-		onReachBottom: function() {
-			if (isEnd) {
+		onReachBottom() {
+			if (this.pickTabIndex === 4) {
+				this.getAList()
 				return
 			}
-			// 显示加载图标
-			uni.showLoading({
-				title: '数据加载中'
-			})
-			this.getMoreLists()
+
+			this.getList()
 		},
 		methods: {
 			getStatus() {
@@ -101,6 +146,8 @@
 					pageNum: 1,
 					size: 1
 				}).then(res => {
+					console.log(res);
+					this.tabList
 					this.tabList[0].number = res.count
 				})
 				getWorkOrderList({
@@ -111,23 +158,7 @@
 				}).then(res => {
 					this.tabList[1].number = res.count
 				})
-				getWorkOrderList({
-					orderStatus: [3],
-					type: 3,
-					pageNum: 1,
-					size: 1
-				}).then(res => {
-					this.tabList[2].number = res.count
-				})
-				getWorkOrderList({
-					orderStatus: [4],
-					type: 3,
-					pageNum: 1,
-					size: 1
-				}).then(res => {
-					this.tabList[3].number = res.count
-				})
-				// /eam/PdaWorkOrder/assistList
+
 			},
 			getCount() {
 				statistics().then(data => {
@@ -164,37 +195,43 @@
 				})
 			},
 			getFirstList: function() {
-				page = 1
-				isEnd = false
-				this.getList()
-			},
-			getMoreLists: function() {
-				//获取更多数据
-				// page++
+				this.page = 1
+				this.isEnd = false
 				this.getList()
 			},
+
 			getList() {
+				if (this.isEnd) {
+					this.$refs.uToast.show({
+						message: "暂无更多数据",
+						duration: 1000
+					})
+					return
+				}
 				uni.showLoading({
-					title: '数据加载中'
+					title: '加载中'
 				})
+
 				let params = {
 					orderStatus: [this.tabList[this.pickTabIndex].value],
 					type: 3,
-					pageNum: page,
-					size
+					pageNum: this.page,
+					size: this.size,
+					...this.searchForm
+				}
+
+				if (!this.showTab) {
+					delete params.orderStatus
 				}
 				getWorkOrderList(params)
 					.then(res => {
-						// this.tabList[this.pickTabIndex].list = res.list
-						// this.tabList[this.pickTabIndex].list.push(res.list);
-						// isEnd = this.tabList[this.pickTabIndex].list >= res.count
-						if (page === 1) {
+						if (this.page === 1) {
 							this.tabList[this.pickTabIndex].list = res.list
 						} else {
 							this.tabList[this.pickTabIndex].list.push(...res.list)
 						}
-						page += 1
-						isEnd = this.tabList[this.pickTabIndex].list.length >= res.count;
+						this.page += 1
+						this.isEnd = this.tabList[this.pickTabIndex].list.length >= res.count;
 						uni.hideLoading()
 					})
 					.catch(() => {
@@ -203,8 +240,8 @@
 			},
 			changeChartsTab(index) {
 				this.pickTabIndex = index;
-				page = 1;
-				isEnd = false;
+				this.page = 1;
+				this.isEnd = false;
 				if (index == 4) {
 					this.getAList();
 				} else {
@@ -212,29 +249,71 @@
 				}
 			},
 			async getAList() {
+				if (this.isEnd) {
+					this.$refs.uToast.show({
+						message: "暂无更多数据",
+						duration: 1000
+					})
+					return
+				}
 				uni.showLoading({
-					title: '数据加载中'
+					title: '加载中'
 				})
 				getAssistList({
 						type: 3,
-						pageNum: page,
-						size
+						pageNum: this.page,
+						size: this.size,
+						...this.searchForm
 					}).then(res => {
 						// this.tabList[this.pickTabIndex].list = res.list
 						// isEnd = this.tabList[this.pickTabIndex].list >= res.count
-						if (page === 1) {
+						if (this.page === 1) {
 							this.tabList[this.pickTabIndex].list = res.list
 						} else {
 							this.tabList[this.pickTabIndex].list.push(...res.list)
 						}
-						page += 1
-						isEnd = this.tabList[this.pickTabIndex].list.length >= res.count;
+						this.page += 1
+						this.isEnd = this.tabList[this.pickTabIndex].list.length >= res.count;
 						uni.hideLoading()
 					})
 					.catch(() => {
 						uni.hideLoading()
 					})
-			}
+			},
+			async getRuleList() {
+				let params = {
+					status: 1,
+					type: 1,
+					pageNum: 1,
+					size: -1
+				}
+				const res = await getRuleList(params)
+				this.formItems.find(item => item.prop === 'ruleId').props.localdata = res
+			},
+			clearSearch() {
+				this.searchForm.code = ''
+				this.doSearch()
+			},
+			doSearch() {
+				this.isEnd = false;
+				this.page = 1;
+				this.showTab = isObjectEmpty(this.searchForm)
+				this.getList();
+			},
+			showSearch() {
+				this.searchShow = true
+			},
+			confirmSearch(e) {
+				console.log(e);
+				let data = JSON.parse(JSON.stringify(e))
+				this.searchForm = {
+					...this.searchForm,
+					...data
+				}
+				console.log(this.searchForm);
+				this.doSearch()
+			},
+
 		}
 	}
 </script>
@@ -270,6 +349,54 @@
 		}
 	}
 
+	.badge-c {
+		position: relative;
+	}
+
+	/deep/.u-badge {
+		top: 0;
+		right: 0;
+		transform: translate(90%, 20%);
+	}
+
+	.search-box {
+		background-color: #fff;
+		display: flex;
+		width: 750rpx;
+		height: 88rpx;
+		padding: 16rpx 32rpx;
+		align-items: center;
+		gap: 16rpx;
+		justify-content: space-between;
+
+		/deep/.uni-section {
+			margin-top: 0px;
+		}
+
+		/deep/.uni-section-header {
+			padding: 0px;
+
+		}
+
+		.search_btn {
+			width: 120rpx;
+			height: 70rpx;
+			line-height: 70rpx;
+			padding: 0 24rpx;
+			background: $theme-color;
+			font-size: 32rpx;
+			color: #fff;
+			margin: 0;
+			margin-left: 26rpx;
+		}
+
+		.menu_icon {
+			width: 44rpx;
+			height: 44rpx;
+			margin-left: 14rpx;
+		}
+	}
+
 	// .tab-title {
 	// 	position: fixed;
 	// 	z-index: 99;

+ 1 - 1
pages/saleManage/businessOpportunity/components/drawer.vue

@@ -220,7 +220,7 @@
 			margin-top: 32rpx;
 			display: flex;
 			flex-wrap: wrap;
-			height: 80rpx;
+			// height: 80rpx;
 			border-radius: 12rpx;
 			border: 1px solid #cbcbcb;
 

+ 1 - 1
pages/saleManage/businessOpportunity/index.vue

@@ -73,7 +73,7 @@
 					type: '1',
 					pageUrl: '/pages/saleManage/businessOpportunity/add',
 					judge: [{
-						authorities: 'eom:businessopportunity:update',
+						authorities: '',
 					},{
 						key: 'approvalStatus',
 						value: [0, 3],

+ 43 - 25
pages/saleManage/components/selectContact.vue

@@ -3,7 +3,8 @@
 		<uni-nav-bar fixed="true" statusBar="true" left-icon="back" title="选择" @clickLeft="backAdd">
 			<!--右菜单-->
 			<template slot="right">
-				<u-button type="success" size="small" class="u-reset-button" @click="$refs.treePicker._show()" text="选择分类"></u-button>
+				<u-button type="success" size="small" class="u-reset-button" @click="$refs.treePicker._show()"
+					text="选择分类"></u-button>
 			</template>
 		</uni-nav-bar>
 		<view class="searchBox">
@@ -19,14 +20,15 @@
 					<label>
 						<view class="listBox">
 							<view class="listBox-sel">
-								<checkbox :value="item.code" color="#fff" :disabled="item.disabled" :checked="item.checked" />
+								<checkbox :value="item.code" color="#fff" :disabled="item.disabled"
+									:checked="item.checked" />
 							</view>
 							<view class="listBox-con">
 								<view class="listBox-top">
 									<view class="listBox-name">
 										{{ item.name }}
 									</view>
-								
+
 								</view>
 								<view class="listBox-bottom">
 									<!-- <view v-for="(itm, index) in tableHeader" :key="index">{{ itm.label }}:{{ item[itm.prop] }}</view> -->
@@ -47,20 +49,22 @@
 		<view class="footer">
 			<view class="bottom" v-if="this.isAll==1">
 				<checkbox v-if="!seletedAll" color="#fff" :checked="seletedAll" @tap="_seletedAll">全选</checkbox>
-				<checkbox class="select-all" color="#fff" v-else :checked="seletedAll" @tap="_seletedAll">取消全选</checkbox>
+				<checkbox class="select-all" color="#fff" v-else :checked="seletedAll" @tap="_seletedAll">取消全选
+				</checkbox>
 			</view>
 			<u-button type="success" size="small" class="u-reset-button" :disabled="!checkListLen" @click="jumpAdd">
 				<view class="selBtn">选择( {{ checkListLen }} )</view>
 			</u-button>
 		</view>
-		<ba-tree-picker ref="treePicker" key="verify" :multiple="false" @select-change="confirm" title="选择分类" :localdata="classificationList" valueKey="id" textKey="name" />
+		<ba-tree-picker ref="treePicker" key="verify" :multiple="false" @select-change="confirm" title="选择分类"
+			:localdata="classificationList" valueKey="id" textKey="name" />
 	</view>
 </template>
 
 <script>
 	import {
 		contactPage,
-	
+
 	} from '@/api/saleManage/contact/index.js'
 	import {
 		getTreeByPid
@@ -70,7 +74,7 @@
 		components: {
 			baTreePicker
 		},
-     
+
 		data() {
 			return {
 				page: 1,
@@ -83,29 +87,31 @@
 				listData: [], //列表数据
 				classificationList: [], //分类数据
 				seletedAll: false, //全选状态,
-				isAll:'',
-				isDemand:''
+				isAll: '',
+				isDemand: ''
 			}
 		},
 		//选择的列表长度
 		computed: {
-		
+
 			checkListLen() {
 
 				return this.listData.filter(el => el.checked).length
 			},
-		
+
 		},
-		onLoad({ isAll , type}) {
+		onLoad({
+			isAll,
+			type
+		}) {
 			this.isAll = isAll //1多选 2单选
 			// *** 新增 需求进来的话 要增加查询条件
-			if(type == '需求'){
+			if (type == '需求') {
 				this.isDemand = '1'
 			}
 			this.getClassify()
 		},
-		onShow() {
-		},
+		onShow() {},
 		methods: {
 			scrolltolower() {
 				if (this.isEnd) {
@@ -135,7 +141,7 @@
 					categoryId: this.categoryLevelId
 				}
 				// 需求新增参数 *** 
-				if(this.isDemand == '1'){
+				if (this.isDemand == '1') {
 					params.type = '1'
 					params.status = '1'
 				}
@@ -151,6 +157,12 @@
 			confirm([id]) {
 				this.categoryLevelId = id
 				this.page = 1
+
+
+				if (this.isAll === '2') {
+					this.listData.forEach(item => item.checked = false)
+				}
+
 				this.getList()
 			},
 			async getClassify() {
@@ -166,20 +178,20 @@
 			},
 			//勾选
 			selectVal(e, val, index) {
-				
+
 				this.$set(this.listData[index], 'checked', !this.listData[index].checked)
 
-				if(this.isAll!=1){
-					this.listData.forEach((item,i)=>{
-						if(item.id!=val.id){
+				if (this.isAll != 1) {
+					this.listData.forEach((item, i) => {
+						if (item.id != val.id) {
 							this.$set(this.listData[i], 'checked', false)
 						}
 					})
-				}else{
-					
+				} else {
+
 					this.seletedAll = !this.listData.some(item => !item.checked)
 				}
-				
+
 			},
 			//全选按钮
 			_seletedAll() {
@@ -221,10 +233,12 @@
 		height: 100vh;
 		display: flex;
 		flex-direction: column;
+
 		.wrapper {
 			flex: 1;
 			overflow: hidden;
 		}
+
 		.searchBox {
 			padding: 10rpx 0;
 			box-sizing: border-box;
@@ -256,6 +270,7 @@
 				outline: none;
 				border: none;
 				width: 260rpx;
+
 				.icon-sousuo {
 					font-size: 22px;
 				}
@@ -318,6 +333,7 @@
 
 		.listContent {
 			height: 100% !important;
+
 			.listBox {
 				display: flex;
 				// height: 180rpx;
@@ -363,7 +379,8 @@
 						justify-content: space-between;
 						font-size: $uni-font-size-sm;
 						flex-wrap: wrap;
-						> view {
+
+						>view {
 							width: 50%;
 							overflow: hidden;
 							white-space: nowrap;
@@ -372,6 +389,7 @@
 					}
 				}
 			}
+
 			.noDate {
 				height: 100%;
 			}
@@ -403,4 +421,4 @@
 			}
 		}
 	}
-</style>
+</style>

+ 1 - 0
pages/salesServiceManagement/demandList/add.vue

@@ -144,6 +144,7 @@
 				this.$set(this.form, 'orderId', data.orderId);
 				console.log(data, 'data');
 				let list = JSON.parse(JSON.stringify(data.tableList));
+				console.log(list);
 				// 如果计量数量没有的话默认是 1
 				list.map(
 					(el) =>

+ 62 - 15
pages/salesServiceManagement/demandList/components/AfterSales.vue

@@ -1,6 +1,8 @@
 <template>
 	<view class="after_sales">
-		<view class="sales_info" v-if="tableList.length > 0">
+		<block v-for="item in tableList" :key="item.id">
+
+			<!-- 	<view class="sales_info" v-if="tableList.length > 0">
 			<view>名称:{{ fieldRow('categoryName') }}</view>
 			<view>类型:{{ fieldRow('productCategoryName') }}</view>
 			<view>编码:{{ fieldRow('categoryCode') }}</view>
@@ -17,7 +19,35 @@
 				<u-button v-if="!isReport" @click="del" :plain="true" :hairline="true" size='mini' type="default"
 					class="delete" text="删除"></u-button>
 			</view>
-		</view>
+		</view> -->
+
+			<view class="sales_info">
+				<view>名称:{{ item.categoryName }}</view>
+				<view>类型:{{ item.productCategoryName }}</view>
+				<view>编码:{{ item.categoryCode }}</view>
+				<view>发货条码:{{ item.barcodes }}</view>
+				<view>发货时间:{{ item.shipmentDate }}</view>
+				<view>质保有效期:{{ item.guaranteePeriodDeadline }}</view>
+				<view>计量数量:{{ item.measureQuantity }}</view>
+				<view class="action" v-if="type != 'view'">
+					<text class="text">
+						操作:
+					</text>
+					<!-- <u-button @click="goProblem('add','',item.id)" :plain="true" :hairline="true" size='mini'
+						type="default" text="添加故障"></u-button> -->
+					<u-button @click="addFault('add','',item.id)" :plain="true" :hairline="true" size='mini'
+						type="default" text="添加故障"></u-button>
+					<u-button v-if="!isReport" @click="del(item.id)" :plain="true" :hairline="true" size='mini'
+						type="default" class="delete" text="删除"></u-button>
+				</view>
+
+
+				<!-- <block v-for="item"></block> -->
+			</view>
+
+
+		</block>
+
 		<div class="wapper">
 			<view v-for="(item, index) in faultDetails" :key="index" class="view_box" style="position: relative;">
 				<myCard @edit="goProblem('edit',index,item)" @del="delProblem(index)" :item="item" :index="index+1"
@@ -69,10 +99,14 @@
 		},
 		computed: {
 			faultDetails() {
+				let arr = []
+				console.log(this.tableList);
 				if (this.tableList.length > 0) {
-					return this.tableList[0].faultDetails
+					this.tableList.forEach(item =>
+						arr.push(...item.faultDetails))
 				}
-				return []
+				console.log(arr);
+				return arr
 			},
 			fieldRow() {
 				return (field) => {
@@ -105,6 +139,7 @@
 		},
 		data() {
 			return {
+				dataId: '',
 				typeOptions: [{
 						text: '维修',
 						value: '1'
@@ -181,20 +216,22 @@
 				data,
 				index
 			}) => {
-				console.log(data, 'datadatadatadatadatadata')
-				if (type == 'add' || type == 'report') {
-					if (this.isReport) {
-						data.customize = '5'
-					}
-					this.tableList[0].faultDetails.push(data)
-				} else {
-					this.$set(this.tableList[0].faultDetails, index, data)
+				console.log(type);
+				console.log(this.tableList);
+				console.log(data);
+
+				if (type === 'add') {
+					this.tableList.find(item => item.id === this.dataId).faultDetails.push(data)
 				}
+
+
 			})
 
 		},
 		methods: {
-			del() {
+			del(id) {
+				console.log(id);
+				console.log(this.tableList);
 				uni.showModal({
 					title: '确认删除',
 					content: '确定要删除这条售后对象吗?',
@@ -202,7 +239,7 @@
 					confirmColor: '#FF4D4F',
 					success: (res) => {
 						if (res.confirm) {
-							this.tableList = [];
+							this.tableList = this.tableList.filter(item => item.id !== id);
 						} else if (res.cancel) {
 							// 用户点击了取消按钮
 							console.log('用户取消删除');
@@ -242,7 +279,16 @@
 					url: `/pages/salesServiceManagement/demandList/components/faultAdd?type=${type}&index=${index}&data=${data}&str=${str}&arr=${encodeURIComponent(arr)}`
 				})
 			},
-			addFault() {
+			addFault(type, index, id) {
+				this.dataId = id
+				console.log(id);
+				let str = this.type == 'report' ? 'report' : '';
+				// let resD = JSON.parse(JSON.stringify(obj));
+
+				uni.navigateTo({
+					url: `/pages/salesServiceManagement/demandList/components/faultAdd?type=${type}&str=${str}`
+				})
+
 
 			},
 			// 返回列表数据
@@ -263,6 +309,7 @@
 <style lang="scss" scoped>
 	.after_sales {
 		height: calc(100vh - 246rpx);
+
 		.sales_info {
 			padding: 8px 16px;
 			font-size: 13px;

+ 5 - 5
pages/salesServiceManagement/demandList/components/Invoice.vue

@@ -121,7 +121,7 @@ export default {
       };
     },
     checkListLen() {
-      return this.detailsData.id ? 1 : 0;
+      return this.detailsData.length
     },
   },
   data() {
@@ -131,7 +131,7 @@ export default {
       page: 1,
       size: 10,
       dataList: [],
-      detailsData: {},
+      detailsData: [],
     };
   },
   onLoad({ contactId }) {
@@ -186,11 +186,11 @@ export default {
       } else {
         this.$refs.itemRef.resetTable();
       }
-      this.detailsData = {};
+      this.detailsData = [];
     },
     // 选择
     jumpAdd() {
-      if (!this.detailsData.id) {
+      if (!this.detailsData.length) {
         this.$refs.uToast.show({
           type: "warning",
           message: "请选择一条物品明细数据",
@@ -201,7 +201,7 @@ export default {
       let data = {
         orderCode: obj.docNo,
         orderId: obj.id,
-        tableList: [this.detailsData],
+        tableList: this.detailsData,
       };
       uni.$emit("goosData", data);
       uni.navigateBack();

+ 2 - 2
pages/salesServiceManagement/demandList/components/contactList.vue

@@ -200,8 +200,8 @@
 		padding-bottom: 16rpx;
 
 		.btn {
-			width: 80rpx;
-			height: 48rpx;
+			// width: 80rpx;
+			// height: 48rpx;
 			line-height: 48rpx;
 			text-align: center;
 			background: #1890ff;

+ 22 - 9
pages/salesServiceManagement/demandList/components/itemSelect.vue

@@ -50,11 +50,13 @@
 		data() {
 			return {
 				listData: [],
+				sectionList: []
 			}
 		},
 		onLoad({}) {},
 		methods: {
 			async getData(row) {
+				this.sectionList = [];
 				this.listData = [];
 				let params = {
 					code: 'after_sales_product_list_source'
@@ -66,7 +68,8 @@
 					this._getInfo(row.docNo);
 				}
 			},
-			resetTable(){
+			resetTable() {
+				this.sectionList = [];
 				this.listData = [];
 			},
 			async _getInfo(sourceBizNo) {
@@ -89,7 +92,7 @@
 						return {
 							...productItem,
 							outInDetailRecordRequestList: productItem.outInDetailRecordRequestList.map((
-							packingItem) => {
+								packingItem) => {
 								return {
 									...packingItem,
 									categoryName: productItem.categoryName,
@@ -132,14 +135,24 @@
 				this.listData = list;
 			},
 			async selectVal(e, val, index) {
+				// 添加进选中的数组
+				if (e.detail.value.length && e.detail.value[0] === val.id) {
+					this.sectionList.push(val)
+				}
+				if (!e.detail.value.length) {
+					this.sectionList = this.sectionList.filter(item => item.id !== val.id)
+				}
+				// if()
+				console.log(this.sectionList);
 				this.$set(this.listData[index], 'checked', !this.listData[index].checked)
-				this.listData.forEach((item, i) => {
-					if (item.id != val.id) {
-						this.$set(this.listData[i], 'checked', false)
-					}
-				})
-				let data = val.checked ? val : {};
-				this.$emit('getDetails', data);
+				// this.listData.forEach((item, i) => {
+				// 	if (item.id != val.id) {
+				// 		this.$set(this.listData[i], 'checked', false)
+				// 	}
+				// })
+				// this.sectionList.push(val)
+				// let data = val.checked ? val : {};
+				this.$emit('getDetails', this.sectionList);
 			},
 			getTime(createTime) {
 				let date = new Date(createTime);

+ 130 - 19
pages/salesServiceManagement/demandList/index.vue

@@ -10,7 +10,7 @@
 				</uni-easyinput>
 			</uni-section>
 			<button class="search_btn" @click="doSearch">搜索</button>
-			<image class="menu_icon" @click="handleSearch" src="~@/static/pda/menu.svg"></image>
+			<image class="menu_icon" @click="showSearch" src="~@/static/pda/menu.svg"></image>
 		</view>
 		<view class="wrapper">
 			<u-list @scrolltolower="scrolltolower" class="listContent">
@@ -56,28 +56,121 @@
 				</form>
 			</view>
 		</uni-popup>
-		<!-- <Screen ref="screen" @succeed="doSearch" /> -->
+
 		<u-toast ref="uToast"></u-toast>
 
+		<MySearch :show.sync="searchShow" :formItems="formItems" @search="confirmSearch" ref="mySearchRef">
+		</MySearch>
+
 	</view>
 </template>
 
 <script>
+	import {
+		getByCode
+	} from '@/api/pda/common.js'
+
+	import {
+		initDict
+	} from '@/utils/utils.js'
+
+
 	import {
 		getTableList,
 		revokeSalesDemand,
 		deleteSalesDemand
 	} from '@/api/salesServiceManagement/demandList/index.js'
 	import myCard from '@/pages/saleManage/components/myCard.vue'
-	import Screen from './screen.vue'
+
+
 	export default {
 		components: {
 			myCard,
-			Screen
 		},
-
+		watch: {
+			fault_level_arr: {
+				handler(val) {
+					console.log(val);
+					this.formItems.find(item => item.prop === 'faultLevel').props.localdata = val
+				},
+				deep: true
+			}
+		},
 		data() {
 			return {
+				searchForm: {},
+				emptyShow: false,
+				searchShow: false,
+				fault_level_obj: {},
+				fault_level_arr: [],
+				formItems: [{
+						label: '客户名称:',
+						prop: 'contactName',
+						component: 'MyInput',
+						props: {
+							placeholder: '请输入内容',
+						}
+					},
+					{
+						label: '编码:',
+						prop: 'code',
+						component: 'MyInput',
+						props: {
+							placeholder: '请输入内容',
+						}
+					},
+					{
+						label: '客户编码:',
+						prop: 'contactCode',
+						component: 'MyInput',
+						props: {
+							placeholder: '请输入内容',
+						}
+					},
+					{
+						label: '创建人:',
+						prop: 'createUserName',
+						component: 'MyInput',
+						props: {
+							placeholder: '请输入内容',
+						}
+					},
+
+					{
+						label: '故障等级:',
+						prop: 'faultLevel',
+						component: 'MySelect',
+						props: {
+							localdata: [],
+							dataKey: 'label',
+							dataValue: 'value'
+						}
+					},
+
+					{
+						label: '状态:',
+						prop: 'demandStatus',
+						component: 'MySelect',
+						props: {
+							localdata: [{
+								label: '待提交',
+								value: 0
+							}, {
+								label: '已提交',
+								value: 1
+							}, {
+								label: '已关闭',
+								value: 3
+							}, {
+								label: '已撤回',
+								value: 4
+							}],
+							dataKey: 'label',
+							dataValue: 'value',
+						}
+					},
+				],
+
 				tableList: [],
 				searchVal: '',
 				page: 1,
@@ -169,11 +262,8 @@
 					}, {
 						label: '故障等级:',
 						prop: 'faultLevel',
-						formatter(row) {
-							let cellValue = row.faultLevel;
-							return cellValue == 1 ?
-								'紧急' : cellValue == 2 ? '一般' : ''
-
+						formatter: (row) => {
+							return this.fault_level_obj && this.fault_level_obj[row.faultLevel] || ''
 						}
 					}],
 					[{
@@ -212,23 +302,29 @@
 				]
 			}
 		},
-		computed: {
-
-		},
 
 		onReachBottom() {
 			console.log('123');
 			this.getList()
 		},
-
+		onLoad() {
+			this.getDict()
+		},
 		onShow() {
 			this.doSearch();
 		},
 
+
 		methods: {
-			handleSearch() {
-				this.$refs.screen.open();
+			async getDict() {
+				let res = await getByCode('fault_level')
+				let [arr, obj] = initDict(res)
+				this.fault_level_obj = obj
+				this.fault_level_arr = arr
+				console.log(this.fault_level_obj);
+				// console.log(arr, obj);
 			},
+
 			doSearch() {
 				this.isEnd = false
 				this.page = 1
@@ -249,12 +345,15 @@
 				let data = {
 					pageNum: this.page,
 					size: this.size,
-					type: 1,
-					keyWord: this.searchVal
+					keyWord: this.searchVal,
+					...this.searchForm
 				}
 				getTableList(data).then(res => {
 					if (this.page === 1) {
 						this.tableList = res.list
+						if (this.tableList.length === 0) {
+							this.emptyShow = true
+						}
 					} else {
 						this.tableList.push(...res.list)
 					}
@@ -345,7 +444,19 @@
 			clearSearch() {
 				this.searchVal = ''
 				this.doSearch()
-			}
+			},
+			showSearch() {
+				this.searchShow = true
+			},
+			confirmSearch(e) {
+				console.log(e);
+				let data = JSON.parse(JSON.stringify(e))
+				this.searchForm = data
+				this.doSearch()
+			},
+
+
+
 		}
 	}
 </script>

+ 0 - 1
pages/salesServiceManagement/recycle/index.vue

@@ -102,7 +102,6 @@
 							type: 'daterange',
 						}
 					}
-
 				],
 
 

+ 213 - 2
pages/salesServiceManagement/workOrder/components/accessoryAdd.vue

@@ -412,6 +412,217 @@
 </script>
 
 <style scoped lang="scss">
-	@import url('@/pages/salesServiceManagement/demandList/components/invoice.scss');
-	@import './accessory.scss';
+	// @import url('@/pages/salesServiceManagement/demandList/components/invoice.scss');
+	
+	
+	
+	.listContent {
+		height: 100% !important;
+	
+		.listBox {
+			display: flex;
+			// height: 180rpx;
+			padding: 20rpx 0;
+			border-bottom: 2rpx solid #e5e5e5;
+	
+			.listBox-sel {
+				height: 90rpx;
+				width: 80rpx;
+				// line-height: 90rpx;
+				text-align: center;
+	
+				checkbox {
+					transform: scale(1.2);
+				}
+			}
+		}
+		
+		.listBox-con {
+			width: 100%;
+			// display: flex;
+			// flex-wrap: wrap;
+			// justify-content: space-between;
+			align-items: center;
+			padding: 0 18rpx 0 0;
+		
+			.listBox-top {
+				width: 100%;
+				display: flex;
+				justify-content: space-between;
+				padding-bottom: 10rpx;
+		
+				.listBox-name,
+				.listBox-code {
+					display: inline-block;
+					font-size: $uni-font-size-sm;
+					font-weight: bold;
+				}
+			}
+		
+			.listBox-bottom {
+				width: 100%;
+				display: flex;
+				justify-content: space-between;
+				font-size: $uni-font-size-sm;
+				flex-wrap: wrap;
+		
+				>view {
+					width: 100%;
+					overflow: hidden;
+					white-space: nowrap;
+					text-overflow: ellipsis;
+				}
+		
+				.half {
+					width: 50%;
+				}
+				
+				.label-s{
+					width: 50%;
+					display: inline-block !important;
+				}
+			}
+		}
+	
+		.noDate {
+			height: 100%;
+		}
+	}
+	
+	
+	
+	.mainBox {
+			height: 100vh;
+			display: flex;
+			flex-direction: column;
+	
+			.wrapper {
+				// flex: 1;
+				height: calc(100vh - 250rpx);
+				overflow: hidden;
+			}
+	
+			//底部按钮
+			.footer {
+				height: 45px;
+				position: relative;
+				display: flex;
+				justify-content: space-between;
+				align-items: center;
+				bottom: 0;
+				width: 100%;
+				height: 50px;
+				border-top: 1px solid #eeecec;
+				background-color: #ffffff;
+				z-index: 999;
+	
+				.bottom {
+					margin-left: 10rpx;
+				}
+	
+				.u-reset-button {
+					position: absolute;
+					right: 10rpx;
+					top: 20rpx;
+					width: 150rpx;
+				}
+			}
+	
+			.top-wrapper {
+				background-color: #fff;
+				display: flex;
+				width: 750rpx;
+				height: 88rpx;
+				padding: 16rpx 32rpx;
+				align-items: center;
+				gap: 16rpx;
+	
+				/deep/.uni-section {
+					margin-top: 0px;
+				}
+	
+				/deep/.uni-section-header {
+					padding: 0px;
+	
+				}
+	
+				.search_btn {
+					width: 120rpx;
+					height: 70rpx;
+					line-height: 70rpx;
+					padding: 0 24rpx;
+					background: $theme-color;
+					font-size: 32rpx;
+					color: #fff;
+					margin: 0;
+					margin-left: 26rpx;
+				}
+	
+				.menu_icon {
+					width: 44rpx;
+					height: 44rpx;
+					margin-left: 14rpx;
+				}
+			}
+	
+			.dimension {
+				width: calc(100% - 270rpx);
+			}
+	
+			.nav_box {
+				padding: 6rpx 32rpx;
+				position: relative;
+	
+				.btn {
+					width: 68rpx;
+					text-align: center;
+					background: #1890ff;
+					color: #fff;
+					border: 2rpx solid;
+					border-color: #1890ff;
+					height: 40rpx;
+					line-height: 40rpx;
+					font-size: 26rpx;
+					margin-right: 10rpx;
+				}
+	
+				.remove {
+					color: #606266;
+					border-color: #dddddd;
+					background: #fff;
+				}
+	
+				.nav_item {
+					font-size: 28rpx;
+					font-weight: 400;
+					color: $theme-color;
+					background: #F0F8F2;
+					margin-right: 16rpx;
+					padding: 4rpx 16rpx;
+					border-radius: 8rpx;
+					border: 2rpx solid #ACD4B5;
+	
+				}
+	
+				.menu_box {
+					position: absolute;
+					right: 20rpx;
+					top: 10rpx;
+	
+					.menu_icon {
+						width: 44rpx;
+						height: 44rpx;
+					}
+	
+				}
+	
+				.active {
+					background: $theme-color;
+					border: 2rpx solid $theme-color;
+					color: #FFF;
+				}
+			}
+		}
+	
+	// @import './accessory.scss';
 </style>

+ 3 - 2
pages/salesServiceManagement/workOrder/components/forWork/transfer.vue

@@ -63,7 +63,7 @@
 		},
 		data() {
 			return {
-				selectedData: ['1'],
+				selectedData: [''],
 				classificationList: [],
 				searchVal: '',
 				isEnd: false,
@@ -168,7 +168,8 @@
 					parentIdField: 'parentId'
 				});
 				this.classificationList = treeList;
-				this.confirm(treeList[0].id);
+				this.confirm('');
+				// this.confirm(treeList[0].id);
 			},
 			async save() {
 				if (!this.checkData.id) {

+ 13 - 12
pages/salesServiceManagement/workOrder/components/planInfo.vue

@@ -2,30 +2,30 @@
 	<u-cell-group>
 		<u-cell title="需求编码" arrow-direction="down">
 			<view slot="value" style="display: flex;align-items: center;width: 100%;">
-				<u--input readonly style="flex:1" border="surround" v-model="planForm.code">
+				<u--input readonly style="flex:1" border="surround" v-model="form.code">
 				</u--input>
 			</view>
 		</u-cell>
 		<u-cell title="名称" arrow-direction="down">
 			<view slot="value" style="display: flex;align-items: center;width: 100%;">
-				<u--input placeholder="请输入" readonly style="flex:1" border="surround" v-model="planForm.name">
+				<u--input placeholder="请输入" readonly style="flex:1" border="surround" v-model="form.name">
 				</u--input>
 			</view>
 		</u-cell>
 		<u-cell title="自动派单" arrow-direction="down">
-			<!-- 		<uni-data-picker  v-model="planForm.isSyncBill" slot="value" placeholder="请选择"
+			<!-- 		<uni-data-picker  v-model="form.isSyncBill" slot="value" placeholder="请选择"
 				:localdata="isSyncBillist" @change="dispatchOnchange">
 			</uni-data-picker> -->
 			<view slot="value" style="display: flex;align-items: center;width: 100%;">
-				<u--input placeholder="请输入" readonly style="flex:1" border="surround" v-model="planForm.isSyncBill">
+				<u--input placeholder="请输入" readonly style="flex:1" border="surround" v-model="form.isSyncBill">
 				</u--input>
 			</view>
 		</u-cell>
 		<u-cell title="预计售后时长" arrow-direction="down">
 			<view slot="value" style="display: flex;align-items: center;width: 100%;">
-				<u--input style="flex:1" readonly border="surround" v-model="planForm.duration">
+				<u--input style="flex:1" readonly border="surround" v-model="form.duration">
 					<template #suffix>
-						<uni-data-picker class="time_select" readonly v-model="planForm.durationUnit" slot="value"
+						<uni-data-picker class="time_select" readonly v-model="form.durationUnit" slot="value"
 							placeholder="请选择" :localdata="durationList">
 						</uni-data-picker>
 					</template>
@@ -34,28 +34,28 @@
 		</u-cell>
 		<u-cell title="部门" arrow-direction="down">
 			<view slot="value" style="display: flex;align-items: center;width: 100%;">
-				<u--input style="flex:1" readonly placeholder="请选择" border="surround" v-model="planForm.executeGroupName">
+				<u--input style="flex:1" readonly placeholder="请选择" border="surround" v-model="form.executeGroupName">
 				</u--input>
 			</view>
 		</u-cell>
 		<u-cell title="执行人" arrow-direction="down">
 			<view slot="value" style="display: flex;align-items: center;width: 100%;">
-				<u--input style="flex:1" readonly placeholder="请选择" border="surround" v-model="planForm.executeUserName">
+				<u--input style="flex:1" readonly placeholder="请选择" border="surround" v-model="form.executeUserName">
 				</u--input>
 			</view>
 		</u-cell>
 		<u-cell title="紧急程度" arrow-direction="down"> 
 		<view slot="value" style="display: flex;align-items: center;width: 100%;">
-			<u--input style="flex:1" readonly placeholder="请选择" border="surround" v-model="planForm.urgent">
+			<u--input style="flex:1" readonly placeholder="请选择" border="surround" v-model="form.urgent">
 			</u--input>
 		</view>
-			<!-- 			<uni-data-picker  v-model="planForm.urgent" slot="value" placeholder="请选择"
+			<!-- 			<uni-data-picker  v-model="form.urgent" slot="value" placeholder="请选择"
 					:localdata="urgentList" @change="urgentOnchange">
 				</uni-data-picker> -->
 		</u-cell>
 		<u-cell title="备注" arrow-direction="down">
 			<view slot="value" style="display: flex;align-items: center;width: 100%;">
-				<u--textarea disabled style="flex:1" border="surround" v-model="planForm.remark">
+				<u--textarea disabled style="flex:1" border="surround" v-model="form.remark">
 				</u--textarea>
 			</view>
 		</u-cell>
@@ -73,7 +73,7 @@
 		watch:{
 			planForm:{
 				handler(val){
-					this.planForm = val;
+					this.form = val;
 				},
 				immediate:true,
 				deep:true,
@@ -81,6 +81,7 @@
 		},
 		data() {
 			return {
+				form:{},
 				durationList: [{
 						value: '1',
 						text: '分钟'

+ 51 - 21
pages/salesServiceManagement/workOrder/index.vue

@@ -38,12 +38,20 @@
 		<CheckAndAccept ref="acceptRef" @getList='doSearch' />
 		<Evaluate ref="evaluateRef" @getList='doSearch' />
 		<u-toast ref="uToast"></u-toast>
-		<MySearch :show.sync="searchShow" :formItems="formItems" @search="confirmSearch">
-		</MySearch>
+		<MySearch :show.sync="searchShow" :formItems="formItems" @search="confirmSearch"></MySearch>
 	</view>
 </template>
 
 <script>
+	import {
+		getByCode
+	} from '@/api/pda/common.js'
+
+	import {
+		initDict
+	} from '@/utils/utils.js'
+
+
 	import {
 		getSalesWorkOrder,
 		receiveSalesWorkOrder
@@ -51,18 +59,31 @@
 	import myCard from '@/pages/saleManage/components/myCard.vue'
 	import CheckAndAccept from './components/forWork/checkAndAccept.vue'
 	import Evaluate from './components/forWork/evaluate.vue'
+
 	export default {
 		components: {
 			myCard,
 			CheckAndAccept,
-			Evaluate
+			Evaluate,
 		},
+		watch: {
+			fault_level_arr: {
+				handler(val) {
+					console.log(val);
+					this.formItems.find(item => item.prop === 'faultLevel').props.localdata = val
+				},
+				deep: true
+			}
+		},
+
 
 		data() {
 			return {
 				searchForm: {},
 				emptyShow: false,
 				searchShow: false,
+				fault_level_obj: {},
+				fault_level_arr: [],
 				formItems: [{
 						label: '工单编号:',
 						prop: 'code',
@@ -87,20 +108,16 @@
 							placeholder: '请输入内容',
 						}
 					},
-					// {
-					// 	label: '故障等级:',
-					// 	prop: 'faultLevel',
-					// 	component: 'MyInput',
-					// 	props: {
-					// 		placeholder: '请选择',
-					// 		events:{
-					// 			focus:(e)=>{
-					// 				console.log('123');
-					// 				console.log(e);
-					// 			}
-					// 		}
-					// 	}
-					// },
+					{
+						label: '故障等级:',
+						prop: 'faultLevel',
+						component: 'MySelect',
+						props: {
+							localdata: [],
+							dataKey: 'label',
+							dataValue: 'value'
+						}
+					},
 					{
 						label: '计划单号:',
 						prop: 'planCode',
@@ -218,7 +235,11 @@
 					}],
 					[{
 						label: '故障等级:',
-						prop: 'faultLevel'
+						prop: 'faultLevel',
+						formatter: (row) => {
+							console.log(this.fault_level_obj);
+							return this.fault_level_obj[row.faultLevel]
+						}
 					}, {
 						label: '客户名称:',
 						prop: 'contactName',
@@ -378,9 +399,8 @@
 				],
 			}
 		},
-		computed: {},
 		onLoad() {
-
+			this.getDict()
 		},
 		onShow() {
 			this.doSearch();
@@ -392,6 +412,15 @@
 			this.getList()
 		},
 		methods: {
+			async getDict() {
+				let res = await getByCode('fault_level')
+				let [arr, obj] = initDict(res)
+				this.fault_level_obj = obj
+				this.fault_level_arr = arr
+				console.log(arr, obj);
+			},
+
+
 			changeChartsTab(value) {
 				this.pickTabIndex = value;
 				this.doSearch();
@@ -502,7 +531,8 @@
 				let data = JSON.parse(JSON.stringify(e))
 				this.searchForm = data
 				this.doSearch()
-			}
+			},
+
 		}
 	}
 </script>

+ 203 - 194
pages/systemSettings/index.vue

@@ -1,209 +1,218 @@
 <template>
-  <view class="">
-    <uni-nav-bar
-      fixed="true"
-      statusBar="true"
-      left-icon="back"
-      @clickLeft="back"
-      title="系统设置"
-    >
-    </uni-nav-bar>
-    <u-cell-group>
-      <picker @change="handlePicker" :range="['是', '否']">
-        <u-cell title="记住密码" :isLink="true" arrow-direction="right">
-          <text slot="value" class="u-slot-value">{{
+	<view class="">
+		<uni-nav-bar fixed="true" statusBar="true" left-icon="back" @clickLeft="back" title="系统设置">
+		</uni-nav-bar>
+		<u-cell-group>
+			<picker @change="handlePicker" :range="['是', '否']">
+				<u-cell title="记住密码" :isLink="true" arrow-direction="right">
+					<text slot="value" class="u-slot-value">{{
             isMemo ? '是' : '否'
           }}</text>
-        </u-cell>
-      </picker>
-      <u-cell
-        title="服务器地址"
-        :isLink="true"
-        arrow-direction="right"
-        @click="handleServerSettings"
-      >
-        <text slot="value" class="u-slot-value" :key="apiAdress">{{
+				</u-cell>
+			</picker>
+			<u-cell title="服务器地址" :isLink="true" arrow-direction="right" @click="handleServerSettings">
+				<text slot="value" class="u-slot-value" :key="apiAdress">{{
           apiAdress
         }}</text>
-      </u-cell>
-      <u-cell
-        :title="'当前版本 ' + currentVersion"
-        :isLink="true"
-        arrow-direction="right"
-      >
-        <text slot="value" class="u-slot-value" @click="handlUpdate">{{
+			</u-cell>
+			<!-- 	<u-cell :title="'当前版本 ' + currentVersion" :isLink="true" arrow-direction="right">
+				<text slot="value" class="u-slot-value" @click="handlUpdate">{{
           Nversion == currentVersion ? '' : `发现新版本(${this.Nversion})`
         }}</text>
-      </u-cell>
-    </u-cell-group>
-    <view class="flex-buttom">
-      <view class="btn" @click="loginOut"> 退出登录 </view>
-      <view class="copyright">
-        <view>版权所有© 2019-2021中赢合力</view>
-        <view>湘ICP备20015098号</view>
-      </view>
-    </view>
-    <updatePop
-      ref="updatePop"
-      :versionNum="versionNum"
-      :downloadUrl="downloadUrl"
-      :sizes="VersionInfo.fileSize"
-    ></updatePop>
-    <ServerSetting ref="serverSettingRef" @setServerStatus="setServerStatus" />
-  </view>
+			</u-cell> -->
+		</u-cell-group>
+		<view class="flex-buttom">
+			<view class="btn" @click="loginOut"> 退出登录 </view>
+			<view class="copyright">
+				<view>版权所有© 2019-2021中赢合力</view>
+				<view>湘ICP备20015098号</view>
+			</view>
+		</view>
+		<updatePop ref="updatePop" :versionNum="versionNum" :downloadUrl="downloadUrl" :sizes="VersionInfo.fileSize">
+		</updatePop>
+		<ServerSetting ref="serverSettingRef" @setServerStatus="setServerStatus" />
+	</view>
 </template>
 
 <script>
-import { postJ, get } from '@/utils/api.js'
-import updatePop from './components/updatePop.vue'
-import { setMemo, isMemo, removeMemo } from '@/utils/passwordMemo.js'
-import ServerSetting from '@/components/ServerSetting/index'
-export default {
-  components: {
-    updatePop,
-    ServerSetting
-  },
-  data () {
-    return {
-      show: false,
-      versionNum: '',
-      downloadUrl: '',
-      currentVersion: '',
-      isMemo: isMemo(),
-      apiAdress: '',
-      Nversion: '',
-      VersionInfo: ''
-    }
-  },
-  created () {
-    const apiInfo = uni.getStorageSync('apiInfo')
-
-    this.apiAdress =
-      apiInfo.hostname &&
-      `${apiInfo.protocal || ''}${apiInfo.hostname || ''}:${apiInfo.port || ''}`
-
-    this.currentVersion = plus?.runtime.version
-    this.getbb()
-  },
-  methods: {
-    handlePicker (e) {
-      this.isMemo = e.detail.value === 0
-      if (e.detail.value === 0) {
-        setMemo()
-      } else {
-        removeMemo()
-      }
-    },
-    setServerStatus (val) {
-      if (val) {
-        const apiInfo = uni.getStorageSync('apiInfo')
-
-        this.apiAdress = `${apiInfo.protocal || ''}${apiInfo.hostname || ''}:${
+	import {
+		postJ,
+		get
+	} from '@/utils/api.js'
+	import updatePop from './components/updatePop.vue'
+	import {
+		setMemo,
+		isMemo,
+		removeMemo
+	} from '@/utils/passwordMemo.js'
+	import ServerSetting from '@/components/ServerSetting/index'
+	export default {
+		components: {
+			updatePop,
+			ServerSetting
+		},
+		data() {
+			return {
+				show: false,
+				versionNum: '',
+				downloadUrl: '',
+				currentVersion: '',
+				isMemo: isMemo(),
+				apiAdress: '',
+				Nversion: '',
+				VersionInfo: ''
+			}
+		},
+		onLoad() {
+			const apiInfo = uni.getStorageSync('apiInfo')
+
+			this.apiAdress =
+				apiInfo.hostname &&
+				`${apiInfo.protocal || ''}${apiInfo.hostname || ''}:${apiInfo.port || ''}`
+
+
+
+			this.currentVersion = plus?.runtime.version
+			// this.getbb()
+		},
+		created() {
+
+		},
+		methods: {
+			handlePicker(e) {
+				this.isMemo = e.detail.value === 0
+				if (e.detail.value === 0) {
+					setMemo()
+				} else {
+					removeMemo()
+				}
+			},
+			setServerStatus(val) {
+				if (val) {
+					const apiInfo = uni.getStorageSync('apiInfo')
+
+					this.apiAdress = `${apiInfo.protocal || ''}${apiInfo.hostname || ''}:${
           apiInfo.port || ''
         }`
-      }
-    },
-    handleServerSettings () {
-      this.$refs.serverSettingRef.open()
-    },
-    loginOut () {
-
-      uni.showModal({
-        title: '提示',
-        content: '确认退出登录',
-        success: res => {
-          console.log(res,res.confirm,'-----确认退出登录');
-          if (res.confirm) {
-          console.log('-----确认退出登录9999999');
-		  uni.clearStorage()
-          try {
-            postJ(this.apiUrl + '/main/user/logout')
-              .then(res => {
-
-                uni.removeStorageSync('token')
-                uni.removeStorageSync('userInfo')
-				uni.removeStorageSync('treeList')
-			
-				
-                uni.reLaunch({
-                  url: '/pages/login/login'
-                })
-              })
-              .catch(err => {
-                uni.showToast({
-                  title: '退出失败',
-                  icon: 'none'
-                })
-              })
-            
-          } catch (error) {
-            console.log(error,'error----')
-            uni.reLaunch({
-                  url: '/pages/login/login'
-                })
-          }
-          } else if (res.cancel) {
-            console.log('用户点击取消')
-          }
-        }
-      })
-    },
-    handlUpdate () {
-      get(this.apiUrl + '/versioning/getLatestData').then(res => {
-        if (res.success) {
-          const currentVersion = this.currentVersion
-          const Nversion = res.data.version
-          this.VersionInfo = res.data
-          if (currentVersion !== Nversion) {
-            this.$refs.updatePop.open()
-            this.versionNum = Nversion
-            this.downloadUrl = this.apiUrl + res.data.path
-          } else {
-            uni.showToast({
-              title: '暂无新版本',
-              icon: 'none'
-            })
-          }
-        }
-      })
-    },
-    getbb () {
-      get(this.apiUrl + '/versioning/getLatestData').then(res => {
-        if (res.success) {
-          this.Nversion = res.data.version
-        }
-      })
-    }
-  }
-}
+				}
+			},
+			handleServerSettings() {
+				this.$refs.serverSettingRef.open()
+			},
+			loginOut() {
+
+				uni.showModal({
+					title: '提示',
+					content: '确认退出登录',
+					success: res => {
+						console.log(res, res.confirm, '-----确认退出登录');
+						if (res.confirm) {
+							console.log('-----确认退出登录9999999');
+							uni.clearStorage()
+							try {
+								postJ(this.apiUrl + '/main/user/logout')
+									.then(res => {
+
+										uni.showToast({
+											title: '退出成功',
+											icon: 'success',
+											duration: 500
+										})
+
+
+										setTimeout(() => {
+											uni.removeStorageSync('token')
+											uni.removeStorageSync('userInfo')
+											uni.removeStorageSync('treeList')
+											uni.reLaunch({
+												url: '/pages/login/login'
+											})
+
+										}, 500)
+
+									})
+									.catch(err => {
+										console.log(err);
+										uni.showToast({
+											title: '退出失败',
+											icon: 'none'
+										})
+									})
+
+							} catch (error) {
+								console.log(error, 'error----')
+								uni.reLaunch({
+									url: '/pages/login/login'
+								})
+							}
+						} else if (res.cancel) {
+							console.log('用户点击取消')
+						}
+					}
+				})
+			},
+			handlUpdate() {
+				get(this.apiUrl + '/versioning/getLatestData').then(res => {
+					console.log(res);
+					if (res.success) {
+						const currentVersion = this.currentVersion
+						const Nversion = res.data.version
+
+						console.log(currentVersion, Nversion);
+						this.VersionInfo = res.data
+						if (currentVersion !== Nversion) {
+							this.$refs.updatePop.open()
+							this.versionNum = Nversion
+							this.downloadUrl = this.apiUrl + res.data.path
+						} else {
+							uni.showToast({
+								title: '暂无新版本',
+								icon: 'none'
+							})
+						}
+					}
+				})
+			},
+			getbb() {
+				get(this.apiUrl + '/versioning/getLatestData').then(res => {
+					if (res.success) {
+						this.Nversion = res.data.version
+					}
+				})
+			}
+		}
+	}
 </script>
 
 <style lang="scss" scoped>
-.u-slot-value {
-  color: #157a2c;
-}
-.flex-buttom {
-  position: fixed;
-  bottom: 0;
-  left: 0;
-  width: 100%;
-  padding: 20rpx;
-  box-sizing: border-box;
-  .btn {
-    color: #157a2c;
-    font-size: 28rpx;
-    display: flex;
-    justify-content: center;
-    align-items: center;
-    border: 1px solid #157a2c;
-    border-radius: 10rpx;
-    height: 80rpx;
-  }
-}
-.copyright {
-  color: #555;
-  font-size: 28rpx;
-  text-align: center;
-  padding: 20rpx 0;
-}
-</style>
+	.u-slot-value {
+		color: #157a2c;
+	}
+
+	.flex-buttom {
+		position: fixed;
+		bottom: 0;
+		left: 0;
+		width: 100%;
+		padding: 20rpx;
+		box-sizing: border-box;
+
+		.btn {
+			color: #157a2c;
+			font-size: 28rpx;
+			display: flex;
+			justify-content: center;
+			align-items: center;
+			border: 1px solid #157a2c;
+			border-radius: 10rpx;
+			height: 80rpx;
+		}
+	}
+
+	.copyright {
+		color: #555;
+		font-size: 28rpx;
+		text-align: center;
+		padding: 20rpx 0;
+	}
+</style>

+ 1 - 0
pages/tour_tally/detail/detail.vue

@@ -59,6 +59,7 @@
 						<template v-else-if="worksheetInfo.orderStatus === 2">
 							<button class="btn-execute" type="primary" @click="handleReport">报工</button>
 							<button class="btn-sparepart" type="warning" @click="handlbpbj">申请备品备件</button>
+							<button class="btn-reassignment" type="primary" @click="handleAssign">转派</button>
 						</template>
 						<button v-else-if="worksheetInfo.orderStatus === 3" :disabled="true" class="btn-execute"
 							type="primary">已报工</button>

+ 179 - 59
pages/tour_tally/order/order.vue

@@ -1,46 +1,67 @@
 <template>
 	<view>
 		<uni-nav-bar fixed="true" statusBar="true" left-icon="back" title="巡点检工单" @clickLeft="back"></uni-nav-bar>
-		<!-- <template>
-			<view class="tab-title">
-				<view v-for="(item, index) in tabList" :key="index" class="tab-item" :class="index === pickTabIndex ? 'active' : ''" @click="changeChartsTab(index)">
-					{{ item.label }}
-					<text v-if="item.number > 0" class="title-red">{{ item.number }}</text>
-				</view>
-			</view>
-			<view class="tab-title__placeholder"></view>
-		</template> -->
-		<view class="top-wrapper">
-			<view class="tab_box rx-sc">
-				<view class="tab_item" v-for="(item,index) in tabList" :key="index"
-					:class="{active: pickTabIndex == index}">
-					<view @click="changeChartsTab(index)">
-						{{item.label}}
+
+		<view class="search-box">
+			<uni-section>
+				<uni-easyinput @clear="clearSearch" prefixIcon="search" style="width: 460rpx" v-model="searchForm.code"
+					placeholder="工单编号">
+				</uni-easyinput>
+			</uni-section>
+			<button class="search_btn" @click="doSearch">搜索</button>
+			<!-- <image class="menu_icon" @click="showSearch" src="~@/static/pda/menu.svg"></image> -->
+		</view>
+
+
+		<view v-show="showTab">
+			<view class="top-wrapper">
+				<view class="tab_box rx-sc">
+					<view class="tab_item" v-for="(item,index) in tabList" :key="index"
+						:class="{active: pickTabIndex == index}">
+						<view @click="changeChartsTab(index)" class="badge-c">
+							{{item.label}}
+							<u-badge max="99" :value="item.number" absolute></u-badge>
+						</view>
 					</view>
 				</view>
 			</view>
 		</view>
+
+
+
 		<OrderTask v-for="(item, index) in tabList" :key="index" v-show="index === pickTabIndex" :list="item.list"
 			:type="tabList.value"></OrderTask>
+
+		<u-toast ref="uToast"></u-toast>
+
+		<MySearch :show.sync="searchShow" :formItems="formItems" @search="confirmSearch" ref="mySearchRef"></MySearch>
 	</view>
 </template>
 
 <script>
 	import {
-		getWorkOrderList
+		isObjectEmpty
+	} from '@/utils/utils.js'
+	import {
+		getWorkOrderList,
+		getRuleList
 	} from '@/api/myTicket'
 	import OrderTask from './OrderTask.vue'
 	import {
 		post,
 		postJ
 	} from '@/utils/api.js'
-	let [page, size, isEnd] = [1, 10, false]
+
 	export default {
 		components: {
 			OrderTask
 		},
 		data() {
 			return {
+				showTab: true,
+				page: 1,
+				size: 10,
+				isEnd: false,
 				tabList: [{
 						value: 0,
 						label: '待接收',
@@ -62,22 +83,41 @@
 				],
 				pickTabIndex: 0,
 				qrContent: null,
-				barType: 0
+				barType: 0,
+				searchShow: false,
+				searchForm: {
+					code: ''
+				},
+				formItems: [{
+						label: '规则名称:',
+						prop: 'ruleId',
+						component: 'MySelect',
+						props: {
+							localdata: [],
+							dataKey: 'name',
+							dataValue: 'id'
+						}
+					},
+					{
+						label: '时间:',
+						prop: 'startEndTime',
+						component: 'MyDateRange',
+						props: {
+							type: 'daterange',
+						}
+					}
+				]
 			}
 		},
+		onLoad() {
+			this.getRuleList()
+		},
 		onShow() {
 			this.getFirstList()
 			this.getStatus()
 		},
-		onReachBottom: function() {
-			if (isEnd) {
-				return
-			}
-			// 显示加载图标
-			uni.showLoading({
-				title: '数据加载中'
-			})
-			this.getMoreLists()
+		onReachBottom() {
+			this.getList()
 		},
 		methods: {
 			getStatus() {
@@ -87,7 +127,7 @@
 					pageNum: 1,
 					size: 1
 				}).then(res => {
-					console.log(res,'res ===')
+					console.log(res, 'res ===')
 					this.tabList[0].number = res.count
 				})
 				getWorkOrderList({
@@ -98,22 +138,7 @@
 				}).then(res => {
 					this.tabList[1].number = res.count
 				})
-				getWorkOrderList({
-					orderStatus: [3],
-					type: 1,
-					pageNum: 1,
-					size: 1
-				}).then(res => {
-					this.tabList[2].number = res.count
-				})
-				getWorkOrderList({
-					orderStatus: [4],
-					type: 1,
-					pageNum: 1,
-					size: 1
-				}).then(res => {
-					this.tabList[3].number = res.count
-				})
+
 			},
 			getCount() {
 				statistics().then(data => {
@@ -150,36 +175,49 @@
 				})
 			},
 			getFirstList: function() {
-				page = 1
-				// isEnd = true
-				isEnd = false
-				this.getList()
-			},
-			getMoreLists: function() {
-				//获取更多数据
-				page++
+				this.page = 1
+				this.isEnd = false
 				this.getList()
 			},
 			getList() {
+				if (this.isEnd) {
+					this.$refs.uToast.show({
+						message: "暂无更多数据",
+						duration: 1000
+					})
+					return
+				}
 				uni.showLoading({
-					title: '数据加载中'
+					title: '加载中'
 				})
+
 				let params = {
 					orderStatus: [this.tabList[this.pickTabIndex].value],
 					type: 1,
-					pageNum: page,
-					size
+					pageNum: this.page,
+					size: this.size,
+					...this.searchForm
 				}
+
+				console.log(this.showTab);
+
+				if (!this.showTab) {
+					delete params.orderStatus
+				}
+
+
+				// return
 				getWorkOrderList(params)
 					.then(res => {
 						// this.tabList[this.pickTabIndex].list = res.list
 						// isEnd = this.tabList[this.pickTabIndex].list >= res.count
-						if(page == 1){
+						if (this.page == 1) {
 							this.tabList[this.pickTabIndex].list = res.list;
-						}else{
+						} else {
 							this.tabList[this.pickTabIndex].list.push(...res.list);
 						}
-						isEnd = this.tabList[this.pickTabIndex].list.length >= res.count;
+						this.page += 1
+						this.isEnd = this.tabList[this.pickTabIndex].list.length >= res.count;
 						uni.hideLoading();
 					})
 					.catch(() => {
@@ -189,7 +227,41 @@
 			changeChartsTab(index) {
 				this.pickTabIndex = index;
 				this.getFirstList();
-			}
+			},
+
+			async getRuleList() {
+				let params = {
+					status: 1,
+					type: 1,
+					pageNum: 1,
+					size: -1
+				}
+				const res = await getRuleList(params)
+				this.formItems.find(item => item.prop === 'ruleId').props.localdata = res
+			},
+			clearSearch() {
+				this.searchForm.code = ''
+				this.doSearch()
+			},
+			doSearch() {
+				this.isEnd = false;
+				this.page = 1;
+				this.showTab = isObjectEmpty(this.searchForm)
+				this.getList();
+			},
+			showSearch() {
+				this.searchShow = true
+			},
+			confirmSearch(e) {
+				console.log(e);
+				let data = JSON.parse(JSON.stringify(e))
+				this.searchForm = {
+					...this.searchForm,
+					...data
+				}
+				console.log(this.searchForm);
+				this.doSearch()
+			},
 		}
 	}
 </script>
@@ -292,4 +364,52 @@
 			min-width: 18rpx;
 		}
 	}
+
+	.badge-c {
+		position: relative;
+	}
+
+	/deep/.u-badge {
+		top: 0;
+		right: 0;
+		transform: translate(90%, 20%);
+	}
+
+	.search-box {
+		background-color: #fff;
+		display: flex;
+		width: 750rpx;
+		height: 88rpx;
+		padding: 16rpx 32rpx;
+		align-items: center;
+		gap: 16rpx;
+		justify-content: space-between;
+
+		/deep/.uni-section {
+			margin-top: 0px;
+		}
+
+		/deep/.uni-section-header {
+			padding: 0px;
+
+		}
+
+		.search_btn {
+			width: 120rpx;
+			height: 70rpx;
+			line-height: 70rpx;
+			padding: 0 24rpx;
+			background: $theme-color;
+			font-size: 32rpx;
+			color: #fff;
+			margin: 0;
+			margin-left: 26rpx;
+		}
+
+		.menu_icon {
+			width: 44rpx;
+			height: 44rpx;
+			margin-left: 14rpx;
+		}
+	}
 </style>

+ 1 - 1
pages/warehouse/enterHouse/index.vue

@@ -281,7 +281,7 @@
 		min-height: 100rpx;
 
 		/deep/ .baseForm {
-			padding: 0 20rpx;
+			padding:  40rpx 20rpx 20rpx 20rpx;
 		}
 	}
 

+ 1 - 1
pages/warehouse/inventoryAllocation/index.vue

@@ -306,7 +306,7 @@
 		min-height: 100rpx;
 
 		/deep/ .baseForm {
-			padding: 0 20rpx;
+			padding: 40rpx 20rpx 20rpx 20rpx;
 		}
 	}
 

+ 1 - 1
pages/warehouse/outHouse/index.vue

@@ -266,7 +266,7 @@
 		min-height: 100rpx;
 
 		/deep/ .baseForm {
-			padding: 0 20rpx;
+			padding:  40rpx 20rpx 20rpx 20rpx;
 		}
 	}
 

+ 2 - 0
store/index.js

@@ -18,6 +18,8 @@ const modules = modulesFiles.keys().reduce((modules, modulePath) => {
   return modules;
 }, {});
 
+console.log(modules);
+
 const store = new Vuex.Store({
   modules,
   mutations,

+ 11 - 6
uni_modules/zxz-uni-data-select/components/zxz-uni-data-select/zxz-uni-data-select.vue

@@ -30,8 +30,10 @@
 						style="font-size: 12px;position: absolute;z-index: 1;" :placeholder="placeholderOld"
 						v-model="filterInput">
 					<view v-else class="uni-select__input-text uni-select__input-placeholder">{{typePlaceholder}}</view>
-					<uni-icons v-if="(current.length>0 && clear&&!disabled)||(currentArr.length>0&&clear&&!disabled)"
-						type="clear" color="#c0c4cc" size="24" style="position: absolute;right: 0;" @click="clearVal" />
+					<label @click.stop="clearVal"
+						v-if="(current.length>0 && clear&&!disabled)||(currentArr.length>0&&clear&&!disabled)">
+						<uni-icons type="clear" color="#c0c4cc" size="24" style="right: 0;" />
+					</label>
 					<uni-icons style="right: 0;position: absolute;" v-else :type="showSelector? 'top' : 'bottom'"
 						size="14" color="#999" />
 				</view>
@@ -203,8 +205,9 @@
 
 				// #ifndef VUE3
 				if (this.value || this.value == 0) {
+					console.log('这里');
 					this.current = this.formatItemName(this.filterMixinDatacomResData.find(e =>
-						e[this.dataValue] == this.value
+						e[this.dataValue] === this.value
 					))
 				}
 				// #endif
@@ -341,6 +344,8 @@
 					const def = this.mixinDatacomResData.find(item => item[this.dataValue] === defValue)
 					this.current = def ? this.formatItemName(def) : ''
 				}
+
+				console.log(this.current);
 			},
 			/**
 			 * @param {[String, Number]} value
@@ -359,7 +364,8 @@
 			inputChange(e) {
 				this.$emit('inputChange', e.detail.value)
 			},
-			clearVal() {
+			clearVal(event) {
+				console.log(event);
 				if (this.disabled) {
 					return
 				}
@@ -435,7 +441,6 @@
 					this.$emit('input', val)
 					this.$emit('update:modelValue', val)
 					const current = this.mixinDatacomResData.find(item => val == item[this.dataValue])
-					console.log(current);
 					this.$emit('change', current)
 				}
 				if (this.collection) {
@@ -552,7 +557,7 @@
 		width: 100%;
 		flex: 1;
 		box-sizing: border-box;
-		background: #F0F8F2;
+		background: #fff;
 	}
 
 	.uni-stat-box {

+ 42 - 1
utils/utils.js

@@ -30,6 +30,22 @@ export function getDateNew(type = 'day') {
 	return `${year}-${month}-${day}`;
 }
 
+export function initDict(originalData) {
+	let obj = {}
+	let arr = originalData.map(item => {
+		const key = Object.keys(item)[0]
+		const value = item[key]
+		obj[key] = value
+		return {
+			label: value,
+			value: parseInt(key)
+		}
+	})
+	return [arr, obj]
+}
+
+
+
 export function stopScroll() {
 	var box = function(e) {
 		passive: false;
@@ -200,4 +216,29 @@ export function toTreeData(option) {
 		}
 	});
 	return result;
-}
+}
+
+
+//判断搜索条件是否为空的函数
+export function isObjectEmpty(obj) {
+	for (const key in obj) {
+		if (obj.hasOwnProperty(key)) {
+			const value = obj[key];
+			if (typeof value === 'object' && value !== null) {
+				if (Array.isArray(value)) {
+					if (value.length > 0) {
+						return false;
+					}
+				} else {
+					if (!isObjectEmpty(value)) {
+						return false;
+					}
+				}
+			} else if (value !== null && value !== undefined && value !== '' && value !== 0 && value !== false) {
+				return false;
+			}
+		}
+	}
+	return true;
+}
+