Przeglądaj źródła

feat(采购管理): 添加任务驳回功能及优化表单显示,包括附件展示和金额格式化

yusheng 6 miesięcy temu
rodzic
commit
188451d7cf

+ 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));
+}

+ 1 - 1
manifest.json

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

+ 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>