瀏覽代碼

feat:仓库入库审批

liujt 3 天之前
父節點
當前提交
18b0a518e2

+ 9 - 0
api/wt/index.js

@@ -160,6 +160,15 @@ export async function approveTaskWithVariables(data) {
   return Promise.reject(new Error(res.message));
 }
 
+// 仓库出库审批不通过
+export async function outApproveNotPass(data) {
+  const res = await putJ(Vue.prototype.apiUrl + `/bpm/outApprove/notPass`, data, true)
+  if (res.code == 0) {
+    return res.data;
+  }
+  return Promise.reject(new Error(res.message));
+}
+
 /**
  *销售退货审批流程审核接口
  */

+ 8 - 0
pages.json

@@ -140,6 +140,14 @@
 				"navigationBarTextStyle": "white"
 			}
 		},
+		{ // 入库审批
+			"path": "pages/home/wt/components/inBound/processTask",
+			"style": {
+				"navigationBarTitleText": "",
+				"navigationStyle": "custom",
+				"navigationBarTextStyle": "white"
+			}
+		},
 		{ // 销售发货确认
 			"path": "pages/home/wt/components/salesInvoiceConfirm/processTask",
 			"style": {

+ 188 - 0
pages/home/wt/components/inBound/processTask.vue

@@ -0,0 +1,188 @@
+<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> -->
+		<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>
+				 
+		</view>
+		<view v-if="listData.type !='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"
+						@getTableValue="getTableValue" @handleUpdateAssignee="handleUpdateAssignee(item)"
+						@handleBackList="handleBackList(item)" ref="subForm">
+					</taskSubmit>
+				</div>
+			</view>
+		</view>
+		<u-toast ref="uToast"></u-toast>
+	</view>
+</template>
+
+<script>
+	import {
+		getProcessInstance,
+		getTaskListByProcessInstanceId
+	} from '@/api/wt/index.js'
+import Vue from 'vue'
+import taskForm from './taskForm.vue'
+import taskSubmit from './taskSubmit.vue'
+
+	export default {
+		name: 'processTask',
+		components:{ taskForm,taskSubmit },
+		data() {
+			return {
+				uniNavBarTitle: '',
+				processInstanceLoading: false,
+				listData: {},
+				processInstance: {},
+				runningTasks: [],
+				auditForms: [],
+				activeComp: null,
+			}
+		},
+
+		onLoad(option) {
+			this.listData = option
+			this.getDetail()
+			 this.activeComp = 'tab1'
+		},
+		methods: {
+			/** 获得流程实例 */
+		async	getDetail() {
+				// 获得流程实例相关
+				this.processInstanceLoading = true;
+				getProcessInstance({
+					id: this.listData.id
+				}).then(async (response) => {
+					if (!response) {
+						this.$message.error('查询不到流程信息!');
+						return;
+					}
+					// 设置流程信息 
+						this.processInstance = response;
+					this.uniNavBarTitle =`${ response.name } 【${ response.startUser?.nickname}】`
+						
+			
+					// //将业务表单,注册为动态组件
+					// Vue.component('async-biz-form-component', (resolve) => {
+					// 	require(['pages/home' + this.listData.miniHandleRouter], resolve);
+					// });
+					// Vue.component('async-sub-form-component', (resolve) => {
+					// 	require(['pages/home' + this.listData.miniViewRouter], resolve);
+					// });
+					
+				
+					this.processInstanceLoading = false;
+				});
+
+				this.runningTasks = [];
+				this.auditForms = [];
+				getTaskListByProcessInstanceId({
+					processInstanceId: this.listData.id
+				}).then((response) => {
+					console.log(response, 'response');
+					// 审批记录
+					this.tasks = [];
+					// 移除已取消的审批
+					response.forEach((task) => {
+						if (task.result !== 4) {
+							this.tasks.push(task);
+						}
+					});
+					// 排序,将未完成的排在前面,已完成的排在后面;
+					this.tasks.sort((a, b) => {
+						// 有已完成的情况,按照完成时间倒序
+						if (a.endTime && b.endTime) {
+							return b.endTime - a.endTime;
+						} else if (a.endTime) {
+							return 1;
+						} else if (b.endTime) {
+							return -1;
+							// 都是未完成,按照创建时间倒序
+						} else {
+							return b.createTime - a.createTime;
+						}
+					});
+
+					// 需要审核的记录
+					let userInfo = wx.getStorageSync("userInfo");
+					this.tasks.forEach((task) => {
+						if (task.result !== 1 && task.result !== 6) {
+							// 只有待处理才需要
+							return;
+						}
+						if (!task.assigneeUser || task.assigneeUser.id !== userInfo.userId) {
+							// 自己不是处理人
+							return;
+						}
+						if (task.taskDefinitionKey !== this.listData.taskDefinitionKey) {
+							// 不是当前流程的
+							return;
+						}
+						this.runningTasks.push({
+							...task
+						});
+						console.log(this.runningTasks, ' this.runningTasks');
+						this.auditForms.push({
+							reason: ''
+						});
+					});
+				});
+			},
+
+
+			/** 处理审批通过和不通过的操作 */
+			handleAudit(data) {
+				let text = data.status === 1 ? '通过' : '不通过';
+				this.$refs.uToast.show({
+					type: 'success',
+					message: `审批${data.title || text}成功!`,
+					iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/success.png'
+				})
+				// 获得最新详情
+				setTimeout(() => {
+				
+					uni.navigateBack()
+				}, 1000)
+
+
+				// const index = this.runningTasks.indexOf(task);
+				// this.$refs['form' + index][0].validate((valid) => {
+				//   if (!valid) {
+				//     return;
+				//   }
+				//   const data = {
+				//     id: task.id,
+				//     reason: this.auditForms[index].reason
+				//   };
+				//   if (pass) {
+				//     approveTask(data).then((response) => {
+				//       this.$message.success('审批通过成功!');
+				//       this.handleClose(); // 获得最新详情
+				//     });
+				//   } else {
+				//     rejectTask(data).then((response) => {
+				//       this.$message.success('审批不通过成功!');
+				//       this.handleClose(); // 获得最新详情
+				//     });
+				//   }
+				// });
+			},
+			getTableValue(fn) {
+				fn(this.$refs.bziRef.getTableValue());
+			}
+		}
+
+	}
+</script>
+
+<style>
+</style>

+ 345 - 0
pages/home/wt/components/inBound/taskForm.vue

@@ -0,0 +1,345 @@
+<template>
+	<view class="task-form-container">
+		<u-sticky offset-top="50">
+			<u-subsection fontSize="25" mode="subsection" :list="tabList" :current="curNow" @change="sectionChange"
+				activeColor="#157A2C" bgColor="#fff"></u-subsection>
+		</u-sticky>
+
+		<!-- 入库信息 -->
+		<view v-show="curNow === 0">
+			<u--form style="margin: 0 20px;" labelPosition="left" :model="infoData" ref="uForm" labelWidth="180rpx">
+				<u-form-item label="入库单号" borderBottom>
+					{{ infoData.bizNo || '-' }}
+				</u-form-item>
+				<u-form-item label="入库物品类型" borderBottom>
+					{{ handleAssetType(extInfo.assetType) || '-' }}
+				</u-form-item>
+				<u-form-item label="入库场景" borderBottom>
+					{{ getSceneState(infoData.bizType) || '-' }}
+				</u-form-item>
+				<u-form-item label="关联订单" borderBottom>
+					{{ extInfo.documentSource || '-' }}
+				</u-form-item>
+				<u-form-item label="客户名称" borderBottom>
+					{{ infoData.clientName || '-' }}
+				</u-form-item>
+				<u-form-item label="供应商" borderBottom>
+					{{ extInfo.supplierName || '-' }}
+				</u-form-item>
+				<u-form-item label="供应商代号" borderBottom>
+					{{ extInfo.supplierCode || '-' }}
+				</u-form-item>
+				<u-form-item label="入库时间" borderBottom>
+					{{ infoData.storageTime || infoData.createTime || '-' }}
+				</u-form-item>
+				<u-form-item label="入库登记人" borderBottom>
+					{{ extInfo.createUserName || '-' }}
+				</u-form-item>
+				<u-form-item label="权属部门" borderBottom>
+					{{ extInfo.deptName || '-' }}
+				</u-form-item>
+				<u-form-item label="审核人" borderBottom>
+					{{ infoData.verifyName || '-' }}
+				</u-form-item>
+				<u-form-item label="状态" borderBottom>
+					{{ stepsTitle }}
+				</u-form-item>
+				<u-form-item label="备注" borderBottom>
+					{{ infoData.remark || '-' }}
+				</u-form-item>
+			</u--form>
+		</view>
+
+		<!-- 产品信息 -->
+		<view v-show="curNow === 1">
+			<common-product-list :list="productList" :tableField="productFields"></common-product-list>
+		</view>
+
+		<!-- 包装明细 -->
+		<view v-show="curNow === 2">
+			<common-product-list :list="showPackingList" :tableField="packingFields"></common-product-list>
+		</view>
+	</view>
+</template>
+
+<script>
+	import { getInboundDetailsById, getInboundDetailsByIds } from '@/api/warehouseManagement'
+	import { getInfoBySourceBizNoAll } from '@/api/wms'
+	import { allCategoryLevel } from '@/api/wt';
+	import { useDictLabel } from '@/utils/dict/index';
+	import { sceneState, qualityResults, qualityStatus } from '@/enum/dict.js';
+	import { mapGetters, mapActions } from 'vuex';
+	import { parameterGetByCode } from '@/api/mainData/index.js';
+	import commonProductList from '../common/commonProductList.vue';
+
+	export default {
+		components: { commonProductList },
+		props: {
+			bizType: {
+				type: String,
+				default: ''
+			},
+			businessId: {
+				type: String,
+				default: ''
+			},
+			isUpload: {
+				type: Boolean,
+				default: false
+			},
+			isInterior: {
+				type: Boolean,
+				default: true
+			},
+			isIds: {
+				type: Boolean,
+				default: false
+			}
+		},
+		data() {
+			return {
+				tabList: ['入库信息', '产品信息', '包装明细'],
+				curNow: 0,
+				qualityStatus,
+				qualityResults,
+				productList: [],
+				showPackingList: [],
+				packingList: [],
+				extInfo: {},
+				codeList: [],
+				infoData: {},
+				stepsTitle: '已完成',
+				stepsStatus: 'success',
+				active: 0,
+				isPrice: 1,
+				// 产品信息字段配置
+				productFields: [
+					{ label: '仓库', field: 'warehouseName' },
+					// { label: '编码', field: 'categoryCode' },
+					// { label: '名称', field: 'categoryName' },
+					{ label: '型号', field: 'categoryModel' },
+					{ label: '规格', field: 'specification' },
+					{ label: '牌号', field: 'brandNum' },
+					{ label: '批次号', field: 'batchNo' },
+					{ label: '包装数量', field: 'packingQuantity' },
+					{ label: '单位', field: 'packingUnit' },
+					{ label: '计量数量', field: 'measureQuantity' },
+					{ label: '计量单位', field: 'measureUnit' },
+					{ label: '重量', field: 'weight' },
+					{ label: '重量单位', field: 'weightUnit' },
+					{ label: '机型', field: 'modelKey' },
+					{ label: '颜色', field: 'colorKey' },
+					{ label: '允许拆包', field: 'isUnpack' },
+					{ label: '供应商', field: 'supplierName' },
+				],
+				// 包装明细字段配置
+				packingFields: [
+					{ label: '批次号', field: 'batchNo' },
+					{ label: '包装编码', field: 'packageNo' },
+					// { label: '名称', field: 'categoryName' },
+					// { label: '编码', field: 'categoryCode' },
+					{ label: '型号', field: 'categoryModel' },
+					{ label: '规格', field: 'specification' },
+					{ label: '牌号', field: 'brandNum' },
+					{ label: '发货条码', field: 'barcodes' },
+					{ label: '包装数量', field: 'packingQuantity' },
+					{ label: '包装单位', field: 'packingUnit' },
+					{ label: '计量数量', field: 'measureQuantity' },
+					{ label: '计量单位', field: 'measureUnit' },
+					{ label: '物料代号', field: 'materielDesignation' },
+					{ label: '客户代号', field: 'clientCode' },
+					{ label: '刻码', field: 'engrave' },
+					{ label: '重量', field: 'weight' },
+					{ label: '重量单位', field: 'weightUnit' },
+					{ label: '机型', field: 'modelKey' },
+					{ label: '颜色', field: 'colorKey' },
+					{ label: '供应商', field: 'supplierName' },
+					{ label: '供应商代号', field: 'supplierCode' },
+					{ label: '质检结果', field: 'result' },
+					{ label: '质检状态', field: 'status' },
+					{ label: '仓库', field: 'warehouseName' },
+					{ label: '生产日期', field: 'productionDate' },
+					{ label: '采购日期', field: 'purchaseDate' },
+					{ label: '失效日期', field: 'expireDate' },
+				],
+			};
+		},
+		watch: {
+			'infoData.verifyStatus': {
+				immediate: true,
+				handler(val) {
+					if (val == 0) {
+						this.active = 1;
+						this.stepsTitle = '未审核';
+						this.stepsStatus = 'wait';
+					} else if (val == 1) {
+						this.active = 2;
+						this.stepsTitle = '审核中';
+						this.stepsStatus = 'process';
+					} else if (val == 2) {
+						this.active = 2;
+						this.stepsTitle = '审核通过';
+						this.stepsStatus = 'success';
+					} else if (val == 3) {
+						this.active = 2;
+						this.stepsTitle = '驳回';
+						this.stepsStatus = 'error';
+					}
+				}
+			},
+			businessId(val) {
+				if (val) {
+					this._getInfo(val);
+				}
+			}
+		},
+		computed: {
+			...mapGetters(['getDictValue']),
+			clientEnvironmentId() {
+				return this.$store.state.user.info.clientEnvironmentId;
+			},
+		},
+		created() {
+			parameterGetByCode({
+				code: 'wms_price'
+			}).then((res) => {
+				this.isPrice = res.value;
+			});
+			this.requestDict('类型用途');
+			this.getAllCategoryType();
+			this._getInfo(this.businessId);
+		},
+		methods: {
+			...mapActions('dict', ['requestDict']),
+			getSceneState: useDictLabel(sceneState),
+			sectionChange(index) {
+				this.curNow = index;
+			},
+			handleAssetType(r) {
+				if (!r) return '-';
+				var arr = r.split(',');
+				var filteredData = this.codeList.filter(function(item) {
+					return arr.indexOf(item.dictCode) !== -1;
+				});
+				return filteredData.map(function(item) { return item.dictValue; }).join(',');
+			},
+			async getAllCategoryType() {
+				var data = await allCategoryLevel();
+				this.codeList = data.map(function(item) {
+					return { dictCode: item.id, dictValue: item.name };
+				});
+			},
+			async _getInfo(id) {
+				if (!id) return;
+				var res = null;
+				var resAll = null;
+				if (this.isInterior) {
+					res = await getInboundDetailsById(id);
+				} else if (this.isIds) {
+					resAll = await getInboundDetailsByIds(id);
+				} else {
+					res = await getInfoBySourceBizNoAll(id);
+					res = res[0] || {};
+				}
+				if (this.isIds) {
+					res = JSON.parse(JSON.stringify(resAll[0]));
+					this.extInfo = resAll[0].extInfo;
+					res['outInDetailList'] = [];
+					resAll.forEach(function(item) {
+						item.outInDetailList.forEach(function(val) {
+							val['bizNo'] = item.bizNo;
+							res['outInDetailList'].push(val);
+						});
+					});
+					res['bizNo'] = resAll.map(function(item) { return item.bizNo; });
+					this.infoData = res;
+				} else {
+					this.infoData = res;
+					this.extInfo = res.extInfo || {};
+				}
+				this.productList = (res && res.outInDetailList && res.outInDetailList.map(function(productItem) {
+					return {
+						productCode: productItem.categoryCode,
+						productName: productItem.categoryName,
+						categoryCode: productItem.categoryCode,
+						categoryName: productItem.categoryName,
+						categoryModel: productItem.categoryModel,
+						specification: productItem.specification,
+						brandNum: productItem.brandNum,
+						batchNo: productItem.batchNo,
+						packingQuantity: productItem.packingQuantity,
+						packingUnit: productItem.packingUnit,
+						measureQuantity: productItem.measureQuantity,
+						measureUnit: productItem.measureUnit,
+						weight: productItem.weight,
+						weightUnit: productItem.weightUnit,
+						modelKey: productItem.modelKey,
+						colorKey: productItem.colorKey,
+						warehouseName: productItem.warehouseName,
+						supplierName: productItem.supplierName,
+						supplierCode: productItem.supplierCode,
+						productionRequirements: productItem.productionRequirements,
+						isUnpack: productItem.isUnpack == 1 ? '是' : '否',
+						supplierName: productItem.supplierName,
+						outInDetailRecordRequestList: (productItem.outInDetailRecordRequestList && productItem.outInDetailRecordRequestList.map(function(packingItem) {
+							return {
+								productCode: packingItem.packageNo || packingItem.categoryCode,
+								productName: packingItem.categoryName || '包装',
+								categoryName: productItem.categoryName,
+								categoryCode: productItem.categoryCode,
+								categoryModel: productItem.categoryModel,
+								specification: productItem.specification,
+								brandNum: productItem.brandNum,
+								batchNo: packingItem.batchNo,
+								packageNo: packingItem.packageNo,
+								barcodes: packingItem.barcodes,
+								packingQuantity: packingItem.packingQuantity,
+								packingUnit: packingItem.packingUnit,
+								measureQuantity: packingItem.measureQuantity,
+								measureUnit: packingItem.measureUnit,
+								materielDesignation: packingItem.materielDesignation,
+								clientCode: packingItem.clientCode,
+								engrave: packingItem.engrave,
+								weight: packingItem.weight,
+								weightUnit: packingItem.weightUnit,
+								modelKey: packingItem.modelKey,
+								colorKey: packingItem.colorKey,
+								supplierName: productItem.supplierName,
+								supplierCode: productItem.supplierCode,
+								result: qualityResults[packingItem.result] != null ? qualityResults[packingItem.result] : packingItem.result,
+								status: qualityStatus[packingItem.status] != null ? qualityStatus[packingItem.status] : packingItem.status,
+								warehouseName: packingItem.warehouseName,
+								areaName: packingItem.areaName,
+								goodsShelfName: packingItem.goodsShelfName,
+								goodsAllocationName: packingItem.goodsAllocationName,
+								productionDate: packingItem.productionDate,
+								purchaseDate: packingItem.purchaseDate,
+								expireDate: packingItem.expireDate,
+							};
+						}))
+					};
+				})) || [];
+				// 获取包装维度数据
+				var arr = [];
+				var that = this;
+				this.productList.forEach(function(item) {
+					(item.outInDetailRecordRequestList || []).forEach(function(k) {
+						arr.push(k);
+					});
+				});
+				this.packingList = arr;
+				this.showPackingList = arr;
+			},
+			getTableValue() {
+				return {};
+			}
+		}
+	};
+</script>
+
+<style lang="scss" scoped>
+	.task-form-container {
+		min-height: 100vh;
+		background-color: #fff;
+	}
+</style>

+ 166 - 0
pages/home/wt/components/inBound/taskSubmit.vue

@@ -0,0 +1,166 @@
+<template>
+	<view class="">
+		<u--form style="margin: 0 20px;" labelPosition="left" :model="form" :rules="rules" ref="uForm"
+			labelWidth='140rpx'>
+			<u-form-item label="审批建议" prop="reason" required>
+				<u--textarea style="width: 100%;" height='120' border='surround' placeholder="请输入审批建议"
+					v-model="form.reason"></u--textarea>
+			</u-form-item>
+		</u--form>
+		<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: 45%;" :loading='loading' type="error" text="驳回" @click="rejectTask(0)"></u-button>
+		</view>
+		<!-- <view class="btnConcel">
+			<u-button @click="showAction = true">更多</u-button>
+		</view> -->
+		<u-action-sheet :actions="actionList" :closeOnClickOverlay="true" :closeOnClickAction="true" title="更多操作" :show="showAction" @close="showAction = false" @select="selectActionClick"></u-action-sheet>
+	</view>
+</template>
+
+<script>
+	import {
+		approveTaskWithVariables,
+		outApproveNotPass,
+		rejectTask,
+		cancelTask
+	} from '@/api/wt/index.js'
+	export default {
+		name: 'taskSubmit',
+		props: {
+			businessId: {
+				default: ''
+			},
+			taskId: {
+				default: ''
+			},
+			id: {
+				default: ''
+			},
+			taskDefinitionKey: {
+				default: ''
+			}
+		},
+
+		data() {
+			return {
+				showAction: false,
+				loading: false,
+				actionList: [{
+					name: '作废',
+					fontSize: '28',
+					color: '#ffaa7f'
+				}],
+				form: {
+					technicianId: '',
+					reason: '',
+				},
+				rules: {
+					reason: {
+						type: 'string',
+						required: true,
+						message: '请输入审批建议',
+						trigger: 'blur'
+					}
+				}
+			}
+		},
+		mounted() {
+			this.$refs.uForm.setRules(this.rules)
+		},
+		methods: {
+			selectActionClick(item) {
+				console.log('selectActionClick', item)
+				if (item.name == '作废') {
+					uni.showModal({
+						title: '提示',
+						content: '是否确认作废?',
+						success: (res) => {
+							if (res.confirm) {
+								this.loading = true
+								cancelTask({
+									taskId: this.taskId,
+									id: this.id,
+									reason: this.form.reason,
+									businessId: this.businessId,
+								}).then(() => {
+									if (res.code != '-1') {
+										this.loading = false
+										this.$emit('handleAudit', {
+											title: '作废'
+										});
+									}
+								}).catch(() => {
+									this.loading = false
+									this.$message.error("流程作废失败");
+								});
+							} else if (res.cancel) {
+								console.log('用户点击取消');
+							}
+						}
+					});
+				}
+			},
+			async handleAudit(status) {
+				if (!!status) await this.$refs.uForm.validate()
+				this.loading = true
+				await this._approveTaskWithVariables(status);
+			},
+			async _approveTaskWithVariables(status) {
+				let variables = {
+					pass: !!status
+				};
+				let res = await approveTaskWithVariables({
+					id: this.taskId,
+					reason: this.form.reason,
+					variables
+				})
+
+				if (res.code != '-1') {
+					this.$emit('handleAudit', {
+						status,
+						title: status === 0 ? '驳回' : ''
+					});
+				}
+				this.loading = false
+			},
+			async rejectTask(status) {
+				let variables = {
+					pass: !!status
+				};
+				let res = await outApproveNotPass({
+					id: this.taskId,
+					reason: this.form.reason,
+					outInId: this.businessId
+				})
+
+				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) => {
+						resolve(await data);
+					});
+				});
+			}
+		}
+	}
+</script>
+
+<style scoped>
+	.btnList {
+		display: flex;
+
+	}
+	.btnConcel {
+		margin-top: 20rpx;
+	}
+</style>

+ 4 - 4
pages/home/wt/components/outBound/taskForm.vue

@@ -122,8 +122,8 @@
 				// 物品清单字段配置
 				productFields: [
 					{ label: '仓库', field: 'warehouseName' },
-					{ label: '编码', field: 'categoryCode' },
-					{ label: '名称', field: 'categoryName' },
+					// { label: '编码', field: 'categoryCode' },
+					// { label: '名称', field: 'categoryName' },
 					{ label: '型号', field: 'categoryModel' },
 					{ label: '规格', field: 'specification' },
 					{ label: '牌号', field: 'brandNum' },
@@ -142,8 +142,8 @@
 				],
 				// 包装明细字段配置
 				packingFields: [
-					{ label: '编码', field: 'categoryCode' },
-					{ label: '名称', field: 'categoryName' },
+					// { label: '编码', field: 'categoryCode' },
+					// { label: '名称', field: 'categoryName' },
 					{ label: '批次号', field: 'batchNo' },
 					{ label: '发货条码', field: 'barcodes' },
 					{ label: '包装编码', field: 'packageNo' },

+ 7 - 8
pages/home/wt/components/outBound/taskSubmit.vue

@@ -13,9 +13,9 @@
 			</u-button>
 			<u-button style="width: 45%;" :loading='loading' type="error" text="驳回" @click="rejectTask(0)"></u-button>
 		</view>
-		<view class="btnConcel">
+		<!-- <view class="btnConcel">
 			<u-button @click="showAction = true">更多</u-button>
-		</view>
+		</view> -->
 		<u-action-sheet :actions="actionList" :closeOnClickOverlay="true" :closeOnClickAction="true" title="更多操作" :show="showAction" @close="showAction = false" @select="selectActionClick"></u-action-sheet>
 	</view>
 </template>
@@ -24,7 +24,8 @@
 	import {
 		approveTaskWithVariables,
 		rejectTask,
-		cancelTask
+		cancelTask,
+		outApproveNotPass
 	} from '@/api/wt/index.js'
 	export default {
 		name: 'taskSubmit',
@@ -126,13 +127,11 @@
 				this.loading = false
 			},
 			async rejectTask(status) {
-				let variables = {
-					pass: !!status
-				};
-				let res = await rejectTask({
+		
+				let res = await outApproveNotPass({
 					id: this.taskId,
 					reason: this.form.reason,
-					variables
+					outInId: this.businessId
 				})
 
 				if (res.code != '-1') {