Selaa lähdekoodia

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

liujt 11 kuukautta sitten
vanhempi
commit
9985002a3a

+ 9 - 0
App.vue

@@ -197,6 +197,15 @@
 		-moz-osx-font-smoothing: grayscale;
 	}
 
+
+
+	.required-mark-new::before {
+		content: "*";
+		color: red;
+		position:absolute;
+		left:7rpx;
+	}
+
 	.footerButton {
 		background: #fff
 	}

+ 55 - 49
api/wt/index.js

@@ -61,8 +61,14 @@ export async function getTodoList(query, loding = true) {
 }
 
 
+export async function rejectTask(data) {
+	const res = await putJ(Vue.prototype.apiUrl + `/bpm/task/reject`, data, true)
+	if (res.code == 0) {
+		return res.data;
+	}
+	return Promise.reject(new Error(res.message));
 
-
+}
 
 //获取已办事项列表
 export async function getDoneTaskPage(query) {
@@ -378,76 +384,76 @@ export async function purchaseOrderReturnGetByIdAPI(id) {
  */
 //查询量具送检信息
 export async function processById(params) {
-  const res = await get(Vue.prototype.apiUrl + `/eam/planmaintenance/processById`, params );
-  if (res.code == 0) {
-    return res.data;
-  }
-  return Promise.reject(new Error(res.data.message));
+	const res = await get(Vue.prototype.apiUrl + `/eam/planmaintenance/processById`, params);
+	if (res.code == 0) {
+		return res.data;
+	}
+	return Promise.reject(new Error(res.data.message));
 }
 //
 // 个人日志列表
 export async function getList(params) {
-  const res = await get('/eom/planToolLog/list', params );
-  if (res.data.code == 0) {
-    return res.data;
-  }
-  return Promise.reject(new Error(res.data.message));
+	const res = await get('/eom/planToolLog/list', params);
+	if (res.data.code == 0) {
+		return res.data;
+	}
+	return Promise.reject(new Error(res.data.message));
 }
 //
 //
 //
 //动态表单 工作流自定义权限过滤表单集合
 export async function getBpmCustomFormList(params) {
-  const res = await get(Vue.prototype.apiUrl + '/flowable/bpmcustomform/list', params );
-  if (res.code == 0) {
-    return res.data;
-  }
-  return Promise.reject(new Error(res.data.message));
-  };
+	const res = await get(Vue.prototype.apiUrl + '/flowable/bpmcustomform/list', params);
+	if (res.code == 0) {
+		return res.data;
+	}
+	return Promise.reject(new Error(res.data.message));
+};
 //动态表单 我发起的申请
 export async function getProcessInstancePage(params) {
-	const res = await postJ(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;
+		return res.data;
 	}
 	return Promise.reject(new Error(res.data.message));
-	};
+};
 //动态表单 部门发起的申请
 export async function getProcessInstanceDeptPage(query) {
-	
-	const res = await get(Vue.prototype.apiUrl + '/bpm/process-instance/my-dept-page', params );
+
+	const res = await get(Vue.prototype.apiUrl + '/bpm/process-instance/my-dept-page', params);
 	if (res.code == 0) {
-	  return res.data;
+		return res.data;
 	}
 	return Promise.reject(new Error(res.data.message));
-	};
+};
 //动态表单 通知我的申请
 export async function getProcessInstanceNoticePage(data) {
-	
-	const res = await postJ(Vue.prototype.apiUrl + '/bpm/process-instance/my-notice-page', data );
+
+	const res = await postJ(Vue.prototype.apiUrl + '/bpm/process-instance/my-notice-page', data);
 	if (res.code == 0) {
-	  return res.data;
+		return res.data;
 	}
 	return Promise.reject(new Error(res.data.message));
-	};
-	
-	//发起流程通用接口
-	export async function processInstanceCreateAPI(params, loding = true) {
-		const res = await postJ(
-			Vue.prototype.apiUrl + `/bpm/process-instance/create`, params, loding
-		);
-		if (res.code == 0) {
-			return res.data;
-		}
-		return Promise.reject(new Error(res.message));
-	}
-	//流程列表
-	export async function processInstancePage(params, loding = false) {
-		const res = await get(
-			Vue.prototype.apiUrl + `/bpm/model/page`, params, loding
-		);
-		if (res.code == 0) {
-			return res.data;
-		}
-		return Promise.reject(new Error(res.message));
-	}
+};
+
+//发起流程通用接口
+export async function processInstanceCreateAPI(params, loding = true) {
+	const res = await postJ(
+		Vue.prototype.apiUrl + `/bpm/process-instance/create`, params, loding
+	);
+	if (res.code == 0) {
+		return res.data;
+	}
+	return Promise.reject(new Error(res.message));
+}
+//流程列表
+export async function processInstancePage(params, loding = false) {
+	const res = await get(
+		Vue.prototype.apiUrl + `/bpm/model/page`, params, loding
+	);
+	if (res.code == 0) {
+		return res.data;
+	}
+	return Promise.reject(new Error(res.message));
+}

+ 16 - 12
hybrid/html/a.html

@@ -135,9 +135,7 @@
 							this.form = res.data.data
 							this.form.formId = res.data.data.id
 							this.form.id = ''
-							this.form.valueJson = {
-								manage_workorder: 3333
-							}
+							this.form.valueJson = {}
 							this.title = this.form.name
 							this.jsonData = JSON.parse(res.data.data.formJson.makingJson);
 							this.jsonData.list.forEach(item => {
@@ -176,17 +174,17 @@
 								item.url = item.url && item.url.replace('/api', this.APIUrl)
 							})
 							this.isFlag = true
-							if (params.manage_workorder) {
-								this.$nextTick(() => {
-									this.$refs.generateForm.setRules('manage_workorder', [{
-										required: false,
-										message: '必须填写'
-									}])
+
+							this.$nextTick(() => {
+
+								if (params.manage_workorder) {
 									this.setSalesServiceWork(params.manage_workorder)
-								})
+
+								}
+
+							})
 
 
-							}
 						}
 					});
 
@@ -245,7 +243,13 @@
 						this.$refs.generateForm.setData({
 							manage_workorder: data
 						});
-
+						this.$refs.generateForm.setRules('manage_workorder', [{
+							required: false,
+							message: '必须填写'
+						}])
+						setTimeout(() => {
+							this.$refs.generateForm.validate(['manage_workorder'])
+						})
 
 					},
 

+ 1 - 1
manifest.json

@@ -2,7 +2,7 @@
     "name" : "智慧工厂",
     "appid" : "__UNI__45B3907",
     "description" : "",
-    "versionName" : "V1.0.3.27",
+    "versionName" : "V1.0.3.32",
     "versionCode" : "100",
     "transformPx" : false,
     "h5" : {

+ 77 - 57
pages/doc/browse.vue

@@ -1,66 +1,86 @@
 <template>
+  <view class="">
+    <uni-nav-bar
+      fixed="true"
+      statusBar="true"
+      left-icon="back"
+      title="预览"
+      @clickLeft="back"
+    >
+    </uni-nav-bar>
 
-	<view class="">
-		<uni-nav-bar fixed="true" statusBar="true" left-icon="back" title="预览" @clickLeft="back">
-		</uni-nav-bar>
-
-		<web-view :src="fileUrl" class="webview" allow :fullscreen="false" :webview-styles="webviewStyles"
-			style="width: 100%;height: calc(100vh - 100px)" :frameborder="0"></web-view>
-
-	</view>
-
+    <web-view
+      :src="fileUrl"
+      class="webview"
+      allow
+      :fullscreen="false"
+      :webview-styles="webviewStyles"
+      style="width: 100%; height: calc(100vh - 100px)"
+      :frameborder="0"
+    ></web-view>
+  </view>
 </template>
 
 <script>
-	// import { getFileType } from './util.js';
-
-	export default {
-		data() {
-			return {
-				fileUrl: '',
-				showEditFlag: false,
-				webviewStyles: {
-					width: '100%',
-					height: '100%',
-					bottom: '56px'
-				}
-			};
-		},
-		onLoad({
-			url
-		}) {
+// import { getFileType } from './util.js';
 
-			uni.getSystemInfo({
-				success: (res) => {
-					this.webviewStyles.height = res.screenHeight - res.statusBarHeight - res.safeAreaInsets
-						?.bottom - 100 + 'px';
-					this.webviewStyles.bottom = res.safeAreaInsets?.bottom + 56 + 'px';
-				}
+export default {
+  data() {
+    return {
+      fileUrl: "",
+      showEditFlag: false,
+      webviewStyles: {
+        width: "100%",
+        height: "100%",
+        bottom: "56px",
+      },
+    };
+  },
+  onReady() {
+    // #ifdef APP-PLUS
+    var currentWebview = this.$scope.$getAppWebview(); //获取当前页面的webview对象
+    setTimeout(function () {
+      let wv = currentWebview.children()[0];
+	  console.log(currentWebview.children()[0],'currentWebview')
+	  console.log(wv,'wv')
+      wv.setStyle({ scalable: true });
+    }, 1000); //如果是页面初始化调用时,需要延时一下
+    // #endif
+  },
+  onLoad({ url }) {
+    uni.getSystemInfo({
+      success: (res) => {
+        this.webviewStyles.height =
+          res.screenHeight -
+          res.statusBarHeight -
+          res.safeAreaInsets?.bottom -
+          100 +
+          "px";
+        this.webviewStyles.bottom = res.safeAreaInsets?.bottom + 56 + "px";
+      },
+    });
 
+    this.fileUrl = url;
+    console.log(url);
+  },
 
-			})
-
-			this.fileUrl = url
-			console.log(url);
-		},
-
-		methods: {
-			// open(row) {
-			// 	this.showEditFlag = true
-			// 	this.setFileUrl(row)
-			// },
-			setFileUrl(row) {
-				let file = row.storagePath[0];
-				let fileNames = file.storePath.split('/')
-				let url = window.location.origin + '/api/main/file/getFile?objectName=' + file.storePath +
-					'&fullfilename=' + fileNames[fileNames.length - 1]
-				this.fileUrl = '/kkfile/onlinePreview?url=' + btoa(url);
-
-			
-			}
-		}
-	};
+  methods: {
+    // open(row) {
+    // 	this.showEditFlag = true
+    // 	this.setFileUrl(row)
+    // },
+    setFileUrl(row) {
+      let file = row.storagePath[0];
+      let fileNames = file.storePath.split("/");
+      let url =
+        window.location.origin +
+        "/api/main/file/getFile?objectName=" +
+        file.storePath +
+        "&fullfilename=" +
+        fileNames[fileNames.length - 1];
+      this.fileUrl = "/kkfile/onlinePreview?url=" + btoa(url);
+    },
+  },
+};
 </script>
-<style scoped lang="scss">
-
-</style>
+<style scoped lang="scss"></style>

+ 23 - 4
pages/home/wt/components/purchaseContract/taskForm.vue

@@ -32,6 +32,9 @@
 				<u-form-item label="结算方式" prop="settlementModeName" borderBottom>
 					<u--input style="width: 100%;" disabled v-model="form.settlementModeName"></u--input>
 				</u-form-item>
+				<u-form-item label="附件" prop="settlementModeName" borderBottom>
+				 <fileMain v-model="form.fileId" type="view"></fileMain>
+				</u-form-item>
 			</u--form>
 
 		</view>
@@ -85,8 +88,9 @@
 		</view>
 		<view v-show='curNow===2'>
 			<u-sticky offset-top="100">
-				<u-tag :text="`总计: ${form.totalPrice.toFixed(2)} 优惠总计: ${form.discountTotalPrice.toFixed(2)}`" size="large"
-					type="success"></u-tag>
+				<u-tag
+					:text="`总计: ${form.totalPrice&&form.totalPrice.toFixed(2)} 优惠总计: ${form.discountTotalPrice&&form.discountTotalPrice.toFixed(2)}`"
+					size="large" type="success"></u-tag>
 			</u-sticky>
 			<view v-for="(item,index) in detailData['productList']" :key="index">
 				<u--form style="margin: 0 20px;" labelPosition="left" :model="form" ref="uForm" labelWidth='140rpx'>
@@ -131,7 +135,11 @@
 	import {
 		getDetail
 	} from '@/api/wt/index.js'
+	import fileMain from "@/pages/doc/index.vue"
 	export default {
+		components:{
+			fileMain
+		},
 		props: {
 			businessId: {
 				default: ''
@@ -145,6 +153,9 @@
 				detailData: {},
 				form: {},
 				tableField: [{
+						label: '类型',
+						field: 'productCategoryName',
+					}, {
 						label: '名称',
 						field: 'productName',
 					},
@@ -152,9 +163,16 @@
 						label: '编码',
 						field: 'productCode',
 					},
+
 					{
-						label: '类型',
-						field: 'productCategoryName',
+						field: 'specification',
+						label: '规格',
+
+					},
+					{
+						field: 'brandNo',
+						label: '牌号',
+
 					},
 					{
 						label: '客户代号',
@@ -208,6 +226,7 @@
 			async getDetailData(id) {
 				const data = await getDetail(id);
 				if (data) {
+					data['receiptPaymentList'] = data['receiptPaymentList'].length ? data['receiptPaymentList'] : [{}]
 					this.detailData = data;
 					this.form = data.contractVO;
 				}

+ 27 - 6
pages/home/wt/components/purchaseContract/taskSubmit.vue

@@ -7,12 +7,11 @@
 					v-model="form.reason"></u--textarea>
 			</u-form-item>
 		</u--form>
-		<view>
-			<u-button style="width: 100%;margin-bottom: 10rpx;" icon="edit-pen" :loading='loading' type="success"
-				text="通过" @click="handleAudit(1)">
+		<view class="btnList">
+			<u-button style="width: 45%;margin-bottom: 10rpx;" :loading='loading' type="success" text="通过"
+				@click="handleAudit(1)">
 			</u-button>
-			<u-button style="width: 100%;" :loading='loading' type="error" icon="close" text="驳回"
-				@click="handleAudit(0)" v-if="!['starter'].includes(taskDefinitionKey)"></u-button>
+			<u-button style="width: 45%;" :loading='loading' type="error" text="驳回" @click="rejectTask(0)"></u-button>
 		</view>
 
 	</view>
@@ -20,7 +19,8 @@
 
 <script>
 	import {
-		approveTaskWithVariables
+		approveTaskWithVariables,
+		rejectTask
 	} from '@/api/wt/index.js'
 	export default {
 		name: 'taskSubmit',
@@ -83,7 +83,24 @@
 				}
 				this.loading = false
 			},
+			async rejectTask(status) {
+				let variables = {
+					pass: !!status
+				};
+				let res = await rejectTask({
+					id: this.taskId,
+					reason: this.form.reason,
+					variables
+				})
 
+				if (res.code != '-1') {
+					this.$emit('handleAudit', {
+						status,
+						title: status === 0 ? '驳回' : ''
+					});
+				}
+				this.loading = false
+			},
 			getTableValue() {
 				return new Promise((resolve, reject) => {
 					this.$emit('getTableValue', async (data) => {
@@ -96,4 +113,8 @@
 </script>
 
 <style>
+	.btnList {
+		display: flex;
+
+	}
 </style>

+ 22 - 3
pages/home/wt/components/purchaseOrder/taskForm.vue

@@ -38,6 +38,9 @@
 				<u-form-item label="订单总金额" prop="totalAmount" borderBottom>
 					<u--input style="width: 100%;" disabled v-model="form.totalAmount"></u--input>
 				</u-form-item>
+				<u-form-item label="附件" prop="orderFiles" borderBottom>
+					<fileMain v-model="form.orderFiles" type="view"></fileMain>
+				</u-form-item>
 			</u--form>
 
 		</view>
@@ -91,7 +94,9 @@
 		</view>
 		<view v-show='curNow===2'>
 			<u-sticky offset-top="100">
-				<u-tag :text="`总计: ${form.totalAmount.toFixed(2)} 应付金额: ${form.payAmount.toFixed(2)}`" size="large" type="success"></u-tag>
+				<u-tag
+					:text="`总计: ${form.totalAmount&&form.totalAmount.toFixed(2)} 应付金额: ${form.payAmount&&form.payAmount.toFixed(2)}`"
+					size="large" type="success"></u-tag>
 			</u-sticky>
 			<view v-for="(item,index) in form['productList']" :key="index">
 				<u--form style="margin: 0 20px;" labelPosition="left" :model="form" ref="uForm" labelWidth='140rpx'>
@@ -116,7 +121,11 @@
 	import {
 		purchaseOrderGetByIdAPI
 	} from '@/api/wt/index.js'
+	import fileMain from "@/pages/doc/index.vue"
 	export default {
+		components: {
+			fileMain
+		},
 		props: {
 			businessId: {
 				default: ''
@@ -129,6 +138,9 @@
 			return {
 				form: {},
 				tableField: [{
+						label: '类型',
+						field: 'productCategoryName',
+					}, {
 						label: '名称',
 						field: 'productName',
 					},
@@ -136,9 +148,16 @@
 						label: '编码',
 						field: 'productCode',
 					},
+
 					{
-						label: '类型',
-						field: 'productCategoryName',
+						field: 'specification',
+						label: '规格',
+
+					},
+					{
+						field: 'brandNo',
+						label: '牌号',
+
 					},
 					{
 						label: '供应商代号',

+ 29 - 7
pages/home/wt/components/purchaseOrder/taskSubmit.vue

@@ -7,12 +7,11 @@
 					v-model="form.reason"></u--textarea>
 			</u-form-item>
 		</u--form>
-		<view>
-			<u-button style="width: 100%;margin-bottom: 10rpx;" icon="edit-pen" :loading='loading' type="success"
-				text="通过" @click="handleAudit(1)">
+		<view class="btnList">
+			<u-button style="width: 45%;margin-bottom: 10rpx;" :loading='loading' type="success" text="通过"
+				@click="handleAudit(1)">
 			</u-button>
-			<u-button style="width: 100%;" :loading='loading' type="error" icon="close" text="驳回"
-				@click="handleAudit(0)" v-if="!['starter'].includes(taskDefinitionKey)"></u-button>
+			<u-button style="width: 45%;" :loading='loading' type="error" text="驳回" @click="rejectTask(0)"></u-button>
 		</view>
 
 	</view>
@@ -20,7 +19,8 @@
 
 <script>
 	import {
-		approveTaskWithVariables
+		approveTaskWithVariables,
+		rejectTask
 	} from '@/api/wt/index.js'
 	export default {
 		name: 'taskSubmit',
@@ -65,6 +65,7 @@
 				this.loading = true
 				await this._approveTaskWithVariables(status);
 			},
+
 			async _approveTaskWithVariables(status) {
 				let variables = {
 					pass: !!status
@@ -83,7 +84,24 @@
 				}
 				this.loading = false
 			},
+			async rejectTask(status) {
+				let variables = {
+					pass: !!status
+				};
+				let res = await rejectTask({
+					id: this.taskId,
+					reason: this.form.reason,
+					variables
+				})
 
+				if (res.code != '-1') {
+					this.$emit('handleAudit', {
+						status,
+						title: status === 0 ? '驳回' : ''
+					});
+				}
+				this.loading = false
+			},
 			getTableValue() {
 				return new Promise((resolve, reject) => {
 					this.$emit('getTableValue', async (data) => {
@@ -95,5 +113,9 @@
 	}
 </script>
 
-<style>
+<style scoped>
+	.btnList {
+		display: flex;
+
+	}
 </style>

+ 24 - 24
pages/home/wt/components/salesContract/processTask.vue

@@ -1,19 +1,17 @@
 <template>
 	<view class="havedone-container">
-		<uni-nav-bar fixed="true" statusBar="true" left-icon="back" :title="uniNavBarTitle"
-		 background-color="#157A2C" color="#fff"
-			@clickLeft="back"></uni-nav-bar>
-			<!-- <iframe src="http://aiot.zoomwin.com.cn:51001/test/a.html" style="width: 200px;height: 600px" frameborder="0"></iframe> -->
+		<uni-nav-bar fixed="true" statusBar="true" left-icon="back" :title="uniNavBarTitle" background-color="#157A2C"
+			color="#fff" @clickLeft="back"></uni-nav-bar>
+		<!-- <iframe src="http://aiot.zoomwin.com.cn:51001/test/a.html" style="width: 200px;height: 600px" frameborder="0"></iframe> -->
 		<view v-if="processInstance.processDefinition">
-			<taskForm id='async-biz-form-component' :taskId="listData.taskId" :businessId="listData.businessId" :id="listData.id"
-				:taskDefinitionKey="listData.taskDefinitionKey"
-				 ref="bziRef"></taskForm>
-				 
+			<taskForm id='async-biz-form-component' :taskId="listData.taskId" :businessId="listData.businessId"
+				:id="listData.id" :taskDefinitionKey="listData.taskDefinitionKey" ref="bziRef"></taskForm>
+
 		</view>
 		<view v-for="(item, index) in runningTasks" :key="index">
 			<div v-if="processInstance.processDefinition">
-				<taskSubmit id='async-sub-form-component' :taskId="listData.taskId" :businessId="listData.businessId" :id="listData.id"
-					:taskDefinitionKey="listData.taskDefinitionKey" @handleAudit="handleAudit"
+				<taskSubmit id='async-sub-form-component' :taskId="listData.taskId" :businessId="listData.businessId"
+					:id="listData.id" :taskDefinitionKey="listData.taskDefinitionKey" @handleAudit="handleAudit"
 					@getTableValue="getTableValue" @handleUpdateAssignee="handleUpdateAssignee(item)"
 					@handleBackList="handleBackList(item)" ref="subForm">
 				</taskSubmit>
@@ -28,13 +26,15 @@
 		getProcessInstance,
 		getTaskListByProcessInstanceId
 	} from '@/api/wt/index.js'
-import Vue from 'vue'
-import taskForm from './taskForm.vue'
-import taskSubmit from './taskSubmit.vue'
-
+	import Vue from 'vue'
+	import taskForm from './taskForm.vue'
+	import taskSubmit from './taskSubmit.vue'
 	export default {
 		name: 'processTask',
-		components:{ taskForm,taskSubmit },
+		components: {
+			taskForm,
+			taskSubmit
+		},
 		data() {
 			return {
 				uniNavBarTitle: '',
@@ -50,11 +50,11 @@ import taskSubmit from './taskSubmit.vue'
 		onLoad(option) {
 			this.listData = option
 			this.getDetail()
-			 this.activeComp = 'tab1'
+			this.activeComp = 'tab1'
 		},
 		methods: {
 			/** 获得流程实例 */
-		async	getDetail() {
+			async getDetail() {
 				// 获得流程实例相关
 				this.processInstanceLoading = true;
 				getProcessInstance({
@@ -65,10 +65,10 @@ import taskSubmit from './taskSubmit.vue'
 						return;
 					}
 					// 设置流程信息 
-						this.processInstance = response;
-					this.uniNavBarTitle =`${ response.name } 【${ response.startUser?.nickname}】`
-						
-			
+					this.processInstance = response;
+					this.uniNavBarTitle = `${ response.name } 【${ response.startUser?.nickname}】`
+
+
 					// //将业务表单,注册为动态组件
 					// Vue.component('async-biz-form-component', (resolve) => {
 					// 	require(['pages/home' + this.listData.miniHandleRouter], resolve);
@@ -76,8 +76,8 @@ import taskSubmit from './taskSubmit.vue'
 					// Vue.component('async-sub-form-component', (resolve) => {
 					// 	require(['pages/home' + this.listData.miniViewRouter], resolve);
 					// });
-					
-				
+
+
 					this.processInstanceLoading = false;
 				});
 
@@ -147,7 +147,7 @@ import taskSubmit from './taskSubmit.vue'
 				})
 				// 获得最新详情
 				setTimeout(() => {
-				
+
 					uni.navigateBack()
 				}, 1000)
 

+ 23 - 5
pages/home/wt/components/salesContract/taskForm.vue

@@ -32,6 +32,9 @@
 				<u-form-item label="结算方式" prop="settlementModeName" borderBottom>
 					<u--input style="width: 100%;" disabled v-model="form.settlementModeName"></u--input>
 				</u-form-item>
+				<u-form-item label="附件" prop="settlementModeName" borderBottom>
+				 <fileMain v-model="form.fileId" type="view"></fileMain>
+				</u-form-item>
 			</u--form>
 
 		</view>
@@ -85,8 +88,9 @@
 		</view>
 		<view v-show='curNow===2'>
 			<u-sticky offset-top="100">
-				<u-tag :text="`总计: ${form.totalPrice.toFixed(2)} 优惠总计: ${form.discountTotalPrice.toFixed(2)}`" size="large"
-					type="success"></u-tag>
+				<u-tag
+					:text="`总计: ${form.totalPrice&&form.totalPrice.toFixed(2)} 优惠总计: ${form.discountTotalPrice&&form.discountTotalPrice.toFixed(2)}`"
+					size="large" type="success"></u-tag>
 			</u-sticky>
 			<view v-for="(item,index) in detailData['productList']" :key="index">
 				<u--form style="margin: 0 20px;" labelPosition="left" :model="form" ref="uForm" labelWidth='140rpx'>
@@ -130,7 +134,9 @@
 	import {
 		getDetail
 	} from '@/api/wt/index.js'
+	import fileMain from "@/pages/doc/index.vue"
 	export default {
+		components:{fileMain},
 		props: {
 			businessId: {
 				default: ''
@@ -144,6 +150,9 @@
 				detailData: {},
 				form: {},
 				tableField: [{
+						label: '类型',
+						field: 'productCategoryName',
+					}, {
 						label: '名称',
 						field: 'productName',
 					},
@@ -152,8 +161,14 @@
 						field: 'productCode',
 					},
 					{
-						label: '类型',
-						field: 'productCategoryName',
+						field: 'specification',
+						label: '规格',
+
+					},
+					{
+						field: 'brandNo',
+						label: '牌号',
+
 					},
 					{
 						label: '客户代号',
@@ -207,13 +222,16 @@
 			async getDetailData(id) {
 				const data = await getDetail(id);
 				if (data) {
+					data['receiptPaymentList'] = data['receiptPaymentList'].length ? data['receiptPaymentList'] : [{}]
 					this.detailData = data;
 					this.form = data.contractVO;
+
 				}
 			}
 		}
 	}
 </script>
 
-<style>
+<style scoped>
+
 </style>

+ 28 - 7
pages/home/wt/components/salesContract/taskSubmit.vue

@@ -7,12 +7,11 @@
 					v-model="form.reason"></u--textarea>
 			</u-form-item>
 		</u--form>
-		<view>
-			<u-button style="width: 100%;margin-bottom: 10rpx;" icon="edit-pen" :loading='loading' type="success"
-				text="通过" @click="handleAudit(1)">
+		<view class="btnList">
+			<u-button style="width: 45%;margin-bottom: 10rpx;" :loading='loading' type="success" text="通过"
+				@click="handleAudit(1)">
 			</u-button>
-			<u-button style="width: 100%;" :loading='loading' type="error" icon="close" text="驳回"
-				@click="handleAudit(0)" v-if="!['starter'].includes(taskDefinitionKey)"></u-button>
+			<u-button style="width: 45%;" :loading='loading' type="error" text="驳回" @click="rejectTask(0)"></u-button>
 		</view>
 
 	</view>
@@ -20,7 +19,8 @@
 
 <script>
 	import {
-		approveTaskWithVariables
+		approveTaskWithVariables,
+		rejectTask
 	} from '@/api/wt/index.js'
 	export default {
 		name: 'taskSubmit',
@@ -83,7 +83,24 @@
 				}
 				this.loading = false
 			},
+			async rejectTask(status) {
+				let variables = {
+					pass: !!status
+				};
+				let res = await rejectTask({
+					id: this.taskId,
+					reason: this.form.reason,
+					variables
+				})
 
+				if (res.code != '-1') {
+					this.$emit('handleAudit', {
+						status,
+						title: status === 0 ? '驳回' : ''
+					});
+				}
+				this.loading = false
+			},
 			getTableValue() {
 				return new Promise((resolve, reject) => {
 					this.$emit('getTableValue', async (data) => {
@@ -95,5 +112,9 @@
 	}
 </script>
 
-<style>
+<style scoped>
+	.btnList {
+		display: flex;
+
+	}
 </style>

+ 22 - 5
pages/home/wt/components/salesOrder/taskForm.vue

@@ -5,7 +5,7 @@
 				activeColor='#157A2C'></u-subsection>
 		</u-sticky>
 
-		<view  v-show='curNow===0'>
+		<view v-show='curNow===0'>
 			<u--form style="margin: 0 20px;" labelPosition="left" :model="form" ref="uForm" labelWidth='140rpx'>
 				<u-form-item label="订单编号" prop="orderNo" borderBottom>
 					<u--input style="width: 100%;" disabled v-model="form.orderNo"></u--input>
@@ -26,6 +26,9 @@
 				<u-form-item label="订单总金额" prop="totalAmount" borderBottom>
 					<u--input style="width: 100%;" disabled v-model="form.totalAmount"></u--input>
 				</u-form-item>
+				<u-form-item label="附件" prop="orderFiles" borderBottom>
+					<fileMain v-model="form.orderFiles" type="view"></fileMain>
+				</u-form-item>
 			</u--form>
 
 		</view>
@@ -79,8 +82,9 @@
 		</view>
 		<view v-show='curNow===2'>
 			<u-sticky offset-top="100">
-				<u-tag :text="`总计: ${form.totalAmount.toFixed(2)} 优惠总金额: ${form.payAmount.toFixed(2)}`" size="large"
-					type="success"></u-tag>
+				<u-tag
+					:text="`总计: ${form.totalAmount&&form.totalAmount.toFixed(2)} 优惠总金额: ${form.payAmount&&form.payAmount.toFixed(2)}`"
+					size="large" type="success"></u-tag>
 			</u-sticky>
 			<view v-for="(item,index) in form['productList']" :key="index">
 				<u--form style="margin: 0 20px;" labelPosition="left" :model="form" ref="uForm" labelWidth='140rpx'>
@@ -105,7 +109,11 @@
 	import {
 		getSaleOrderDetailAPI
 	} from '@/api/wt/index.js'
+	import fileMain from "@/pages/doc/index.vue"
 	export default {
+		components: {
+			fileMain
+		},
 		props: {
 			businessId: {
 				default: ''
@@ -118,6 +126,9 @@
 			return {
 				form: {},
 				tableField: [{
+						label: '类型',
+						field: 'productCategoryName',
+					}, {
 						label: '名称',
 						field: 'productName',
 					},
@@ -126,8 +137,14 @@
 						field: 'productCode',
 					},
 					{
-						label: '类型',
-						field: 'productCategoryName',
+						field: 'specification',
+						label: '规格',
+
+					},
+					{
+						field: 'brandNo',
+						label: '牌号',
+
 					},
 					{
 						label: '客户代号',

+ 28 - 7
pages/home/wt/components/salesOrder/taskSubmit.vue

@@ -7,12 +7,11 @@
 					v-model="form.reason"></u--textarea>
 			</u-form-item>
 		</u--form>
-		<view>
-			<u-button style="width: 100%;margin-bottom: 10rpx;" icon="edit-pen" :loading='loading' type="success"
-				text="通过" @click="handleAudit(1)">
+		<view class="btnList">
+			<u-button style="width: 45%;margin-bottom: 10rpx;" :loading='loading' type="success" text="通过"
+				@click="handleAudit(1)">
 			</u-button>
-			<u-button style="width: 100%;" :loading='loading' type="error" icon="close" text="驳回"
-				@click="handleAudit(0)" v-if="!['starter'].includes(taskDefinitionKey)"></u-button>
+			<u-button style="width: 45%;" :loading='loading' type="error" text="驳回" @click="rejectTask(0)"></u-button>
 		</view>
 
 	</view>
@@ -20,7 +19,8 @@
 
 <script>
 	import {
-		approveTaskWithVariables
+		approveTaskWithVariables,
+		rejectTask
 	} from '@/api/wt/index.js'
 	export default {
 		name: 'taskSubmit',
@@ -83,7 +83,24 @@
 				}
 				this.loading = false
 			},
+			async rejectTask(status) {
+				let variables = {
+					pass: !!status
+				};
+				let res = await rejectTask({
+					id: this.taskId,
+					reason: this.form.reason,
+					variables
+				})
 
+				if (res.code != '-1') {
+					this.$emit('handleAudit', {
+						status,
+						title: status === 0 ? '驳回' : ''
+					});
+				}
+				this.loading = false
+			},
 			getTableValue() {
 				return new Promise((resolve, reject) => {
 					this.$emit('getTableValue', async (data) => {
@@ -95,5 +112,9 @@
 	}
 </script>
 
-<style>
+<style scoped>
+	.btnList {
+		display: flex;
+
+	}
 </style>

+ 1 - 0
pages/salesServiceManagement/accessory/components/selectWork.vue

@@ -223,6 +223,7 @@
 				if (this.isPieCar) {
 					data.isPieCar = this.isPieCar
 				}
+				console.log(data,';data')
 
 				getSalesWorkOrder(data).then(res => {
 					if (this.page === 1) {

+ 1 - 4
pages/salesServiceManagement/accessory/index.vue

@@ -244,10 +244,7 @@
 						pageUrl: '',
 						judge: [{
 							authorities: '',
-						}, {
-							key: 'source',
-							value: [0],
-						}, {
+						},  {
 							key: 'approvalStatus',
 							value: [0, 3],
 						}],

+ 28 - 16
pages/salesServiceManagement/demandList/add.vue

@@ -12,40 +12,40 @@
 					</u--input>
 				</view>
 			</u-cell>
-			<u-cell title="关联类型" arrow-direction="down">
+			<u-cell title="关联类型" arrow-direction="down" class="required-mark-new">
 				<uni-data-picker :readonly="!isDisable" v-model="form.associationType" slot="value" placeholder="请选择"
 					:localdata="associationTypeList" @change="associationTypeOnchange">
 				</uni-data-picker>
 			</u-cell>
-			<u-cell title="需求名称" arrow-direction="down">
+			<u-cell title="需求名称" arrow-direction="down" class="required-mark-new">
 				<view slot="value" style="display: flex;align-items: center;width: 100%;">
 					<u--input style="flex:1" :disabled="!isDisable" placeholder="请输入" border="surround"
 						v-model="form.name">
 					</u--input>
 				</view>
 			</u-cell>
-			<u-cell title="客户名称" arrow-direction="down">
+			<u-cell title="客户名称" arrow-direction="down" class="required-mark-new">
 				<view slot="value" style="display: flex;align-items: center;width: 100%;">
 					<u--input :disabled="!isDisable" style="flex:1" placeholder="请选择" border="surround"
 						@click.native="selectContactShow" v-model="form.contactName">
 					</u--input>
 				</view>
 			</u-cell>
-			<u-cell v-if="form.associationType" :title="orderCodeName" arrow-direction="down">
+			<u-cell v-if="form.associationType" :title="orderCodeName" arrow-direction="down" class="required-mark-new">
 				<view slot="value" style="display: flex;align-items: center;width: 100%;">
 					<u--input :disabled="!isDisable" style="flex:1" placeholder="请选择" border="surround"
 						@click.native="invoiceDialogOpen" v-model="form.orderCode">
 					</u--input>
 				</view>
 			</u-cell>
-			<u-cell title="报修地址" arrow-direction="down">
+			<u-cell title="报修地址" arrow-direction="down" class="required-mark-new">
 				<view slot="value" style="display: flex;align-items: center;width: 100%;">
 					<u--input :disabled="!isDisable" style="flex:1" placeholder="请输入" border="surround"
 						v-model="form.contactAddress">
 					</u--input>
 				</view>
 			</u-cell>
-			<u-cell title="故障等级" arrow-direction="down">
+			<u-cell title="故障等级" arrow-direction="down" class="required-mark-new">
 				<uni-data-picker :readonly="!isDisable" v-model="form.faultLevel" slot="value" placeholder="请选择"
 					:localdata="fault_level" @change="sourceCodeOnchange">
 				</uni-data-picker>
@@ -54,12 +54,12 @@
 				<uni-datetime-picker :disabled="!isDisable" type="date" slot="value" v-model="form.expectedTime">
 				</uni-datetime-picker>
 			</u-cell>
-			<u-cell title="售后类型" arrow-direction="down">
+			<u-cell title="售后类型" arrow-direction="down" class="required-mark-new">
 				<uni-data-picker :readonly="!isDisable" v-model="form.afterSalesType" slot="value" placeholder="请选择"
 					:localdata="after_sales_type">
 				</uni-data-picker>
 			</u-cell>
-			<u-cell title="是否收费" arrow-direction="down">
+			<u-cell title="是否收费" arrow-direction="down" class="required-mark-new">
 				<uni-data-picker v-if="isDisable" v-model="form.isFee" slot="value" placeholder="请选择"
 					:localdata="chargeList">
 				</uni-data-picker>
@@ -69,7 +69,7 @@
 				</u--input>
 
 			</u-cell>
-			<u-cell title="是否带配件" arrow-direction="down">
+			<u-cell title="是否带配件" arrow-direction="down" class="required-mark-new">
 				<uni-data-picker v-if="isDisable" v-model="form.isWithAccessories" slot="value" placeholder="请选择"
 					:localdata="chargeList">
 				</uni-data-picker>
@@ -78,7 +78,7 @@
 
 				</u--input>
 			</u-cell>
-			<u-cell title="是否派车" arrow-direction="down">
+			<u-cell title="是否派车" arrow-direction="down" class="required-mark-new">
 				<uni-data-picker v-if="isDisable" v-model="form.isPieCar" slot="value" placeholder="请选择"
 					:localdata="chargeList">
 				</uni-data-picker>
@@ -92,11 +92,11 @@
 					:localdata="pie_car_type">
 				</uni-data-picker>
 				<u--input v-else slot="value" style="flex:1" placeholder="请输入" disabled border="surround"
-					:value="form.pieCarType==1?'是':'否'">
+					:value="getTetx(form.pieCarType)">
 
 				</u--input>
 			</u-cell>
-			<u-cell title="是否外包" arrow-direction="down">
+			<u-cell title="是否外包" arrow-direction="down" class="required-mark-new">
 				<uni-data-picker v-if="isDisable" v-model="form.isOutsource" slot="value" placeholder="请选择"
 					:localdata="chargeList">
 				</uni-data-picker>
@@ -105,7 +105,7 @@
 
 				</u--input>
 			</u-cell>
-			<u-cell title="是否生成采购订单" arrow-direction="down">
+			<u-cell title="是否生成采购订单" arrow-direction="down" class="required-mark-new">
 				<uni-data-picker v-if="isDisable" v-model="form.isCreatePurchaseOrder" slot="value" placeholder="请选择"
 					:localdata="chargeList">
 				</uni-data-picker>
@@ -114,9 +114,9 @@
 
 				</u--input>
 			</u-cell>
-			<u-cell title="涉及事业部门" arrow-direction="down">
-				<u--input slot="value" :disabled="!isDisable" placeholder="请选择" border="surround"
-					v-model="form.involveDeptName" @click.native="salesDeptShow"></u--input>
+			<u-cell title="涉及事业部门" arrow-direction="down" class="required-mark-new" @click.native="salesDeptShow">
+				<u--input slot="value" :disabled="!isDisable" style="pointer-events: none;" placeholder="请选择"
+					border="surround" v-model="form.involveDeptName"></u--input>
 			</u-cell>
 			<u-cell title="备注说明" arrow-direction="down">
 				<u--textarea border="surround" :disabled="!isDisable" placeholder=" " slot="value" v-model="form.remark"
@@ -305,6 +305,7 @@
 					el.categoryCode = el.code;
 					el.categoryName = el.name;
 					el.categoryModel = el.modelType;
+					el.productCategoryName = el.categoryLevelPath
 					return el;
 				});
 				let params = {
@@ -335,6 +336,9 @@
 
 		},
 		methods: {
+			getTetx(val) {
+				return this.pie_car_type.find(data => data.value == val)?.text
+			},
 			//选择部门
 			salesDeptShow() {
 				if (!this.isDisable) {
@@ -494,6 +498,14 @@
 						})
 						return
 					}
+					if (!data.associationType) {
+						this.$refs.uToast.show({
+							type: "warning",
+							message: "请选择关联类型",
+						})
+						return
+					}
+
 					if (!data.orderCode && this.form.associationType !== '3') {
 						const message = this.form.associationType === "1" ? "请选择发货单" : "请选择销售订单"
 						this.$refs.uToast.show({

+ 12 - 5
pages/salesServiceManagement/demandList/components/itemSelect.vue

@@ -98,14 +98,16 @@
 					(productItem, productIndex) => {
 						return {
 							...productItem,
+							productCategoryName: productItem.categoryLevelPath,
+							productBrand: productItem.brandNum,
 							outInDetailRecordRequestList: productItem.outInDetailRecordRequestList.map((
 								packingItem) => {
 								return {
 									...packingItem,
 									categoryName: productItem.categoryName,
 									categoryCode: productItem.categoryCode,
+									productCategoryName: productItem.categoryLevelPath,
 									categoryModel: productItem.categoryModel,
-									productCategoryName: packingItem.categoryLevelName,
 									produceTime: packingItem.produceTime || null,
 									shipmentDate: res.createTime || null,
 									guaranteePeriodDeadline: this.getTime(res.createTime)[0],
@@ -118,11 +120,16 @@
 				// 获取包装维度数据
 				const arr = [];
 				for (const key in productList) {
-					for (const k in productList[key].outInDetailRecordRequestList) {
-						arr.push({
-							...productList[key].outInDetailRecordRequestList[k]
-						});
+					if (productList[key].outInDetailRecordRequestList.length) {
+						for (const k in productList[key].outInDetailRecordRequestList) {
+							arr.push({
+								...productList[key].outInDetailRecordRequestList[k]
+							});
+						}
+					} else {
+						arr.push(productList[key])
 					}
+
 				}
 				this.listData = arr;
 			},

+ 3 - 0
pages/salesServiceManagement/workOrder/components/editPlan.vue

@@ -254,6 +254,8 @@
 				}
 				let contactInfoVOS = this.$refs.contactRef.getTabData();
 				let costListVOS = this.$refs.schemeRef.getTabData();
+				// console.log(this.$refs.schemeRef.getTotalPrice(),'this.$refs.schemeRef.getTotalPrice()')
+				// return
 				let obj = resData.afterSalesDemandVO;
 				let data = {
 					attachments: resData.attachments,
@@ -263,6 +265,7 @@
 					id: resData.id,
 					inFactDuration: resData.inFactDuration,
 					maintenanceProcess: resData.maintenanceProcess,
+					totalCost:this.$refs.schemeRef.getTotalPrice(),
 					salesDemandUpdatePO: {
 						orderCode: obj.orderCode,
 						orderId: obj.orderId,

+ 6 - 0
pages/salesServiceManagement/workOrder/components/schemeList.vue

@@ -205,6 +205,12 @@
 
 		},
 		methods: {
+			getTotalPrice(){
+				 return this.tableList.reduce((a,b)=>{
+					 console.log(b,'b.settlementPrice')
+					return a+(Number(b.settlementPrice)||0)
+				 },0)
+			},
 
 			async getLevelCode(code) {
 				try {

+ 10 - 8
pages/salesServiceManagement/workOrder/components/selectProduct.vue

@@ -125,7 +125,7 @@
 			</u-list>
 		</view>
 		<ba-tree-picker ref="treePicker" key="verify" :multiple="false" @select-change="confirm" title="选择分类"
-			:selectedData="selectedData" :localdata="classificationList" valueKey="id" textKey="name"
+			:localdata="classificationList" valueKey="id" textKey="name"
 			childrenKey="children" />
 		<view class="footer">
 			<u-button type="success" size="small" class="u-reset-button" @click="jumpAdd">
@@ -143,8 +143,9 @@
 		getInventoryTotalAPI
 	} from '@/api/wms/index.js'
 	import {
-		treeByPid
-	} from '@/api/pda/workOrder.js'
+		getProduceTreeByPid,
+
+	} from '@/api/warehouseManagement'
 	import {
 		getProductList,
 		getBatchDetails,
@@ -163,8 +164,8 @@
 				tableList: [],
 				obtain: '主数据',
 				dimension: '1', // 列表维度
-				categoryLevelId: 6, // 分类id(默认6 查询备品备件)
-				selectedData: ['6'],
+				categoryLevelId: '', // 分类id(默认6 查询备品备件)
+				// selectedData: ['6'],
 				classificationList: [],
 				pageNum: 1,
 				isEnd: false,
@@ -334,8 +335,8 @@
 				this.checkedkList = this.tableList.filter(item => item.checked)
 			},
 			getTreeList() {
-				treeByPid({
-					ids: [6]
+				getProduceTreeByPid({
+					type: 5
 				}).then(res => {
 					this.classificationList = res;
 					this.confirm(res[0].id, res[0].name, res[0].rootCategoryLevelId)
@@ -356,7 +357,7 @@
 					})
 					return;
 				}
-				//获取仓库库存
+				// //获取仓库库存
 				// if (this.obtain == '仓库') {
 				// 	let codeList = list.map((item) => item.code);
 				// 	let inventoryTotalList = await getInventoryTotalAPI(codeList);
@@ -369,6 +370,7 @@
 
 				// 单选
 				if (this.selectType == '1') {
+					list[0].warehouseNum=list[0].measureQuantity
 					uni.$emit('updateScheme', list[0]);
 				}
 				this.back();