Переглянути джерело

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

695593266@qq.com 7 місяців тому
батько
коміт
10191dfed6
35 змінених файлів з 2556 додано та 529 видалено
  1. 48 0
      api/inspectionWork/index.js
  2. 159 38
      enum/dict.js
  3. 3 3
      manifest.json
  4. 3 1
      mixins/dictMixins.js
  5. 38 30
      pages.json
  6. 242 5
      pages/home/wt/components/purchaseContract/taskForm.vue
  7. 44 2
      pages/home/wt/components/purchaseContract/taskSubmit.vue
  8. 55 2
      pages/home/wt/components/purchaseOrder/taskForm.vue
  9. 47 2
      pages/home/wt/components/purchaseOrder/taskSubmit.vue
  10. 48 2
      pages/home/wt/components/purchasePlanManage/taskSubmit.vue
  11. 255 10
      pages/home/wt/components/salesContract/taskForm.vue
  12. 47 2
      pages/home/wt/components/salesContract/taskSubmit.vue
  13. 58 2
      pages/home/wt/components/salesOrder/taskForm.vue
  14. 47 2
      pages/home/wt/components/salesOrder/taskSubmit.vue
  15. 380 306
      pages/index/index.vue
  16. 1 1
      pages/login/login.vue
  17. 47 27
      pages/maintenance/check/components/CheckCard.vue
  18. 4 1
      pages/maintenance/check/index.vue
  19. 1 0
      pages/maintenance/detail/detail.vue
  20. 12 1
      pages/maintenance/order/OrderTask.vue
  21. 2 1
      pages/maintenance/order/order.vue
  22. 1 1
      pages/maintenanceWorkorder/components/maintain_course.vue
  23. 2 2
      pages/maintenanceWorkorder/components/pickCard.vue
  24. 4 3
      pages/maintenanceWorkorder/sparepart/sparepart.vue
  25. 1 4
      pages/maintenanceWorkorder/sparepart/sparepartList.vue
  26. 233 0
      pages/qms/inspectionWork/index.vue
  27. 408 0
      pages/qms/inspectionWork/inspectionProjectReport.vue
  28. 133 0
      pages/qms/inspectionWork/unit.js
  29. 86 14
      pages/repair/repair/index.vue
  30. 73 30
      pages/tour_tally/check/components/CheckCard.vue
  31. 7 4
      pages/tour_tally/check/index.vue
  32. 1 1
      pages/tour_tally/detail/detail.vue
  33. 30 18
      pages/tour_tally/order/OrderTask.vue
  34. 5 5
      pages/warehouse/enterHouse/addStock.vue
  35. 31 9
      store/modules/dict.js

+ 48 - 0
api/inspectionWork/index.js

@@ -0,0 +1,48 @@
+import {
+	get,
+	put,
+	putJ,
+	postJ,
+	deleteApi
+} from "@/utils/request";
+import Vue from "vue";
+
+
+// 列表
+export async function getList(data) {
+
+
+	const res = await postJ(Vue.prototype.apiUrl + '/qms/quality_work_order/page', data);
+	if (res.code == 0) {
+		return res.data;
+	}
+	return Promise.reject(new Error(res.message));
+}
+
+
+export async function getById(id) {
+	const res = await get(Vue.prototype.apiUrl + `/qms/quality_work_order/getById/${id}`);
+	if (res.code == 0) {
+		return res.data;
+	}
+	return Promise.reject(new Error(res.message));
+}
+
+// 编辑
+export async function update(data) {
+	const res = await postJ(Vue.prototype.apiUrl + `/qms/quality_work_order/update`, data);
+	if (res.code == 0) {
+		return res.message;
+	}
+	return Promise.reject(new Error(res.message));
+}
+
+//单个质检项保存
+export async function exeReportWorkBySingleTemplate(data) {
+	const res = await postJ(Vue.prototype.apiUrl + `/qms/quality_work_order/exeReportWorkBySingleTemplate`, data);
+	if (res.code == 0) {
+		return res.message;
+	}
+	return Promise.reject(new Error(res.message));
+}
+

+ 159 - 38
enum/dict.js

@@ -1,56 +1,177 @@
 export default {
-  单位: 'unit',
-  条码分类: 'BARCODE',
-  资产类型: 'ASSECTSTYPE',
-  物品类型: 'classify',
-  产地: 'purchase_origin',
-  物品机型: 'product_model_key',
-  物品颜色: 'product_color_key',
-  流程实例的结果: 'bpm_process_instance_result',
+	单位: 'unit',
+	条码分类: 'BARCODE',
+	资产类型: 'ASSECTSTYPE',
+	物品类型: 'classify',
+	产地: 'purchase_origin',
+	物品机型: 'product_model_key',
+	物品颜色: 'product_color_key',
+	流程实例的结果: 'bpm_process_instance_result',
+	质检计划类型: 'inspection_plan_type',
+	质检标准类型: 'quality_testing_code',
+	取样类型: 'quality_method_code',
+
 }
 
 //发货审核状态
-export const reviewStatusEnum = [
-  { value: 0, label: '未提交' },
-  { value: 1, label: '审核中' },
-  { value: 2, label: '已审核' },
-  { value: 3, label: '审核未通过' },
-  { value: 7, label: '作废' },
+export const reviewStatusEnum = [{
+		value: 0,
+		label: '未提交'
+	},
+	{
+		value: 1,
+		label: '审核中'
+	},
+	{
+		value: 2,
+		label: '已审核'
+	},
+	{
+		value: 3,
+		label: '审核未通过'
+	},
+	{
+		value: 7,
+		label: '作废'
+	},
 ];
 
 //商品级别
-export const levelList = [
-  { value: '1', text: '特级' },
-  { value: '2', text: '一级' },
-  { value: '3', text: '二级' },
-  { value: '4', text: '三级' }
+export const levelList = [{
+		value: '1',
+		text: '特级'
+	},
+	{
+		value: '2',
+		text: '一级'
+	},
+	{
+		value: '3',
+		text: '二级'
+	},
+	{
+		value: '4',
+		text: '三级'
+	}
 ];
 
 //属性类型
 export const lbjtList = {
-  1: '自制件',
-  2: '采购件',
-  3: '外协件',
-  4: '受托件'
+	1: '自制件',
+	2: '采购件',
+	3: '外协件',
+	4: '受托件'
 };
 
 //需求类型
-export const requirementSourceType = [
-  { value: '1', text: '生产性物资采购' },
-  { value: '2', text: '非生产性物资采购' },
-  { value: '3', text: '带料生产委外' },
-  { value: '4', text: '不带料生产委外' },
-  { value: '5', text: '研发委外' },
-  { value: '6', text: '外协自供料采购' },
-  { value: '7', text: '外协客供料采购' },
-  { value: '8', text: '退货委外' },
-  { value: '9', text: '委外返修' },
-  { value: '99', text: '其他' }
+export const requirementSourceType = [{
+		value: '1',
+		text: '生产性物资采购'
+	},
+	{
+		value: '2',
+		text: '非生产性物资采购'
+	},
+	{
+		value: '3',
+		text: '带料生产委外'
+	},
+	{
+		value: '4',
+		text: '不带料生产委外'
+	},
+	{
+		value: '5',
+		text: '研发委外'
+	},
+	{
+		value: '6',
+		text: '外协自供料采购'
+	},
+	{
+		value: '7',
+		text: '外协客供料采购'
+	},
+	{
+		value: '8',
+		text: '退货委外'
+	},
+	{
+		value: '9',
+		text: '委外返修'
+	},
+	{
+		value: '99',
+		text: '其他'
+	}
 ];
 
 // 列表维度
-export const dimensionType = [
-  { value: 1, text: '物品维度' },
-  { value: 2, text: '批次维度' },
-  { value: 3, text: '包装维度' }
+export const dimensionType = [{
+		value: 1,
+		text: '物品维度'
+	},
+	{
+		value: 2,
+		text: '批次维度'
+	},
+	{
+		value: 3,
+		text: '包装维度'
+	}
+];
+
+export const transactionMethodsOp = [
+  {
+    value: 1,
+    label: '先票后款'
+  },
+  {
+    value: 2,
+    label: '先款后票'
+  }
+];
+
+export const shippingModeOp = [
+  {
+    value: 1,
+    label: '发货再对账'
+  },
+  {
+    value: 2,
+    label: '对账再发货'
+  }
+];
+
+export const shippingModePurchaseOp = [
+  {
+    value: 1,
+    label: '收货再对账'
+  },
+  {
+    value: 2,
+    label: '对账再收货'
+  }
+];
+
+// 计价方式
+export const pricingWayList = [
+  { id: 1, name: '按数量计价' },
+  { id: 2, name: '按重量计价' },
+  { id: 3, name: '按增重计价' }
+];
+
+export const quoteTypeOp = [
+  {
+    value: 1,
+    label: '常规价'
+  },
+  {
+    value: 2,
+    label: '内部价'
+  },
+  {
+    value: 3,
+    label: '议价'
+  }
 ];

+ 3 - 3
manifest.json

@@ -2,7 +2,7 @@
     "name" : "智慧工厂",
     "appid" : "__UNI__45B3907",
     "description" : "",
-    "versionName" : "V1.0.3.38",
+    "versionName" : "V1.0.3.42",
     "versionCode" : "100",
     "transformPx" : false,
     "h5" : {
@@ -12,8 +12,8 @@
                     // "target" : "http://192.168.1.110:18086/",
                     // "target" : "http://192.168.1.125:18086/",
                     // "target" : "http://192.168.1.251:18086/",
-                    // "target" : "http://192.168.1.251:18086/",
-                    "target" : "http://192.168.1.251:18186",
+                    "target" : "http://192.168.1.251:18086/",
+                    // "target" : "http://110.41.182.105/api/",
                     // "target": "http://116.63.185.248:80/api",
                     // "target" : "http://192.168.1.251:18186/",
                     "changeOrigin" : true,

+ 3 - 1
mixins/dictMixins.js

@@ -12,5 +12,7 @@ export default {
   },
   methods: {
     ...mapActions('dict', ['requestDict'])
-  }
+	
+  },
+  
 }

+ 38 - 30
pages.json

@@ -1682,7 +1682,7 @@
 			}
 		},
 
-				{
+		{
 			"path": "pages/pda/selfBuiltPickOrder/components/addPick",
 			"style": {
 				"navigationBarTitleText": "自建领料单",
@@ -1717,7 +1717,7 @@
 			}
 		},
 
-			{
+		{
 			"path": "pages/pda/selfBuiltPickOrder/index/index",
 			"style": {
 				"navigationBarTitleText": "自建领料单",
@@ -1768,7 +1768,7 @@
 			}
 		},
 
-				{
+		{
 			"path": "pages/pda/selfBuiltPickOrder/components/choosePickList",
 			"style": {
 				"navigationBarTitleText": "搜索",
@@ -1785,7 +1785,7 @@
 			}
 		},
 
-			{
+		{
 			"path": "pages/pda/selfBuiltPickOrder/components/selfBuiltPickOrderDetail",
 			"style": {
 				"navigationStyle": "custom",
@@ -1893,9 +1893,8 @@
 			}
 		},
 		{
-			"path" : "pages/pda/outsourcing/components/outsourcingDetail",
-			"style" : 
-			{
+			"path": "pages/pda/outsourcing/components/outsourcingDetail",
+			"style": {
 				"navigationStyle": "custom",
 				"navigationBarTextStyle": "white"
 			}
@@ -2113,7 +2112,7 @@
 				"navigationStyle": "custom",
 				"navigationBarTextStyle": "white"
 			}
-		}, 
+		},
 		{
 			"path": "pages/purchasingManage/components/selectProduce",
 			"style": {
@@ -2121,7 +2120,7 @@
 				"navigationStyle": "custom",
 				"navigationBarTextStyle": "white"
 			}
-		}, 
+		},
 		{
 			"path": "pages/purchasingManage/components/selectTaskName",
 			"style": {
@@ -2345,67 +2344,76 @@
 			}
 		},
 		{
-			"path" : "pages/traceability/traceabilityCode/purchase",
-			"style" : 
-			{
+			"path": "pages/traceability/traceabilityCode/purchase",
+			"style": {
 				"navigationBarTitleText": "采购溯源",
 				"navigationStyle": "custom",
 				"navigationBarTextStyle": "white"
 			}
 		},
 		{
-			"path" : "pages/traceability/traceabilityCode/production",
-			"style" : 
-			{
+			"path": "pages/traceability/traceabilityCode/production",
+			"style": {
 				"navigationBarTitleText": "生产溯源",
 				"navigationStyle": "custom",
 				"navigationBarTextStyle": "white"
 			}
 		},
 		{
-			"path" : "pages/traceability/traceabilityCode/quality",
-			"style" : 
-			{
+			"path": "pages/traceability/traceabilityCode/quality",
+			"style": {
 				"navigationBarTitleText": "质检溯源",
 				"navigationStyle": "custom",
 				"navigationBarTextStyle": "white"
 			}
 		},
 		{
-			"path" : "pages/traceability/traceabilityCode/company",
-			"style" : 
-			{
+			"path": "pages/traceability/traceabilityCode/company",
+			"style": {
 				"navigationBarTitleText": "企业信息",
 				"navigationStyle": "custom",
 				"navigationBarTextStyle": "white"
 			}
 		},
 		{
-			"path" : "pages/purchasingManage/purchaseNeedManage/index",
-			"style" : 
-			{
+			"path": "pages/purchasingManage/purchaseNeedManage/index",
+			"style": {
 				"navigationBarTitleText": "采购需求",
 				"navigationStyle": "custom",
 				"navigationBarTextStyle": "white"
 			}
 		},
 		{
-			"path" : "pages/purchasingManage/purchaseNeedManage/components/drawer",
-			"style" : 
-			{
+			"path": "pages/purchasingManage/purchaseNeedManage/components/drawer",
+			"style": {
 				"navigationBarTitleText": "采购需求详情",
 				"navigationStyle": "custom",
 				"navigationBarTextStyle": "white"
 			}
 		},
 		{
-			"path" : "pages/purchasingManage/purchaseNeedManage/add",
-			"style" : 
-			{
+			"path": "pages/purchasingManage/purchaseNeedManage/add",
+			"style": {
 				"navigationBarTitleText": "采购需求新增",
 				"navigationStyle": "custom",
 				"navigationBarTextStyle": "white"
 			}
+		},
+		{
+			"path": "pages/qms/inspectionWork/index",
+			"style": {
+				"navigationBarTitleText": "质检工单",
+				"navigationStyle": "custom",
+				"navigationBarTextStyle": "white"
+			}
+		},
+		{
+			"path": "pages/qms/inspectionWork/inspectionProjectReport",
+			"style": {
+				"navigationBarTitleText": "质检报工",
+				"navigationStyle": "custom",
+				"navigationBarTextStyle": "white"
+			}
 		}
 	],
 	"tabBar": {

+ 242 - 5
pages/home/wt/components/purchaseContract/taskForm.vue

@@ -12,10 +12,37 @@
 					<u--input style="width: 100%;" disabled :value='`${form.typeName} ${form.categoryName}`'></u--input>
 				</u-form-item>
 				<!-- @tap="showUserPicker" -->
+				
+				<u-form-item label="来源类型" prop="sourceType" borderBottom>
+					<u--input style="width: 100%;" disabled :value='`${form.sourceTypeName}`'>
+					</u--input>
+				</u-form-item>
+				<u-form-item v-if="form.sourceType && form.sourceName" :label="sourceName" prop="sourceName" borderBottom>
+					<u--input style="width: 100%;" disabled :value='`${form.sourceName}`'>
+					</u--input>
+				</u-form-item>
 				<u-form-item label="合同名称" prop="contractName" borderBottom>
 					<u--input style="width: 100%;" disabled v-model="form.contractName"></u--input>
 					<!-- <u-icon slot="right" name="arrow-right"></u-icon> -->
 				</u-form-item>
+				<u-form-item label="合同编号" prop="contractNumber" borderBottom>
+					<u--input style="width: 100%;" disabled v-model="form.contractNumber"></u--input>
+				</u-form-item>
+				<u-form-item label="需求类型" prop="requireSourceTypeName" borderBottom v-if="form.type == 2">
+					<u--input style="width: 100%;" disabled v-model="form.requireSourceTypeName"></u--input>
+				</u-form-item>
+				<u-form-item label="需求部门" prop="requireDeptName" borderBottom v-if="form.type == 2">
+					<u--input style="width: 100%;" disabled v-model="form.requireDeptName"></u--input>
+				</u-form-item>
+				<u-form-item label="需求人" prop="requireUserId" borderBottom v-if="form.type == 2">
+					<u--input style="width: 100%;" disabled v-model="form.requireUserName"></u--input>
+				</u-form-item>
+				<u-form-item :label="form.type == 2 ? '采购部门' : '销售部门'" prop="businessDeptName" borderBottom>
+					<u--input style="width: 100%;" disabled v-model="form.businessDeptName"></u--input>
+				</u-form-item>
+				<u-form-item :label="form.type == 2 ? '采购员' : '业务员'" prop="businessUserName" borderBottom>
+					<u--input style="width: 100%;" disabled v-model="form.businessUserName"></u--input>
+				</u-form-item>
 				<u-form-item label="编码" prop="contractNo" borderBottom>
 					<u--input style="width: 100%;" disabled v-model="form.contractNo"></u--input>
 				</u-form-item>
@@ -29,9 +56,24 @@
 				<u-form-item label="结束日期" prop="contractEndDate" borderBottom>
 					<u--input style="width: 100%;" disabled v-model="form.contractEndDate"></u--input>
 				</u-form-item>
+				<u-form-item label="交易方式" prop="transactionMode" borderBottom>
+					<u--input style="width: 100%;" disabled :value="form.transactionModeName"></u--input>
+				</u-form-item>
+				<u-form-item :label="form.type == 2 ? '收货模式' : '发货模式'" prop="deliveryMode" borderBottom>
+					<u--input style="width: 100%;" disabled :value="form.deliveryModeName"></u--input>
+				</u-form-item>
 				<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 v-if="form.settlementMode == 2 || form.settlementMode == 1" :label="form.settlementMode == 2 ? '结算月份范围' : '结算日期范围'" prop="settlementDate" borderBottom>
+					<u--input style="width: 100%;" disabled v-model="form.settlementDate"></u--input>
+				</u-form-item>
+				<u-form-item label="收款日期" prop="receiptDate" borderBottom v-if="form.settlementMode == 2">
+					<u--input style="width: 100%;" disabled v-model="form.receiptDate"></u--input>
+				</u-form-item>
+				<u-form-item label="期数" prop="issueNumber" borderBottom>
+					<u--input style="width: 100%;" disabled v-model="form.issueNumber"></u--input>
+				</u-form-item>
 				<u-form-item label="附件" prop="settlementModeName" borderBottom>
 				 <fileMain v-model="form.fileId" type="view"></fileMain>
 				</u-form-item>
@@ -136,6 +178,7 @@
 		getDetail
 	} from '@/api/wt/index.js'
 	import fileMain from "@/pages/doc/index.vue"
+	import {transactionMethodsOp,shippingModeOp,shippingModePurchaseOp, pricingWayList, levelList, quoteTypeOp} from '@/enum/dict.js'
 	export default {
 		components:{
 			fileMain
@@ -148,10 +191,111 @@
 				default: ''
 			},
 		},
+		computed: {
+			sourceName() {
+				console.log('this.form.sourceType',this.form.sourceType)
+				switch (this.form.sourceType) {
+					case 1:
+						return '报价单'
+					case 2:
+						return '核价单'
+					case 3:
+						return '计划名称'
+					case 4:
+						return '商机名称'
+					case 5:
+						return '退货单'
+					case 6:
+						return '客户'
+					case 7:
+						return '销售订单'
+					default:
+						return ''
+				}
+			},
+			shippingModeOptions() {
+				return this.form.type == 2 ? shippingModePurchaseOp : shippingModeOp;
+			},
+			feeTableField() {
+				return [{
+						label: '期数',
+						field: 'issueNumber',
+					}, 
+					{
+						label: '款项类型',
+						field: 'typeName',
+					},
+					{
+						label: '款项名称',
+						field: 'moneyName',
+					},
+					{
+						label: '比例(%)',
+						field: 'ratio',
+					},
+					{
+						label: this.form.type == 2 ? '计划付款金额(元)' : '计划收款金额(元)',
+						field: 'price',
+					},
+					{
+						label: this.form.type == 2 ? '计划付款日期' : '计划收款日期',
+						field: 'deadLine',
+					},
+					{
+						label: '说明',
+						field: 'remark',
+					}
+				]
+			},
+			list() {
+				return this.form.type == 2 ? ['合同信息', '基本信息', '产品清单', '付款计划'] : ['合同信息', '基本信息', '产品清单', '收款计划']
+			},
+		},
 		data() {
 			return {
+				pricingWayList,
+				quoteTypeOp,
+				levelList,
 				detailData: {},
 				form: {},
+				transactionMethodsOp,
+				sourceTypeList: [
+					{
+						code: 1,
+						name: '报价单',
+						parentId: '1'
+					},
+					{
+						code: 2,
+						name: '核价单',
+						parentId: '2'
+					},
+					{
+						code: 3,
+						name: '采购计划',
+						parentId: '2'
+					},
+					{
+						code: 4,
+						name: '商机',
+						parentId: '1'
+					},
+					{
+						code: 5,
+						name: '退货单',
+						parentId: '1'
+					},
+					{
+						code: 6,
+						name: '客户',
+						parentId: '1'
+					},
+					{
+						code: 7,
+						name: '销售订单',
+						parentId: '1'
+					}
+					],
 				tableField: [{
 						label: '类型',
 						field: 'productCategoryName',
@@ -163,7 +307,11 @@
 						label: '编码',
 						field: 'productCode',
 					},
+					{
+						field: 'pricingWayName',
+						label: '计价方式',
 
+					},
 					{
 						field: 'specification',
 						label: '规格',
@@ -179,19 +327,95 @@
 						field: 'customerMark',
 					},
 					{
-						label: '单价',
-						field: 'singlePrice',
+						label: '工序',
+						field: 'taskName',
 					},
 					{
 						label: '数量',
 						field: 'totalCount',
 					},
+					{
+						label: '价格类型',
+						field: 'goodsPriceType ',
+					},
+					{
+						label: '单价',
+						field: 'singlePrice',
+					},
+					{
+						label: '税率',
+						field: 'taxRate',
+					},
+					{
+						label: '不含税单价',
+						field: 'notaxSinglePrice',
+					},
+					{
+						label: '报价方式',
+						field: 'quoteWayName',
+					},
+					{
+						label: '折让比例',
+						field: 'discountRatio',
+					},
+					{
+						label: '折让单价',
+						field: 'discountSinglePrice',
+					},
 					{
 						label: '合计',
 						field: 'totalPrice',
 					},
+					{
+						label: '折让合计',
+						field: 'discountTotalPrice',
+					},
+					{
+						label: '生产要求',
+						field: 'productionRequirements',
+					},
+					{
+						label: '包装规格',
+						field: 'packingSpecification',
+					},
+					{
+						label: '计量数量',
+						field: 'totalCount',
+					},
+					{
+						label: '单重',
+						field: 'singleWeight',
+					},
+					{
+						label: '总重',
+						field: 'totalWeight',
+					},
+					{
+						label: '增重重量',
+						field: 'increaseTotalWeight',
+					},
+					{
+						label: '物品级别',
+						field: 'goodsLevelName',
+					},
+					{
+						label: '批次号',
+						field: 'batchNo',
+					},
+					{
+						label: '型号',
+						field: 'modelType',
+					},
+					{
+						label: '机型',
+						field: 'modelKey',
+					},
+					{
+						label: '颜色',
+						field: 'colorKey',
+					},
 				],
-				feeTableField: [{
+				feeTableField1: [{
 						label: '款项名称',
 						field: 'moneyName',
 					},
@@ -212,7 +436,7 @@
 						field: 'remark',
 					}
 				],
-				list: ['合同信息', '基本信息', '产品清单', '付款方式'],
+				list1: ['合同信息', '基本信息', '产品清单', '付款方式'],
 				curNow: 0
 			}
 		},
@@ -226,9 +450,22 @@
 			async getDetailData(id) {
 				const data = await getDetail(id);
 				if (data) {
+					const {contractVO} = data
+					console.log('data~~~',data)
+					contractVO['sourceTypeName'] = this.sourceTypeList.find(item => item.code == contractVO['sourceType'])?.name || '';
+					contractVO['transactionModeName'] = this.transactionMethodsOp.find(item => item.value == contractVO['transactionMode'])?.label || '';
+					contractVO['deliveryModeName'] = this.shippingModeOptions.find(item => item.value == contractVO['deliveryMode'])?.label || '';
+					contractVO['settlementDate'] = contractVO.startSettlementDate ? `${contractVO.startSettlementDate} - ${contractVO.endSettlementDate}` : '';
 					data['receiptPaymentList'] = data['receiptPaymentList'].length ? data['receiptPaymentList'] : [{}]
+					data.productList = data.productList.map(item => {
+						item.pricingWayName = this.pricingWayList.find(way => way.id == item.pricingWay)?.name || '';
+						item.quoteWayName = this.quoteTypeOp.find(type => type.value == item.quoteType)?.label || '';
+						item.goodsLevelName = this.levelList.find(level => level.value == item.goodsLevel)?.label || '';
+						return item;
+					})
 					this.detailData = data;
-					this.form = data.contractVO;
+					this.form = contractVO;
+
 				}
 			}
 		}

+ 44 - 2
pages/home/wt/components/purchaseContract/taskSubmit.vue

@@ -13,14 +13,18 @@
 			</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,
-		rejectTask
+		rejectTask,
+		cancelTask
 	} from '@/api/wt/index.js'
 	export default {
 		name: 'taskSubmit',
@@ -41,7 +45,13 @@
 
 		data() {
 			return {
+				showAction: false,
 				loading: false,
+				actionList: [{
+					name: '作废',
+					fontSize: '28',
+					color: '#ffaa7f'
+				}],
 				form: {
 					technicianId: '',
 					reason: '',
@@ -60,6 +70,38 @@
 			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

+ 55 - 2
pages/home/wt/components/purchaseOrder/taskForm.vue

@@ -114,6 +114,22 @@
 			</view>
 
 		</view>
+		<view v-show='curNow===3'>
+			<view v-for="(item,index) in form['receiptPaymentList']" :key="index">
+				<u--form style="margin: 0 20px;" labelPosition="left" :model="form" ref="uForm" labelWidth='140rpx'>
+					<u-row v-for="(key,index1) in feeTableField" :key="index1">
+						<u-col :span="12">
+							<u-form-item :label="key.label" prop="categoryName" borderBottom>
+								<u--input style="width: 100%;" :title='item[key.field]' disabled
+									v-model="item[key.field]"></u--input>
+							</u-form-item>
+						</u-col>
+
+					</u-row>
+				</u--form>
+				<u-gap height="40" bgColor="#f0f0f0"></u-gap>
+			</view>
+		</view>
 	</view>
 </template>
 
@@ -122,6 +138,7 @@
 		purchaseOrderGetByIdAPI
 	} from '@/api/wt/index.js'
 	import fileMain from "@/pages/doc/index.vue"
+	import {transactionMethodsOp,shippingModeOp,shippingModePurchaseOp, pricingWayList, levelList, quoteTypeOp} from '@/enum/dict.js'
 	export default {
 		components: {
 			fileMain
@@ -134,6 +151,42 @@
 				default: ''
 			},
 		},
+		computed: {
+			shippingModeOptions() {
+				return this.form.type == 2 ? shippingModePurchaseOp : shippingModeOp;
+			},
+			feeTableField() {
+				return [{
+						label: '期数',
+						field: 'issueNumber',
+					}, 
+					{
+						label: '款项类型',
+						field: 'typeName',
+					},
+					{
+						label: '款项名称',
+						field: 'moneyName',
+					},
+					{
+						label: '比例(%)',
+						field: 'ratio',
+					},
+					{
+						label: this.form.type == 2 ? '计划付款金额(元)' : '计划收款金额(元)',
+						field: 'price',
+					},
+					{
+						label: this.form.type == 2 ? '计划付款日期' : '计划收款日期',
+						field: 'deadLine',
+					},
+					{
+						label: '说明',
+						field: 'remark',
+					}
+				]
+			},
+		},
 		data() {
 			return {
 				form: {},
@@ -161,7 +214,7 @@
 					},
 					{
 						label: '供应商代号',
-						field: 'customerMark',
+						field: 'supplierMark',
 					},
 					{
 						label: '单价',
@@ -176,7 +229,7 @@
 						field: 'totalPrice',
 					},
 				],
-				list: ['订单信息', '基本信息', '产品清单'],
+				list: ['订单信息', '基本信息', '产品清单', '付款计划'],
 				curNow: 0
 			}
 		},

+ 47 - 2
pages/home/wt/components/purchaseOrder/taskSubmit.vue

@@ -13,14 +13,18 @@
 			</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,
-		rejectTask
+		rejectTask,
+		cancelTask
 	} from '@/api/wt/index.js'
 	export default {
 		name: 'taskSubmit',
@@ -42,6 +46,12 @@
 		data() {
 			return {
 				loading: false,
+				showAction: false,
+				actionList: [{
+					name: '作废',
+					fontSize: '28',
+					color: '#ffaa7f'
+				}],
 				form: {
 					technicianId: '',
 					reason: '',
@@ -60,6 +70,38 @@
 			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
@@ -118,4 +160,7 @@
 		display: flex;
 
 	}
+	.btnConcel {
+		margin-top: 20rpx;
+	}
 </style>

+ 48 - 2
pages/home/wt/components/purchasePlanManage/taskSubmit.vue

@@ -18,6 +18,10 @@
 			<u-button style="width: 100%;" :loading='loading' type="error" icon="close" text="驳回"
 				@click="handleAudit(0)" v-if="!['starter'].includes(taskDefinitionKey)"></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>
 		<u-picker itemHeight='60' :show="technicianShow" visibleItemCount='10' :columns="userOptions" keyName="name"
 			@confirm='selectTechnicianInfo' @cancel='technicianShow = false' title='选择负责人'></u-picker>
 	</view>
@@ -26,7 +30,8 @@
 <script>
 	import {
 		approveTaskWithVariables,
-		AssignPurchasePlanUserAPI
+		AssignPurchasePlanUserAPI,
+		cancelTask
 	} from '@/api/wt/index.js'
 	import {
 		listAllUserBind
@@ -50,7 +55,13 @@
 
 		data() {
 			return {
+				showAction: false,
 				loading: false,
+				actionList: [{
+					name: '作废',
+					fontSize: '28',
+					color: '#ffaa7f'
+				}],
 				technicianShow: false,
 				userOptions: [],
 				form: {
@@ -79,6 +90,38 @@
 			this.getUserOptions()
 		},
 		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 getUserOptions() {
 				const data = await listAllUserBind()
 				this.userOptions.push(data)
@@ -140,5 +183,8 @@
 	}
 </script>
 
-<style>
+<style scoped>
+.btnConcel {
+		margin-top: 20rpx;
+	}
 </style>

+ 255 - 10
pages/home/wt/components/salesContract/taskForm.vue

@@ -12,10 +12,36 @@
 					<u--input style="width: 100%;" disabled :value='`${form.typeName} ${form.categoryName}`'></u--input>
 				</u-form-item>
 				<!-- @tap="showUserPicker" -->
+				<u-form-item label="来源类型" prop="sourceType" borderBottom>
+					<u--input style="width: 100%;" disabled :value='`${form.sourceTypeName}`'>
+					</u--input>
+				</u-form-item>
+				<u-form-item v-if="form.sourceType && form.sourceName" :label="sourceName" prop="sourceName" borderBottom>
+					<u--input style="width: 100%;" disabled :value='`${form.sourceName}`'>
+					</u--input>
+				</u-form-item>
 				<u-form-item label="合同名称" prop="contractName" borderBottom>
 					<u--input style="width: 100%;" disabled v-model="form.contractName"></u--input>
 					<!-- <u-icon slot="right" name="arrow-right"></u-icon> -->
 				</u-form-item>
+				<u-form-item label="合同编号" prop="contractNumber" borderBottom>
+					<u--input style="width: 100%;" disabled v-model="form.contractNumber"></u--input>
+				</u-form-item>
+				<u-form-item label="需求类型" prop="requireSourceTypeName" borderBottom v-if="form.type == 2">
+					<u--input style="width: 100%;" disabled v-model="form.requireSourceTypeName"></u--input>
+				</u-form-item>
+				<u-form-item label="需求部门" prop="requireDeptName" borderBottom v-if="form.type == 2">
+					<u--input style="width: 100%;" disabled v-model="form.requireDeptName"></u--input>
+				</u-form-item>
+				<u-form-item label="需求人" prop="requireUserId" borderBottom v-if="form.type == 2">
+					<u--input style="width: 100%;" disabled v-model="form.requireUserName"></u--input>
+				</u-form-item>
+				<u-form-item :label="form.type == 2 ? '采购部门' : '销售部门'" prop="businessDeptName" borderBottom>
+					<u--input style="width: 100%;" disabled v-model="form.businessDeptName"></u--input>
+				</u-form-item>
+				<u-form-item :label="form.type == 2 ? '采购员' : '业务员'" prop="businessUserName" borderBottom>
+					<u--input style="width: 100%;" disabled v-model="form.businessUserName"></u--input>
+				</u-form-item>
 				<u-form-item label="编码" prop="contractNo" borderBottom>
 					<u--input style="width: 100%;" disabled v-model="form.contractNo"></u--input>
 				</u-form-item>
@@ -29,9 +55,24 @@
 				<u-form-item label="结束日期" prop="contractEndDate" borderBottom>
 					<u--input style="width: 100%;" disabled v-model="form.contractEndDate"></u--input>
 				</u-form-item>
+				<u-form-item label="交易方式" prop="transactionMode" borderBottom>
+					<u--input style="width: 100%;" disabled :value="form.transactionModeName"></u--input>
+				</u-form-item>
+				<u-form-item :label="form.type == 2 ? '收货模式' : '发货模式'" prop="deliveryMode" borderBottom>
+					<u--input style="width: 100%;" disabled :value="form.deliveryModeName"></u--input>
+				</u-form-item>
 				<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 v-if="form.settlementMode == 2 || form.settlementMode == 1" :label="form.settlementMode == 2 ? '结算月份范围' : '结算日期范围'" prop="settlementDate" borderBottom>
+					<u--input style="width: 100%;" disabled v-model="form.settlementDate"></u--input>
+				</u-form-item>
+				<u-form-item label="收款日期" prop="receiptDate" borderBottom v-if="form.settlementMode == 2">
+					<u--input style="width: 100%;" disabled v-model="form.receiptDate"></u--input>
+				</u-form-item>
+				<u-form-item label="期数" prop="issueNumber" borderBottom>
+					<u--input style="width: 100%;" disabled v-model="form.issueNumber"></u--input>
+				</u-form-item>
 				<u-form-item label="附件" prop="settlementModeName" borderBottom>
 				 <fileMain v-model="form.fileId" type="view"></fileMain>
 				</u-form-item>
@@ -135,6 +176,8 @@
 		getDetail
 	} from '@/api/wt/index.js'
 	import fileMain from "@/pages/doc/index.vue"
+	import {transactionMethodsOp,shippingModeOp,shippingModePurchaseOp, pricingWayList, levelList, quoteTypeOp} from '@/enum/dict.js'
+		
 	export default {
 		components:{fileMain},
 		props: {
@@ -145,10 +188,111 @@
 				default: ''
 			},
 		},
+		computed: {
+			sourceName() {
+				console.log('this.form.sourceType',this.form.sourceType)
+				switch (this.form.sourceType) {
+					case 1:
+						return '报价单'
+					case 2:
+						return '核价单'
+					case 3:
+						return '计划名称'
+					case 4:
+						return '商机名称'
+					case 5:
+						return '退货单'
+					case 6:
+						return '客户'
+					case 7:
+						return '销售订单'
+					default:
+						return ''
+				}
+			},
+			shippingModeOptions() {
+				return this.form.type == 2 ? shippingModePurchaseOp : shippingModeOp;
+			},
+			feeTableField() {
+				return [{
+						label: '期数',
+						field: 'issueNumber',
+					}, 
+					{
+						label: '款项类型',
+						field: 'typeName',
+					},
+					{
+						label: '款项名称',
+						field: 'moneyName',
+					},
+					{
+						label: '比例(%)',
+						field: 'ratio',
+					},
+					{
+						label: this.form.type == 2 ? '计划付款金额(元)' : '计划收款金额(元)',
+						field: 'price',
+					},
+					{
+						label: this.form.type == 2 ? '计划付款日期' : '计划收款日期',
+						field: 'deadLine',
+					},
+					{
+						label: '说明',
+						field: 'remark',
+					}
+				]
+			},
+			list() {
+				return this.form.type == 2 ? ['合同信息', '基本信息', '产品清单', '付款计划'] : ['合同信息', '基本信息', '产品清单', '收款计划']
+			},
+		},
 		data() {
 			return {
+				pricingWayList,
+				quoteTypeOp,
+				levelList,
 				detailData: {},
 				form: {},
+				transactionMethodsOp,
+				sourceTypeList: [
+					{
+						code: 1,
+						name: '报价单',
+						parentId: '1'
+					},
+					{
+						code: 2,
+						name: '核价单',
+						parentId: '2'
+					},
+					{
+						code: 3,
+						name: '采购计划',
+						parentId: '2'
+					},
+					{
+						code: 4,
+						name: '商机',
+						parentId: '1'
+					},
+					{
+						code: 5,
+						name: '退货单',
+						parentId: '1'
+					},
+					{
+						code: 6,
+						name: '客户',
+						parentId: '1'
+					},
+					{
+						code: 7,
+						name: '销售订单',
+						parentId: '1'
+					}
+					],
 				tableField: [{
 						label: '类型',
 						field: 'productCategoryName',
@@ -160,6 +304,11 @@
 						label: '编码',
 						field: 'productCode',
 					},
+					{
+						field: 'pricingWayName',
+						label: '计价方式',
+
+					},
 					{
 						field: 'specification',
 						label: '规格',
@@ -175,32 +324,116 @@
 						field: 'customerMark',
 					},
 					{
-						label: '单价',
-						field: 'singlePrice',
+						label: '工序',
+						field: 'taskName',
 					},
 					{
 						label: '数量',
 						field: 'totalCount',
 					},
+					{
+						label: '价格类型',
+						field: 'goodsPriceType ',
+					},
+					{
+						label: '单价',
+						field: 'singlePrice',
+					},
+					{
+						label: '税率',
+						field: 'taxRate',
+					},
+					{
+						label: '不含税单价',
+						field: 'notaxSinglePrice',
+					},
+					{
+						label: '报价方式',
+						field: 'quoteWayName',
+					},
+					{
+						label: '折让比例',
+						field: 'discountRatio',
+					},
+					{
+						label: '折让单价',
+						field: 'discountSinglePrice',
+					},
 					{
 						label: '合计',
 						field: 'totalPrice',
 					},
+					{
+						label: '折让合计',
+						field: 'discountTotalPrice',
+					},
+					{
+						label: '生产要求',
+						field: 'productionRequirements',
+					},
+					{
+						label: '包装规格',
+						field: 'packingSpecification',
+					},
+					{
+						label: '计量数量',
+						field: 'totalCount',
+					},
+					{
+						label: '单重',
+						field: 'singleWeight',
+					},
+					{
+						label: '总重',
+						field: 'totalWeight',
+					},
+					{
+						label: '增重重量',
+						field: 'increaseTotalWeight',
+					},
+					{
+						label: '物品级别',
+						field: 'goodsLevelName',
+					},
+					{
+						label: '批次号',
+						field: 'batchNo',
+					},
+					{
+						label: '型号',
+						field: 'modelType',
+					},
+					{
+						label: '机型',
+						field: 'modelKey',
+					},
+					{
+						label: '颜色',
+						field: 'colorKey',
+					},
 				],
-				feeTableField: [{
-						label: '款项名称',
-						field: 'moneyName',
+				feeTableField1: [{
+						label: '期数',
+						field: 'issueNumber',
+					}, 
+					{
+						label: '款项类型',
+						field: 'type',
 					},
 					{
-						label: '金额(元)',
-						field: 'price',
+						label: '款项名称',
+						field: 'moneyName',
 					},
 					{
 						label: '比例(%)',
 						field: 'ratio',
 					},
 					{
-						label: '截止日期',
+						label: '计划付款金额(元)',
+						field: 'price',
+					},
+					{
+						label: '计划付款日期',
 						field: 'deadLine',
 					},
 					{
@@ -208,7 +441,7 @@
 						field: 'remark',
 					}
 				],
-				list: ['合同信息', '基本信息', '产品清单', '付款方式'],
+				list1: ['合同信息', '基本信息', '产品清单', '付款计划'],
 				curNow: 0
 			}
 		},
@@ -222,9 +455,21 @@
 			async getDetailData(id) {
 				const data = await getDetail(id);
 				if (data) {
+					const {contractVO} = data
+					console.log('data~~~',data)
+					contractVO['sourceTypeName'] = this.sourceTypeList.find(item => item.code == contractVO['sourceType'])?.name || '';
+					contractVO['transactionModeName'] = this.transactionMethodsOp.find(item => item.value == contractVO['transactionMode'])?.label || '';
+					contractVO['deliveryModeName'] = this.shippingModeOptions.find(item => item.value == contractVO['deliveryMode'])?.label || '';
+					contractVO['settlementDate'] = contractVO.startSettlementDate ? `${contractVO.startSettlementDate} - ${contractVO.endSettlementDate}` : '';
 					data['receiptPaymentList'] = data['receiptPaymentList'].length ? data['receiptPaymentList'] : [{}]
+					data.productList = data.productList.map(item => {
+						item.pricingWayName = this.pricingWayList.find(way => way.id == item.pricingWay)?.name || '';
+						item.quoteWayName = this.quoteTypeOp.find(type => type.value == item.quoteType)?.label || '';
+						item.goodsLevelName = this.levelList.find(level => level.value == item.goodsLevel)?.label || '';
+						return item;
+					})
 					this.detailData = data;
-					this.form = data.contractVO;
+					this.form = contractVO;
 
 				}
 			}

+ 47 - 2
pages/home/wt/components/salesContract/taskSubmit.vue

@@ -13,14 +13,18 @@
 			</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,
-		rejectTask
+		rejectTask,
+		cancelTask
 	} from '@/api/wt/index.js'
 	export default {
 		name: 'taskSubmit',
@@ -41,7 +45,13 @@
 
 		data() {
 			return {
+				showAction: false,
 				loading: false,
+				actionList: [{
+					name: '作废',
+					fontSize: '28',
+					color: '#ffaa7f'
+				}],
 				form: {
 					technicianId: '',
 					reason: '',
@@ -60,6 +70,38 @@
 			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
@@ -117,4 +159,7 @@
 		display: flex;
 
 	}
+	.btnConcel {
+		margin-top: 20rpx;
+	}
 </style>

+ 58 - 2
pages/home/wt/components/salesOrder/taskForm.vue

@@ -102,6 +102,22 @@
 			</view>
 
 		</view>
+		<view v-show='curNow===3'>
+			<view v-for="(item,index) in form['receiptPaymentList']" :key="index">
+				<u--form style="margin: 0 20px;" labelPosition="left" :model="form" ref="uForm" labelWidth='140rpx'>
+					<u-row v-for="(key,index1) in feeTableField" :key="index1">
+						<u-col :span="12">
+							<u-form-item :label="key.label" prop="categoryName" borderBottom>
+								<u--input style="width: 100%;" :title='item[key.field]' disabled
+									v-model="item[key.field]"></u--input>
+							</u-form-item>
+						</u-col>
+
+					</u-row>
+				</u--form>
+				<u-gap height="40" bgColor="#f0f0f0"></u-gap>
+			</view>
+		</view>
 	</view>
 </template>
 
@@ -110,6 +126,7 @@
 		getSaleOrderDetailAPI
 	} from '@/api/wt/index.js'
 	import fileMain from "@/pages/doc/index.vue"
+	import {transactionMethodsOp,shippingModeOp,shippingModePurchaseOp, pricingWayList, levelList, quoteTypeOp} from '@/enum/dict.js'
 	export default {
 		components: {
 			fileMain
@@ -122,6 +139,42 @@
 				default: ''
 			},
 		},
+		computed: {
+			shippingModeOptions() {
+				return this.form.type == 2 ? shippingModePurchaseOp : shippingModeOp;
+			},
+			feeTableField() {
+				return [{
+						label: '期数',
+						field: 'issueNumber',
+					}, 
+					{
+						label: '款项类型',
+						field: 'typeName',
+					},
+					{
+						label: '款项名称',
+						field: 'moneyName',
+					},
+					{
+						label: '比例(%)',
+						field: 'ratio',
+					},
+					{
+						label: this.form.type == 2 ? '计划付款金额(元)' : '计划收款金额(元)',
+						field: 'price',
+					},
+					{
+						label: this.form.type == 2 ? '计划付款日期' : '计划收款日期',
+						field: 'deadLine',
+					},
+					{
+						label: '说明',
+						field: 'remark',
+					}
+				]
+			},
+		},
 		data() {
 			return {
 				form: {},
@@ -171,7 +224,7 @@
 						field: 'discountTotalPrice',
 					},
 				],
-				list: ['订单信息', '基本信息', '产品清单'],
+				list: ['订单信息', '基本信息', '产品清单', '收款计划'],
 				curNow: 0
 			}
 		},
@@ -190,5 +243,8 @@
 	}
 </script>
 
-<style>
+<style scoped>
+.btnConcel {
+		margin-top: 20rpx;
+	}
 </style>

+ 47 - 2
pages/home/wt/components/salesOrder/taskSubmit.vue

@@ -13,14 +13,18 @@
 			</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,
-		rejectTask
+		rejectTask,
+		cancelTask
 	} from '@/api/wt/index.js'
 	export default {
 		name: 'taskSubmit',
@@ -41,7 +45,13 @@
 
 		data() {
 			return {
+				showAction: false,
 				loading: false,
+				actionList: [{
+					name: '作废',
+					fontSize: '28',
+					color: '#ffaa7f'
+				}],
 				form: {
 					technicianId: '',
 					reason: '',
@@ -60,6 +70,38 @@
 			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
@@ -117,4 +159,7 @@
 		display: flex;
 
 	}
+	.btnConcel {
+		margin-top: 20rpx;
+	}
 </style>

+ 380 - 306
pages/index/index.vue

@@ -1,33 +1,49 @@
 <template>
-	<view>
-		<uni-nav-bar fixed="true" statusBar="true" title="工作台" right-icon="scan"
-			@clickRight="HandlScanCode"></uni-nav-bar>
-		<view>
-			<CellTip title="协同办公" v-if="internalManagementList.length > 0"></CellTip>
-			<view class="nav">
-				<view class="nav-content">
-					<view class="nav-item" v-for="(item, index) in internalManagementList" @click="toNav(item.path)">
-						<span :class="'iconfont ' + item.icon"></span>
-						<i class="badge" v-if="item.badge">{{ item.badge }}</i>
-						<label>{{ item.name }}</label>
-					</view>
-				</view>
-			</view>
-		</view>
-		<view>
-			<CellTip title="生产管理" v-if="productionList.length > 0"></CellTip>
-			<view class="nav">
-				<view class="nav-content">
-					<view class="nav-item" v-for="item in productionList" :key="item.link_url"
-						@click="toNav(item.path)">
-						<span :class="'iconfont ' + item.icon"></span>
-						<label>{{ item.title }}</label>
-						<label>{{ item.num }}</label>
-					</view>
-				</view>
-			</view>
-		</view>
-		<!-- <view>
+  <view>
+    <uni-nav-bar
+      fixed="true"
+      statusBar="true"
+      title="工作台"
+      right-icon="scan"
+      @clickRight="HandlScanCode"
+    ></uni-nav-bar>
+    <view>
+      <CellTip
+        title="协同办公"
+        v-if="internalManagementList.length > 0"
+      ></CellTip>
+      <view class="nav">
+        <view class="nav-content">
+          <view
+            class="nav-item"
+            v-for="(item, index) in internalManagementList"
+            @click="toNav(item.path)"
+          >
+            <span :class="'iconfont ' + item.icon"></span>
+            <i class="badge" v-if="item.badge">{{ item.badge }}</i>
+            <label>{{ item.name }}</label>
+          </view>
+        </view>
+      </view>
+    </view>
+    <view>
+      <CellTip title="生产管理" v-if="productionList.length > 0"></CellTip>
+      <view class="nav">
+        <view class="nav-content">
+          <view
+            class="nav-item"
+            v-for="item in productionList"
+            :key="item.link_url"
+            @click="toNav(item.path)"
+          >
+            <span :class="'iconfont ' + item.icon"></span>
+            <label>{{ item.title }}</label>
+            <label>{{ item.num }}</label>
+          </view>
+        </view>
+      </view>
+    </view>
+    <!-- <view>
       <CellTip title="生产执行"></CellTip>
       <view class="nav">
         <view class="nav-content">
@@ -43,92 +59,152 @@
         </view>
       </view>
     </view> -->
-		<view>
-			<CellTip title="运维管理" v-if="operationsList.length > 0"></CellTip>
-			<view class="nav">
-				<view class="nav-content">
-					<view class="nav-item" v-for="(item, index) in operationsList" @click="toNav(item.path)">
-						<span :class="'iconfont ' + item.icon"></span>
-						<i class="badge" v-if="item.badge">{{ item.badge }}</i>
-						<label>{{ item.name }}</label>
-					</view>
-				</view>
-			</view>
-		</view>
-		<view>
-			<CellTip title="售后服务管理" v-if="serviceList.length > 0"></CellTip>
-			<view class="nav">
-				<view class="nav-content">
-					<view class="nav-item" v-for="(item, index) in serviceList" @click="toNav(item.path)">
-						<span :class="'iconfont ' + item.icon"></span>
-						<i class="badge" v-if="item.badge">{{ item.badge }}</i>
-						<label>{{ item.name }}</label>
-					</view>
-				</view>
-			</view>
-		</view>
-		<view>
-			<CellTip title="仓储管理" v-if="warehousingList.length > 0"></CellTip>
+    <view>
+      <CellTip title="运维管理" v-if="operationsList.length > 0"></CellTip>
+      <view class="nav">
+        <view class="nav-content">
+          <view
+            class="nav-item"
+            v-for="(item, index) in operationsList"
+            @click="toNav(item.path)"
+          >
+            <span :class="'iconfont ' + item.icon"></span>
+            <i class="badge" v-if="item.badge">{{ item.badge }}</i>
+            <label>{{ item.name }}</label>
+          </view>
+        </view>
+      </view>
+    </view>
+    <view>
+      <CellTip title="售后服务管理" v-if="serviceList.length > 0"></CellTip>
+      <view class="nav">
+        <view class="nav-content">
+          <view
+            class="nav-item"
+            v-for="(item, index) in serviceList"
+            @click="toNav(item.path)"
+          >
+            <span :class="'iconfont ' + item.icon"></span>
+            <i class="badge" v-if="item.badge">{{ item.badge }}</i>
+            <label>{{ item.name }}</label>
+          </view>
+        </view>
+      </view>
+    </view>
+    <view>
+      <CellTip title="仓储管理" v-if="warehousingList.length > 0"></CellTip>
 
-			<view class="nav">
-				<view class="nav-content">
-					<view class="nav-item" v-for="(item, index) in warehousingList" @click="toNav(item.path)">
-						<span :class="'iconfont ' + item.icon"></span>
-						<label>{{ item.title }}</label>
-						<!-- <label>{{ item.num }}</label> -->
-					</view>
-				</view>
-			</view>
-		</view>
-		<view>
-			<CellTip title="运输管理" v-if="dispatchList.length > 0"></CellTip>
-			<view class="nav">
-				<view class="nav-content">
-					<view class="nav-item" v-for="(item, index) in dispatchList" @click="toNav(item.url)">
-						<span :class="'iconfont ' + item.icon"></span>
-						<i class="badge" v-if="item.badge">{{ item.badge }}</i>
-						<label>{{ item.name }}</label>
-					</view>
-				</view>
-			</view>
-		</view>
-		<view>
-			<CellTip title="营销管理" v-if="saleManageList.length > 0"></CellTip>
-			<view class="nav">
-				<view class="nav-content">
-					<view class="nav-item" v-for="(item, index) in saleManageList" @click="toNav(item.path)">
-						<span :class="'iconfont ' + item.icon"></span>
-						<i class="badge" v-if="item.badge">{{ item.badge }}</i>
-						<label>{{ item.name }}</label>
-					</view>
-				</view>
-			</view>
-		</view>
-		<view>
-			<CellTip title="采购管理" v-if="purchaseManageList.length > 0"></CellTip>
-			<view class="nav">
-				<view class="nav-content">
-					<view class="nav-item" v-for="(item, index) in purchaseManageList" @click="toNav(item.path)">
-						<span :class="'iconfont ' + item.icon"></span>
-						<i class="badge" v-if="item.badge">{{ item.badge }}</i>
-						<label>{{ item.name }}</label>
-					</view>
-				</view>
-			</view>
-		</view>
-		<view>
-			<CellTip title="溯源管理" v-if="traceabilityList.length > 0"></CellTip>
-			<view class="nav">
-				<view class="nav-content">
-					<view class="nav-item" v-for="(item, index) in traceabilityList" @click="toNav(item.path)">
-						<span :class="'iconfont ' + item.icon"></span>
-						<i class="badge" v-if="item.badge">{{ item.badge }}</i>
-						<label>{{ item.name }}</label>
-					</view>
-				</view>
-			</view>
-		</view>
-		<!--    <view>
+      <view class="nav">
+        <view class="nav-content">
+          <view
+            class="nav-item"
+            v-for="(item, index) in warehousingList"
+            @click="toNav(item.path)"
+          >
+            <span :class="'iconfont ' + item.icon"></span>
+            <label>{{ item.title }}</label>
+            <!-- <label>{{ item.num }}</label> -->
+          </view>
+        </view>
+      </view>
+    </view>
+    <view>
+      <CellTip title="运输管理" v-if="dispatchList.length > 0"></CellTip>
+      <view class="nav">
+        <view class="nav-content">
+          <view
+            class="nav-item"
+            v-for="(item, index) in dispatchList"
+            @click="toNav(item.url)"
+          >
+            <span :class="'iconfont ' + item.icon"></span>
+            <i class="badge" v-if="item.badge">{{ item.badge }}</i>
+            <label>{{ item.name }}</label>
+          </view>
+        </view>
+      </view>
+    </view>
+    <view>
+      <CellTip title="营销管理" v-if="saleManageList.length > 0"></CellTip>
+      <view class="nav">
+        <view class="nav-content">
+          <view
+            class="nav-item"
+            v-for="(item, index) in saleManageList"
+            @click="toNav(item.path)"
+          >
+            <span :class="'iconfont ' + item.icon"></span>
+            <i class="badge" v-if="item.badge">{{ item.badge }}</i>
+            <label>{{ item.name }}</label>
+          </view>
+        </view>
+      </view>
+    </view>
+    <view>
+      <CellTip title="采购管理" v-if="purchaseManageList.length > 0"></CellTip>
+      <view class="nav">
+        <view class="nav-content">
+          <view
+            class="nav-item"
+            v-for="(item, index) in purchaseManageList"
+            @click="toNav(item.path)"
+          >
+            <span :class="'iconfont ' + item.icon"></span>
+            <i class="badge" v-if="item.badge">{{ item.badge }}</i>
+            <label>{{ item.name }}</label>
+          </view>
+        </view>
+      </view>
+    </view>
+    <view>
+      <CellTip title="生产管控" v-if="pcsList.length > 0"></CellTip>
+      <view class="nav">
+        <view class="nav-content">
+          <view
+            class="nav-item"
+            v-for="(item, index) in pcsList"
+            @click="toNav(item.path)"
+          >
+            <span :class="'iconfont ' + item.icon"></span>
+            <i class="badge" v-if="item.badge">{{ item.badge }}</i>
+            <label>{{ item.name }}</label>
+          </view>
+        </view>
+      </view>
+    </view>
+    <view>
+      <CellTip title="质量管理" v-if="qmsList.length > 0"></CellTip>
+      <view class="nav">
+        <view class="nav-content">
+          <view
+            class="nav-item"
+            v-for="(item, index) in qmsList"
+            @click="toNav(item.path)"
+          >
+            <span :class="'iconfont ' + item.icon"></span>
+            <i class="badge" v-if="item.badge">{{ item.badge }}</i>
+            <label>{{ item.name }}</label>
+          </view>
+        </view>
+      </view>
+    </view>
+    <view>
+      <CellTip title="溯源管理" v-if="traceabilityList.length > 0"></CellTip>
+      <view class="nav">
+        <view class="nav-content">
+          <view
+            class="nav-item"
+            v-for="(item, index) in traceabilityList"
+            @click="toNav(item.path)"
+          >
+            <span :class="'iconfont ' + item.icon"></span>
+            <i class="badge" v-if="item.badge">{{ item.badge }}</i>
+            <label>{{ item.name }}</label>
+          </view>
+        </view>
+      </view>
+    </view>
+    <!--    <view>
       <CellTip title="生产类"></CellTip>
 
       <view class="nav">
@@ -145,204 +221,202 @@
         </view>
       </view>
     </view> -->
-	</view>
+  </view>
 </template>
 
 <script>
-	import CellTip from '@/components/CellTip.vue'
-	import {
-		statistics
-	} from '@/api/myTicket'
-	export default {
-		components: {
-			CellTip
-		},
-		data() {
-			return {
-				timer: null,
-				src1: 'https://cdn.uviewui.com/uview/album/1.jpg',
-				workOrder: {}, // 工单统计数据
-				//生产类
-				productionList: [],
-				// executeList: [
-				//   {
-				//     class: "iconfont icon-gongdanguanli",
-				//     title: "成型",
-				//     link_url: "/pages/production/execute/extrusion/index",
-				//     // "num": 1
-				//   },
-				//   {
-				//     class: "iconfont icon-gongdanguanli",
-				//     title: "自然干燥",
-				//     link_url: "/pages/production/execute/drying/index",
-				//     // "num": 1
-				//   },
-				//   {
-				//     class: "iconfont icon-gongdanguanli",
-				//     title: "升温干燥",
-				//     link_url: "/pages/production/execute/heating/index",
-				//     // "num": 1
-				//   },
-				//   {
-				//     class: "iconfont icon-gongdanguanli",
-				//     title: "半加定长",
-				//     link_url: "/pages/production/execute/halfAdded/index",
-				//     // "num": 1
-				//   },
-				//   // {
-				//   //   class: "iconfont icon-gongdanguanli",
-				//   //   title: "领料",
-				//   //   link_url: "/pages/production/execute/picking/index",
-				//   //   // "num": 1
-				//   // },
-				// ],
-				//仓储管理
-
-				warehousingList: [
-
-				],
-
-				//运维类
-				operationsList: [
-
-				],
-				dispatchList: [
-
-				],
-				internalManagementList: [
+import CellTip from "@/components/CellTip.vue";
+import { statistics } from "@/api/myTicket";
+export default {
+  components: {
+    CellTip,
+  },
+  data() {
+    return {
+      timer: null,
+      src1: "https://cdn.uviewui.com/uview/album/1.jpg",
+      workOrder: {}, // 工单统计数据
+      qmsList: [],
+      //生产类
+      productionList: [],
+      // executeList: [
+      //   {
+      //     class: "iconfont icon-gongdanguanli",
+      //     title: "成型",
+      //     link_url: "/pages/production/execute/extrusion/index",
+      //     // "num": 1
+      //   },
+      //   {
+      //     class: "iconfont icon-gongdanguanli",
+      //     title: "自然干燥",
+      //     link_url: "/pages/production/execute/drying/index",
+      //     // "num": 1
+      //   },
+      //   {
+      //     class: "iconfont icon-gongdanguanli",
+      //     title: "升温干燥",
+      //     link_url: "/pages/production/execute/heating/index",
+      //     // "num": 1
+      //   },
+      //   {
+      //     class: "iconfont icon-gongdanguanli",
+      //     title: "半加定长",
+      //     link_url: "/pages/production/execute/halfAdded/index",
+      //     // "num": 1
+      //   },
+      //   // {
+      //   //   class: "iconfont icon-gongdanguanli",
+      //   //   title: "领料",
+      //   //   link_url: "/pages/production/execute/picking/index",
+      //   //   // "num": 1
+      //   // },
+      // ],
+      //仓储管理
 
-				],
-				treeList: [],
-				saleManageList: [],
-				// 售后服务
-				serviceList: [],
-				// 溯源管理
-				traceabilityList: [],
-				// 采购管理
-				purchaseManageList: [],
-			}
-		},
-		created() {
-			this.getTree()
-		},
-		onShow() {
-			this.getStatistics()
-		},
-		onHide() {
-			clearTimeout(this.timer);
-		},
-		onUnload() {
-			clearTimeout(this.timer);
-		},
-		methods: {
-			getStatistics() {
-				// 获取工单统计数
-				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.repairsNum
-					})
-				}).finally(() => {
-					this.timer = setTimeout(() => {
-						this.getStatistics()
-					}, 12000)
-				})
-			},
-			getTree() {
-				let _list = uni.getStorageSync('treeList')
-				let list = JSON.parse(_list) || []
-				console.log('-----------list--------------')
-				console.log(list)
-				if (list[0] && list[0].children.length > 0) {
-					console.log(list[0].children, 'list[0].children ----')
-					list[0].children.forEach(f => {
-						if (f.path == 'productionManage') {
-							this.productionList = f.children
-						} else if (f.path == 'operationsList') {
-							statistics().then(res => {
-								this.workOrder = res
-								console.log('this.operationsList---', this.operationsList)
-								console.log('res', res)
-								f.children.forEach(item => {
-									if (item.name == '保养工单') item.badge = res.maintenanceNum
-									if (item.name == '巡点检工单') item.badge = res.patrolInspection
-									if (item.name == '维修工单') item.badge = res.repairsNum
-								})
-								this.operationsList = f.children
-							})
-						} else if (f.path == 'warehouseManagement') {
-							this.warehousingList = f.children
-						} else if (f.path == 'saleManageList') {
-							this.saleManageList = f.children
-							this.saleManageList.forEach(item => {
-								item.name = item.name.replace('员工', '')
-								item.name = item.name.replace('管理员', '')
-							})
-						} else if (f.path == 'internalManagement') {
-							console.log(f, 'f')
-							this.internalManagementList = f.children
+      warehousingList: [],
 
-						} else if (f.path == 'serviceList') {
-							this.serviceList = f.children;
-						} else if (f.path == 'traceability') {
-							this.traceabilityList = f.children;
-						} else if (f.path == 'purchasingManage') {
-							this.purchaseManageList = f.children;
-						}
-					})
-				}
-			},
+      //运维类
+      operationsList: [],
+      dispatchList: [],
+      internalManagementList: [],
+      treeList: [],
+      saleManageList: [],
+      // 售后服务
+      serviceList: [],
+      // 溯源管理
+      traceabilityList: [],
+      // 采购管理
+      purchaseManageList: [],
+	  pcsList:[]
+    };
+  },
+  created() {
+    this.getTree();
+  },
+  onShow() {
+    this.getStatistics();
+  },
+  onHide() {
+    clearTimeout(this.timer);
+  },
+  onUnload() {
+    clearTimeout(this.timer);
+  },
+  methods: {
+    getStatistics() {
+      // 获取工单统计数
+      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.repairsNum;
+          });
+        })
+        .finally(() => {
+          this.timer = setTimeout(() => {
+            this.getStatistics();
+          }, 12000);
+        });
+    },
+    getTree() {
+      let _list = uni.getStorageSync("treeList");
+      let list = JSON.parse(_list) || [];
+      console.log("-----------list--------------");
+      console.log(list);
+      if (list[0] && list[0].children.length > 0) {
+        console.log(list[0].children, "list[0].children ----");
+        list[0].children.forEach((f) => {
+          if (f.path == "productionManage") {
+            this.productionList = f.children;
+          } else if (f.path == "operationsList") {
+            statistics().then((res) => {
+              this.workOrder = res;
+              console.log("this.operationsList---", this.operationsList);
+              console.log("res", res);
+              f.children.forEach((item) => {
+                if (item.name == "保养工单") item.badge = res.maintenanceNum;
+                if (item.name == "巡点检工单")
+                  item.badge = res.patrolInspection;
+                if (item.name == "维修工单") item.badge = res.repairsNum;
+              });
+              this.operationsList = f.children;
+            });
+          } else if (f.path == "warehouseManagement") {
+            this.warehousingList = f.children;
+          } else if (f.path == "saleManageList") {
+            this.saleManageList = f.children;
+            this.saleManageList.forEach((item) => {
+              item.name = item.name.replace("员工", "");
+              item.name = item.name.replace("管理员", "");
+            });
+          } else if (f.path == "internalManagement") {
+            console.log(f, "f");
+            this.internalManagementList = f.children;
+          } else if (f.path == "serviceList") {
+            this.serviceList = f.children;
+          } else if (f.path == "traceability") {
+            this.traceabilityList = f.children;
+          } else if (f.path == "purchasingManage") {
+            this.purchaseManageList = f.children;
+          } else if (f.path == "qualityManage") {
+            this.qmsList = f.children;
+          } else if (f.path == "productionControlManagement") {
+            this.pcsList = f.children;
+          }
+        });
+      }
+    },
 
-			toNav(url) {
-				console.log(url)
-				uni.navigateTo({
-					url: url
-				})
-			},
-			HandlScanCode() {
-				let _this = this
-				uni.scanCode({
-					success: function(res) {
-						console.log(res)
-						// 获取扫描结果中的URL
-						const scanResult = res.result
-						// 检查URL是否包含traceability
-						if(scanResult && scanResult.includes('/traceability')) {
-							// 从扫描结果中提取id参数
-							let id = ''
-							if(scanResult.includes('id=')) {
-								// 分割URL获取id参数值
-								const idPart = scanResult.split('id=')[1]
-								// 如果id后面还有其他参数,只取到第一个&之前的部分
-								if(idPart.includes('&')) {
-									id = idPart.split('&')[0]
-								} else {
-									id = idPart
-								}
-							}
-							// 跳转到溯源页面并传递id
-							uni.navigateTo({
-								url: `/pages/traceability/scanCode/index?id=${id}`
-							})
-							return
-						}
-						_this.scantoRouter(scanResult)
-					}
-				})
-			},
-			scantoRouter(result) {
-				uni.navigateTo({
-					url: `/pages/pda/workOrder/extrusionMolding/index?id=${result}`
-				})
-			}
-		}
-	}
+    toNav(url) {
+      console.log(url);
+      uni.navigateTo({
+        url: url,
+      });
+    },
+    HandlScanCode() {
+      let _this = this;
+      uni.scanCode({
+        success: function (res) {
+          console.log(res);
+          // 获取扫描结果中的URL
+          const scanResult = res.result;
+          // 检查URL是否包含traceability
+          if (scanResult && scanResult.includes("/traceability")) {
+            // 从扫描结果中提取id参数
+            let id = "";
+            if (scanResult.includes("id=")) {
+              // 分割URL获取id参数值
+              const idPart = scanResult.split("id=")[1];
+              // 如果id后面还有其他参数,只取到第一个&之前的部分
+              if (idPart.includes("&")) {
+                id = idPart.split("&")[0];
+              } else {
+                id = idPart;
+              }
+            }
+            // 跳转到溯源页面并传递id
+            uni.navigateTo({
+              url: `/pages/traceability/scanCode/index?id=${id}`,
+            });
+            return;
+          }
+          _this.scantoRouter(scanResult);
+        },
+      });
+    },
+    scantoRouter(result) {
+      uni.navigateTo({
+        url: `/pages/pda/workOrder/extrusionMolding/index?id=${result}`,
+      });
+    },
+  },
+};
 </script>
 
 <style lang="scss" scoped>
-	@import 'index.scss';
-</style>
+@import "index.scss";
+</style>

+ 1 - 1
pages/login/login.vue

@@ -454,7 +454,7 @@
 					})
 					.catch(err => {
 						uni.showToast({
-							title: err.message,
+							title: err.message || '登录失败',
 							icon: 'none',
 							duration: 2000
 						})

+ 47 - 27
pages/maintenance/check/components/CheckCard.vue

@@ -26,16 +26,27 @@
 			</view>
 			<view class="cell-content" v-else>无</view>
 		</view> -->
+		<view class="card-cell">
+			<text class="label">状态</text>
+			<text class="cell-content">
+
+				<view v-if="type == 'view'">
+					<div v-if="item.status == -1" style="color: red">异常</div>
+					<div v-else style="color: green">正常</div>
+				</view>
+				<view v-else>
+					<uni-data-picker @change="statusChange" style="width:100%" v-model="item.status" placeholder="请选择"
+						:localdata="statusList" :clear-icon="false">
+					</uni-data-picker>
+				</view>
+			</text>
+		</view>
 		<view class="card-cell">
 			<text class="label">结果</text>
 			<view class="cell-content">
-				<view class="content-status" v-if="type == 'view'">
-					<!-- {{ item.isNormal?'正常':'异常' }} -->
-					<div v-if="item.status == 0" style="color: green">正常</div>
-					<div v-else-if="item.status == -1" style="color: red">异常</div>
-				</view>
+
 				<textarea v-if="type !== 'view'" placeholder="请输入" v-model="item.result"
-					@input="inputChange($event, item)" />
+					 />
 				<view class="result-text" v-else>{{ item.result }}</view>
 				<view class="radio-wrapper" v-if="type !== 'view'">
 
@@ -84,7 +95,7 @@
 				</view>
 				<view class="photo_list">
 					<PreviewPhoto :type="type" @imagedelete="imagedelete" :imageList="photoList" />
-				<!-- 	<u-album :urls="photoList" :rowCount="3" @delete="handleDelete" :maxCount="9" :singleSize="180"
+					<!-- 	<u-album :urls="photoList" :rowCount="3" @delete="handleDelete" :maxCount="9" :singleSize="180"
 						:multipleSize="180"></u-album> -->
 				</view>
 			</view>
@@ -96,7 +107,9 @@
 <script>
 	import PreviewPhoto from './PreviewPhoto.vue'
 	export default {
-		components:{ PreviewPhoto },
+		components: {
+			PreviewPhoto
+		},
 		props: {
 			item: {
 				type: Object,
@@ -111,12 +124,12 @@
 		data() {
 			return {
 				statusList: [{
-						label: '正常',
-						status: 0
+						text: '正常',
+						value: 1
 					},
 					{
-						label: '异常',
-						status: -1
+						text: '异常',
+						value: -1
 					}
 				]
 			}
@@ -129,13 +142,20 @@
 			}
 		},
 		methods: {
-			inputChange(obj, item) {
-				console.log(item, 'item --')
-				if (obj.target.value.length > 0) {
-					item.status = -1
+			// inputChange(obj, item) {
+			// 	if (obj.target.value.length > 0 && obj.target.value != '正常') {
+			// 		item.status = -1
+			// 	} else {
+			// 		item.status = 1
+			// 	}
+			// },
+			statusChange() {
+				if (this.item.status == 1) {
+					this.item.result = '正常'
 				} else {
-					item.status = 0
+					this.item.result = '异常'
 				}
+
 			},
 			changeStatus(item, it) {
 				item.status = it.status
@@ -145,16 +165,16 @@
 			// 	console.log(e, 'eeeee');
 			// 	console.log(i, 'iiiiiiiiiiii')
 			// },
-			
+
 			// 图片删除
-			imagedelete(index){
-				this.item.photoList.splice(index,1);
+			imagedelete(index) {
+				this.item.photoList.splice(index, 1);
 			},
 
 			// *** 新增拍照功能
 			chooseImage() {
 				const _this = this
-				if(_this.photoList.length >= 9){
+				if (_this.photoList.length >= 9) {
 					_this.$refs.uToast.show({
 						type: "warning",
 						message: "最多上传9张照片",
@@ -183,7 +203,7 @@
 									_this.$set(_this.item, 'photoList', [url])
 								} else {
 									// 不能存储超过 9 张
-									if(_this.item.photoList.length < 9){
+									if (_this.item.photoList.length < 9) {
 										_this.item.photoList.push(url);
 									}
 								}
@@ -236,8 +256,8 @@
 			text-align: center;
 			border-right: 1px solid $border-color;
 			justify-content: center;
-			
-			.mark{
+
+			.mark {
 				width: 80rpx;
 				height: 4rpx;
 				display: inline-block;
@@ -315,8 +335,8 @@
 			padding: 6px 12rpx;
 			// display: flex;
 			// align-items: center;
-			
-			.btn_box{
+
+			.btn_box {
 				width: 100%;
 			}
 
@@ -335,7 +355,7 @@
 				display: inline-block;
 			}
 		}
-		
+
 		/deep/.u-album__row__wrapper {
 			uni-image {
 				width: 180rpx !important;

+ 4 - 1
pages/maintenance/check/index.vue

@@ -138,6 +138,7 @@
 				let params = {
 					id: this.equipList[0].id,
 					executeStatus: isAllPass ? 1 : 2,
+					isAbnormal: isAllPass ? 1 : 0,
 					workItems: this.equipList.map(item => {
 						return {
 							content: item.content,
@@ -146,7 +147,7 @@
 							operationGuide: item.operationGuide,
 							result: item.result,
 							serialNum: item.serialNum,
-							status: item.status,
+							status: item.status == -1 ? -1 : 1,
 							// 新增 拍照数据
 							photoList: item.photoList || []
 						}
@@ -271,6 +272,8 @@
 						return {
 							...item,
 							id: data.id,
+							status: 1,
+							result: '正常',
 							executeStatus: 1
 						}
 					})

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

@@ -803,6 +803,7 @@
 	.kd-baseInfo {
 		padding: 0 32rpx;
 		font-size: 28rpx;
+		overflow: auto;
 	}
 
 	.kd-equipment {

+ 12 - 1
pages/maintenance/order/OrderTask.vue

@@ -16,7 +16,7 @@
 						<view class="item_box rx-bc">
 							<view class="item_one perce50 rx-sc">
 								<view class="lable">设备名称:</view>
-								<view>{{item.deviceName}}</view>
+								<view class="deviceName">{{item.deviceName}}</view>
 							</view>
 						</view>
 						<view class="item_box rx-bc">
@@ -160,6 +160,17 @@
 				font-weight: 400;
 				line-height: 38rpx;
 				word-wrap: break-word;
+				.lable {
+					width: 150rpx;
+				}
+				
+				.deviceName {
+					width: calc(750rpx - 150rpx);
+					display: -webkit-box;
+					-webkit-box-orient: vertical;
+					-webkit-line-clamp: 2;
+					overflow: hidden;
+				}
 			}
 
 			.gylx {

+ 2 - 1
pages/maintenance/order/order.vue

@@ -187,7 +187,8 @@
 					return
 				}
 				uni.showLoading({
-					title: '加载中'
+					title: '加载中',
+					mask: true
 				})
 				let params = {
 					orderStatus: [this.tabList[this.pickTabIndex].value],

+ 1 - 1
pages/maintenanceWorkorder/components/maintain_course.vue

@@ -44,7 +44,7 @@
 							<view class="label">验收结果</view>
 							<view class="value">
 								{{ logs[item.id] ? (logs[item.id].content.orderStatus == 4 ? '通过' : '驳回') : '' }}
-							</view>WXGD2025022715
+							</view>
 						</view>
 					</view>
 					<view class="list-xs" v-else-if="item.type == 'WORK_REPORT'">

+ 2 - 2
pages/maintenanceWorkorder/components/pickCard.vue

@@ -42,7 +42,7 @@
 							<view class="item_one perce100 rx-sc">
 								<view class="lable">设备编码:</view>
 								<view>
-									{{item.deviceList.filter((val) => val.deviceCode).map((val) => val.deviceCode).toString()}}
+									{{item.deviceList.filter((val) => val.code).map((val) => val.code).toString()}}
 								</view>
 							</view>
 						</view>
@@ -73,7 +73,7 @@
 							</view>
 							<view class="item_one perce50 rx-sc">
 								<view class="lable">状态:</view>
-								<view>{{statusOpt[item.status]}}</view>
+								<view>{{statusOpt[item.approvalStatus]}}</view>
 							</view>
 						</view>
 					</view>

+ 4 - 3
pages/maintenanceWorkorder/sparepart/sparepart.vue

@@ -265,7 +265,8 @@
 		},
 		async onLoad(data) {
 			const obj = JSON.parse(data.data)
-			console.log(obj,'obj ----')
+			this.userInfo = uni.getStorageSync('userInfo')
+			console.log(this.userInfo,'this.userInfo')
 			this.type = obj.pageType
 			this.getDept()
 			if (this.type == 'add') {
@@ -273,8 +274,8 @@
 				this.addForm.repairName = obj.planName;
 				this.addForm.repairId = obj.id;
 				this.deviceList = obj.deviceList;
-				this.addForm.receivingDeptName = obj.createGroupName;
-				this.addForm.recipientName = obj.executeUserName;
+				this.addForm.receivingDeptName = this.userInfo.groupName;
+				this.addForm.recipientName = this.userInfo.name;
 				// if (!obj.sparePartsApplyList) {
 				// 	this.addForm.deviceName = obj.deviceName;
 				// 	this.addForm.fixCode = obj.fixCode;

+ 1 - 4
pages/maintenanceWorkorder/sparepart/sparepartList.vue

@@ -157,10 +157,7 @@
 					0: '未质检',
 					1: '已质检'
 				},
-				dimensionList: [{
-						name: '物料维度',
-						id: 4
-					},
+				dimensionList: [
 					{
 						name: '包装维度',
 						id: 3

+ 233 - 0
pages/qms/inspectionWork/index.vue

@@ -0,0 +1,233 @@
+<template>
+	<view class="mainBox">
+		<uni-nav-bar fixed="true" statusBar="true" left-icon="back" title="质检工单" @clickLeft="back">
+		</uni-nav-bar>
+
+		<view class="top-wrapper">
+			<uni-section>
+				<uni-easyinput prefixIcon="search" style="width: 460rpx" v-model="searchVal" placeholder="名称、批次号">
+				</uni-easyinput>
+			</uni-section>
+			<button class="search_btn" @click="doSearch">搜索</button>
+		</view>
+		<div style="height:100rpx;width: 475rpx;"></div>
+		<view class="wrapper">
+			<u-list @scrolltolower="scrolltolower" class="listContent">
+				<view v-for="(item, index) in tableList" :key="index+item.id" style="position: relative;">
+					<view class="item">
+						<view class="herder_item">
+							<view class="herder_text"></view>
+							<view class="herder_view">
+								{{ getDictValue('质检计划类型', item.qualityType+'')}}/{{item.code}}/{{item.productCode}}/{{item.productName}}
+							</view>
+						</view>
+						<view class="text">检验项目:</view>
+						<view class="item_value">
+							<view @click="goTo(item.id,row.id)" v-for="(row,_index) in item.templateList"
+								:key="item.inspectionName+index+'_'+_index"
+								:style="{background:row.status==1?'#19be6b':row.status==2?'#ff9900':row.status==3?'#ff9900':'#909399'}">
+								{{row.inspectionName}}
+							</view>
+						</view>
+					</view>
+				</view>
+				<view style="width:100%;height:40rpx"></view>
+				<view style='margin-top: 20vh;' v-if="tableList.length==0">
+					<u-empty iconSize='150' textSize='32' text='暂无数据'>
+					</u-empty>
+				</view>
+			</u-list>
+
+		</view>
+
+
+
+
+		<u-toast ref="uToast"></u-toast>
+
+	</view>
+</template>
+
+<script>
+	import dictMixns from '@/mixins/dictMixins'
+	import {
+		getList,
+	} from '@/api/inspectionWork/index.js'
+	export default {
+		components: {},
+		mixins: [dictMixns],
+		data() {
+			return {
+
+
+				tableList: [],
+				page: 1,
+				size: 10,
+				isEnd: false,
+				searchVal: ''
+
+			}
+		},
+		computed: {
+
+		},
+		onLoad() {
+			this.requestDict('质检计划类型')
+			this.getList()
+		},
+
+		onShow() {
+			this.isEnd = false
+			this.page = 1
+			this.getList()
+		},
+		methods: {
+			doSearch() {
+				this.isEnd = false
+				this.page = 1
+				this.getList()
+			},
+			//获取列表信息
+			getList() {
+				if (this.isEnd) {
+					return
+				}
+				uni.showLoading({
+					title: '加载中'
+				})
+
+				let data = {
+					pageNum: this.page,
+					size: this.size,
+					partaName: this.searchVal,
+					recordingMethod: 1
+				}
+				getList(data).then(res => {
+					if (this.page === 1) {
+						this.tableList = res.list
+					} else {
+						this.tableList.push(...res.list)
+					}
+					this.page += 1
+					this.isEnd = this.tableList.length >= res.count
+				}).then(() => {
+					uni.hideLoading()
+				})
+			},
+			goTo(workId, projectId) {
+
+				uni.navigateTo({
+					url: '/pages/qms/inspectionWork/inspectionProjectReport?workId='+workId+'&projectId='+projectId
+				})
+			},
+
+			scrolltolower() {
+				if (this.isEnd) {
+					return
+				}
+				this.getList();
+			},
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.mainBox {
+		background-color: #f3f8fb
+	}
+
+	// .wrapper{
+
+	// }
+	.top-wrapper {
+		background-color: #fff;
+		display: flex;
+		width: 750rpx;
+		height: 88rpx;
+		padding: 16rpx 32rpx;
+		align-items: center;
+		gap: 16rpx;
+		position: fixed;
+		z-index: 999;
+
+		/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;
+		}
+	}
+
+	.item {
+		width: 720rpx;
+		// height:400rpx;
+		margin: 20rpx auto 0;
+		padding: 26rpx;
+		border-radius: 30rpx;
+
+		.text {
+			margin-top: 20rpx;
+		}
+
+		background: #fff;
+	}
+
+	.item_value {
+		width: 100%;
+		display: flex;
+		flex-wrap: wrap;
+		margin-left: -10rpx;
+
+		>view {
+			font-size: 24rpx;
+			color: #fff;
+			padding: 12rpx;
+			border-radius: 10rpx;
+			background: #979797;
+			margin-left: 10rpx;
+			margin-top: 20rpx;
+		}
+	}
+
+	.herder_item {
+		display: flex;
+		// align-items: center;
+		font-size: 28rpx;
+		font-weight: bold;
+
+		.herder_view {
+			width: calc(100% - 20rpx);
+			word-break: break-all;
+
+		}
+
+		.herder_text {
+			min-width: 10rpx;
+			height: 32rpx;
+			border-radius: 10rpx;
+			background: #00c0a1;
+			margin-right: 12rpx;
+			margin-top: 5rpx;
+		}
+	}
+</style>

+ 408 - 0
pages/qms/inspectionWork/inspectionProjectReport.vue

@@ -0,0 +1,408 @@
+<template>
+	<view class="mainBox">
+		<uni-nav-bar fixed="true" statusBar="true" left-icon="back" title="检验项目" @clickLeft="back">
+		</uni-nav-bar>
+
+		<view class="wrapper">
+			<view class="herder_item">
+				<view class="herder_text"></view>
+				<view class="herder_view" style="font-size: 32rpx;">
+					检验信息({{form.status==1?'已检':form.status==2?'已派单':form.status==3?'已请托':'待检'}})
+
+				</view>
+			</view>
+			<text class="marginTop20 tag">
+				{{form.inspectionName}}
+			</text>
+			<view class="marginTop20 workValue">
+				{{workData.productName}}/{{workData.code}}/{{workData.productCode}}
+			</view>
+			<view class="herder_item marginTop20">
+				<view class="herder_text"></view>
+				<view class="herder_view">
+					执行标准
+				</view>
+			</view>
+			<u--input suffixIcon="arrow-right" style="background-color:#fff ;" :disabledColor="'#ffffff'"
+				:disabled="true" class="marginTop20" placeholder=" " border="surround"
+				:value="getDictValue('质检标准类型', form.qualityStandardType+'')"></u--input>
+			<view class="herder_item marginTop20">
+				<view class="herder_text"></view>
+				<view class="herder_view">
+					工艺参数
+				</view>
+			</view>
+			<view class="marginTop20 defValue">
+				{{form.defaultValue}}
+			</view>
+			<view class="herder_item marginTop20">
+				<view class="herder_text"></view>
+				<view class="herder_view">
+					工单剩余样品数
+				</view>
+			</view>
+			<view class="marginTop20 ">
+				<u-input disabled class="marginTop20" placeholder=" " border="surround"
+					v-model="workData.remainingSampleCount">
+					<template slot="suffix" v-if="form.measureUnit">{{form.measureUnit}}
+					</template>
+				</u-input>
+			</view>
+			<view class="herder_item marginTop20">
+				<view class="herder_text"></view>
+				<view class="herder_view">
+					质检内容
+				</view>
+			</view>
+			<u-input :disabled='form.status==1' @change="handleInput(form, form.qualityResultContent)"
+				class="marginTop20" placeholder="请输入内容" border="surround" v-model="form.qualityResultContent">
+				<template slot="suffix" v-if="form.unitName">{{form.unitName}}</template>
+			</u-input>
+			<view class="herder_item marginTop20">
+				<view class="herder_text"></view>
+				<view class="herder_view">
+					样品数
+				</view>
+			</view>
+			<u-input :disabled='form.status==1' @change="inputValue('sampleQuantity')" type="number" class="marginTop20"
+				placeholder="请输入内容" border="surround" v-model="form.sampleQuantity">
+				<template slot="suffix" v-if="form.measureUnit">{{form.measureUnit}}</template>
+			</u-input>
+			<view class="herder_item marginTop20">
+				<view class="herder_text"></view>
+				<view class="herder_view">
+					合格数
+				</view>
+			</view>
+			<u-input :disabled='form.status==1' type="number" @change="inputValue('qualifiedQuantity')"
+				class="marginTop20" placeholder="请输入内容" border="surround" v-model="form.qualifiedQuantity">
+				<template slot="suffix" v-if="form.measureUnit">{{form.measureUnit}}</template>
+			</u-input>
+			<view class="herder_item marginTop20">
+				<view class="herder_text"></view>
+				<view class="herder_view">
+					不合格数
+				</view>
+			</view>
+			<u-input :disabled='form.status==1' type="number" @change="inputValue('noQualifiedQuantity')"
+				class="marginTop20" placeholder="请输入内容" border="surround" v-model="form.noQualifiedQuantity">
+				<template slot="suffix" v-if="form.measureUnit">{{form.measureUnit}}</template>
+			</u-input>
+			<view class="herder_item marginTop20">
+				<view class="herder_text"></view>
+				<view class="herder_view">
+					损耗数(合格品)
+				</view>
+			</view>
+			<u-input :disabled='form.status==1' @change="inputValue('lossNumber')" type="number" class="marginTop20"
+				placeholder="请输入内容" border="surround" v-model="form.lossNumber">
+				<template slot="suffix" v-if="form.measureUnit">{{form.measureUnit}}</template>
+			</u-input>
+			<view class="herder_item marginTop20">
+				<view class="herder_text"></view>
+				<view class="herder_view">
+					损耗数(不合格品)
+				</view>
+			</view>
+			<u-input :disabled='form.status==1' @change="inputValue('lossNumberUnqualified')" type="number"
+				class="marginTop20" placeholder="请输入内容" border="surround" v-model="form.lossNumberUnqualified">
+				<template slot="suffix" v-if="form.measureUnit">{{form.measureUnit}}</template>
+			</u-input>
+			<view class="herder_item marginTop20">
+				<view class="herder_text"></view>
+				<view class="herder_view">
+					留样数(合格品)
+				</view>
+			</view>
+			<u-input :disabled='form.status==1' @change="inputValue('retainedSampleQuantity')" type="number"
+				class="marginTop20" placeholder="请输入内容" border="surround" v-model="form.retainedSampleQuantity">
+				<template slot="suffix" v-if="form.measureUnit">{{form.measureUnit}}</template>
+			</u-input>
+			<view class="herder_item marginTop20">
+				<view class="herder_text"></view>
+				<view class="herder_view">
+					留样数(不合格品)
+				</view>
+			</view>
+			<u-input :disabled='form.status==1' type="number" @change="inputValue('retainedSampleUnqualified')"
+				class="marginTop20" placeholder="请输入内容" border="surround" v-model="form.retainedSampleUnqualified">
+				<template slot="suffix" v-if="form.measureUnit">{{form.measureUnit}}</template>
+			</u-input>
+			<view class="herder_item marginTop20">
+				<view class="herder_text"></view>
+				<view class="herder_view">
+					质检结果
+				</view>
+			</view>
+			<uni-data-picker v-if='form.status!=1' class="marginTop20" v-model="form.qualityResults" placeholder="请选择"
+				:localdata="acceptUnpackList">
+			</uni-data-picker>
+			<u-input disabled v-else class="marginTop20" placeholder="请输入内容" border="surround"
+				:value="acceptUnpackList.find(item=>item.value==form.qualityResults).text">
+			</u-input>
+
+		</view>
+
+		<view class="footerButton">
+			<u-button type="default" text="返回" @click="back"></u-button>
+			<u-button v-if="form.status!=1" type="primary" @click="exeReportWorkBySingleTemplate" text="保存"></u-button>
+		</view>
+		<view style="width:100%;height: 100rpx;"></view>
+		<u-toast ref="uToast"></u-toast>
+
+	</view>
+</template>
+
+<script>
+	import dictMixns from '@/mixins/dictMixins'
+	import {
+		getById,
+		exeReportWorkBySingleTemplate
+	} from '@/api/inspectionWork/index.js'
+	import {
+		handleInput
+	} from './unit.js';
+
+	export default {
+		components: {},
+		mixins: [dictMixns],
+		data() {
+			return {
+				handleInput,
+				show: false,
+				form: {
+					lossNumber: '',
+					lossNumberUnqualified: '',
+					retainedSampleQuantity: '',
+					retainedSampleUnqualified: '',
+					qualifiedQuantity:'',
+					noQualifiedQuantity:'',
+					sampleQuantity:'',
+				},
+				acceptUnpackList: [{
+						text: "合格",
+						value: 1
+					},
+					{
+						text: "不合格",
+						value: 2
+					}, {
+						text: "让步接收",
+						value: 3
+					},
+				],
+
+				workData: {}
+			}
+		},
+		computed: {
+
+		},
+		onLoad(data) {
+			this.requestDict('质检计划类型');
+			this.requestDict('取样类型');
+			this.requestDict('质检标准类型');
+			if (data) {
+				getById(data.workId).then(res => {
+					this.workData = res
+					this.$set(this,'form',res.templateList.find(item => item.id == data.projectId))
+					this.form.measureUnit = res.qualitySampleList[0]?.measureUnit
+
+				})
+			}
+
+		},
+
+		onShow() {
+
+		},
+		methods: {
+
+			exeReportWorkBySingleTemplate() {
+				// let params = JSON.parse(JSON.stringify(this.workData))
+				// let index = params.templateList.findIndex(item => item.id == this.form.id)
+				// params.templateList[index] = this.form
+				// params.
+				if (!this.form.qualityResultContent) {
+					this.$refs.uToast.show({
+						type: "error",
+						icon: false,
+						message: "请填写质检内容!",
+					}, )
+					return
+				}
+				if (!this.form.sampleQuantity) {
+					this.$refs.uToast.show({
+						type: "error",
+						icon: false,
+						message: "请填写样品数!",
+					}, )
+					return
+				}
+				this.form.status = 1
+				exeReportWorkBySingleTemplate({
+						id: this.workData.id,
+						planTemplateList: [this.form]
+					})
+					.then((msg) => {
+						this.back()
+					})
+					.catch((e) => {
+						this.back()
+					});
+			},
+			valueInit(data) {
+				['lossNumber', 'lossNumberUnqualified', 'retainedSampleQuantity', 'retainedSampleUnqualified'].forEach(
+					key => {
+						data[key] = ''
+					})
+			},
+
+			inputValue(type) {
+				let data = JSON.parse(JSON.stringify((this.form)))
+				if (data[type] < 0) {
+					data[type] = '';
+				}
+				//样品数
+				if (type == 'sampleQuantity') {
+					if (+data[type] > this.workData.remainingSampleCount) {
+						data[type] = 0
+						this.$refs.uToast.show({
+							type: "error",
+							icon: false,
+							message: "样品数不能大于工单剩余样品数",
+						}, )
+					}
+					data.qualifiedQuantity = data[type]
+					data.noQualifiedQuantity = 0
+					this.valueInit(data)
+				}
+				//样品合格数、不合格数
+				if (type == 'qualifiedQuantity' || type == 'noQualifiedQuantity') {
+					if (+data[type] > data.sampleQuantity) {
+						data[type] = 0
+						this.$refs.uToast.show({
+							type: "error",
+							icon: false,
+							message: (type == 'qualifiedQuantity' ? '合格' : '不合格') + "数不能大于样品数",
+						}, )
+					}
+					let key = type == 'qualifiedQuantity' ? 'noQualifiedQuantity' : 'qualifiedQuantity'
+					data[key] = data.sampleQuantity - data[type]
+					this.valueInit(data)
+				}
+				//损耗数 留样数
+				if (['lossNumber', 'lossNumberUnqualified', 'retainedSampleQuantity', 'retainedSampleUnqualified']
+					.includes(type)) {
+					if (type == 'lossNumber' || type == 'retainedSampleQuantity') {
+						if (Number(data.lossNumber) + Number(data.retainedSampleQuantity) > data.qualifiedQuantity) {
+							this.$refs.uToast.show({
+								type: "error",
+								icon: false,
+								message: "损耗合格数与留样合格数之和不能大于样品合格数",
+							}, )
+							data[type] = ''
+						}
+
+					} else {
+						if (Number(data.lossNumberUnqualified) + Number(data.retainedSampleUnqualified) > data
+							.noQualifiedQuantity) {
+							this.$refs.uToast.show({
+								type: "error",
+								icon: false,
+								message: "损耗不合格数与留样不合格数之和不能大于样品不合格数",
+							}, )
+							data[type] = ''
+						}
+					}
+				}
+				this.$nextTick(() => {
+					this.$set(this, 'form', JSON.parse(JSON.stringify((data))))
+				})
+			}
+
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.mainBox {
+		background-color: #f3f8fb;
+		height: 100vh;
+		font-size: 27rpx;
+		overflow-y: auto;
+	}
+
+	.wrapper {
+		width: 720rpx;
+		background: #fff;
+		margin: 20rpx auto 0;
+		border-radius: 30rpx;
+		padding: 26rpx;
+	}
+
+	.footerButton {
+		width: 100%;
+		height: 84rpx;
+		display: flex;
+		position: fixed;
+		bottom: 0;
+		z-index: 10;
+		background-color: #fff;
+
+		/deep/.u-button {
+			height: 100%;
+		}
+
+		>view {
+			flex: 1;
+		}
+	}
+
+	.workValue {
+		word-break: break-all;
+		font-weight: bold;
+
+	}
+
+	.tag {
+		// font-size: 24rpx;
+		color: #fff;
+		padding: 12rpx;
+		border-radius: 10rpx;
+		background: #979797;
+		display: inline-block;
+
+	}
+
+	/deep/.input-value {
+		font-size: 28rpx !important;
+	}
+
+	.defValue {
+		color: #c1353c;
+		text-indent: 2ch;
+	}
+
+	.marginTop20 {
+		margin-top: 30rpx;
+	}
+
+
+	.herder_item {
+		display: flex;
+
+		font-weight: bold;
+		// font-size: 26rpx;
+
+		.herder_text {
+
+			min-width: 10rpx;
+			height: 32rpx;
+			border-radius: 10rpx;
+			background: #00c0a1;
+			margin-right: 12rpx;
+			margin-top: 5rpx;
+		}
+	}
+</style>

+ 133 - 0
pages/qms/inspectionWork/unit.js

@@ -0,0 +1,133 @@
+import Vue from 'vue';
+
+//改变数量
+export function handleInput(item, value, arr) {
+  console.log('进来没有', item, value, arr);
+  if (value) {
+    if (item.textType == '1') {
+      if (!item.symbol) {
+
+        if (item.qualityResultContent != item.defaultValue) {
+          Vue.set(item, 'qualityResults', 2);
+        } else {
+          Vue.set(item, 'qualityResults', 1);
+        }
+        // qualityResultsListChange(arr);
+        return;
+      }
+      let key = mathematicalJudgment(item);
+      Vue.set(item, 'qualityResults', key);
+      // qualityResultsListChange(arr);
+    }
+
+    if (item.textType == '3') {
+      let num = Number(item.qualityResultContent);
+      if (num == NaN) {
+        Vue.set(item, 'qualityResults', 2);
+        // qualityResultsListChange(arr);
+        return;
+      }
+      if (num >= Number(item.minValue) && num <= Number(item.maxValue)) {
+        Vue.set(item, 'qualityResults', 1);
+        qualityResultsListChange(arr);
+      } else {
+        Vue.set(item, 'qualityResults', 2);
+        // qualityResultsListChange(arr);
+      }
+    }
+  } else {
+    Vue.set(item, 'qualityResults', 1);
+    qualityResultsListChange(arr);
+  }
+}
+
+export function qualityResultsListChange(arr) {
+  if (!arr) {
+    return;
+  }
+
+  arr.forEach((item, index) => {
+    Vue.set(
+      arr[index],
+      'qualityResults',
+      getQuality(item.qualitySampleTemplateList)
+    );
+  });
+}
+function getQuality(arr) {
+  let getQualityValue = 1;
+  arr.forEach((item) => {
+    if (item.qualityResults == 2) {
+      getQualityValue = 2;
+    }
+  });
+  return getQualityValue;
+}
+
+// 数学判断
+function mathematicalJudgment(row) {
+  console.log('进来没有', row);
+  let symbol = row.symbol?.trim(); // 符号
+  let Ivalue = Number(row.qualityResultContent); // 输入的值
+  let Dvalue = Number(row.defaultValue); // 判断的值
+  if (Ivalue == NaN || Dvalue == NaN) {
+    return 2;
+  }
+  if (symbol == '±') {
+    if (Math.abs(Ivalue) != Math.abs(Dvalue)) {
+      return 1;
+    } else {
+      return 2;
+    }
+  }
+
+  if (symbol == '≤' || symbol == '≦') {
+    if (Ivalue <= Dvalue) {
+      return 1;
+    } else {
+      return 2;
+    }
+  }
+
+  if (symbol == '≥' || symbol == '≧') {
+    if (Ivalue >= Dvalue) {
+      return 1;
+    } else {
+      return 2;
+    }
+  }
+
+  if (symbol == '≈' || symbol == '=') {
+    console.log('进来等于号');
+    if (Ivalue == Dvalue) {
+      return 1;
+    } else {
+      return 2;
+    }
+  }
+
+  if (symbol == '≠') {
+    if (Ivalue != Dvalue) {
+      return 1;
+    } else {
+      return 2;
+    }
+  }
+
+  if (symbol == '>') {
+    if (Ivalue > Dvalue) {
+      return 1;
+    } else {
+      return 2;
+    }
+  }
+  if (symbol == '<') {
+    if (Ivalue < Dvalue) {
+      return 1;
+    } else {
+      return 2;
+    }
+  }
+
+  return 2;
+}

+ 86 - 14
pages/repair/repair/index.vue

@@ -39,12 +39,13 @@
 			</Cell>
 			<Cell cellType="more" title="片区负责人部门">
 				<view class="cell-tip-right" slot="more">
-					{{ addForm.repairGroupName }}
+					{{ getDeptName(addForm.areaPersonInChargeGroupId,listData)}}
 				</view>
 			</Cell>
 			<Cell cellType="more" title="片区负责人">
 				<view class="cell-tip-right" slot="more">
-					{{ addForm.repairUserName }}
+					<zxz-uni-data-select style="width:300rpx" disabled :localdata="allList"
+						v-model="addForm.areaPersonInChargeUserId"></zxz-uni-data-select>
 				</view>
 			</Cell>
 		</view>
@@ -60,7 +61,8 @@
 			<view class="item">
 				<view class="label">领导部门</view>
 				<view class="value-wrap">
-					<input type="text" :value="addForm.leaderDeptName" @click="openPicker" placeholder="请选择" />
+					<input type="text" :value="addForm.leaderDeptName" @click="openPicker('leaderDeptName')"
+						placeholder="请选择" />
 				</view>
 			</view>
 			<view class="item">
@@ -70,6 +72,20 @@
 						@change="handleUserChange"></zxz-uni-data-select>
 				</view>
 			</view>
+			<view class="item">
+				<view class="label">维修部门</view>
+				<view class="value-wrap">
+					<input type="text" :value="addForm.repairGroupName" @click="openPicker('repairGroupName')"
+						placeholder="请选择" />
+				</view>
+			</view>
+			<view class="item">
+				<view class="label">维修人</view>
+				<view class="value-wrap" style="padding-left: 0">
+					<zxz-uni-data-select :localdata="userList1" v-model="addForm.repairUserId"
+						@change="handleUserChange1"></zxz-uni-data-select>
+				</view>
+			</view>
 			<view class="item">
 				<view class="label">期望完成时间</view>
 				<view class="value-wrap">
@@ -129,6 +145,7 @@
 	} from '@/utils/utils.js'
 	import selectUser from '../selectUser/index.vue'
 	import dayjs from 'dayjs'
+	let depName = ''
 	export default {
 		components: {
 			CellTip,
@@ -176,12 +193,16 @@
 				equipmentInfo: '',
 				addForm: {},
 				listData: [],
-				userList: []
+				userList: [],
+				userList1: [],
+				allList: [],
+				depKey: ''
 			}
 		},
 		onShow() {},
 		onLoad(data) {
 			this.getDept()
+			this.getUser('', true)
 			if (data.id) {
 				this.selectedEquipment(data.id)
 			}
@@ -264,6 +285,30 @@
 			// 图片删除
 			imagedelete(index) {
 				this.form.images.splice(index, 1);
+			},
+			getDeptName(id, listData) {
+				console.log(id, 'id')
+				if (!id) {
+
+					return ''
+
+				}
+				console.log(12121)
+
+				if (depName) {
+					return depName
+				}
+				listData.forEach((item => {
+					if (item.id == id) {
+						depName = item.name
+					}
+					if (item.children && item.children.length) {
+						return this.getDeptName(id, item.children)
+					}
+				}))
+
+
+
 			},
 
 			// ***
@@ -291,6 +336,10 @@
 					leaderUserId: this.addForm.leaderUserId,
 					leaderName: this.addForm.leaderName,
 					images: this.form.images,
+					repairUserId: this.addForm.repairUserId,
+					repairGroupId: this.addForm.repairGroupId,
+					repairGroupName: this.addForm.repairGroupName,
+					repairUserName: this.addForm.repairUserName,
 				}
 				save(params)
 					.then(res => {
@@ -310,27 +359,49 @@
 			handleUserChange(obj) {
 				this.addForm.leaderUserName = obj.text
 			},
+			handleUserChange1(obj) {
+				this.addForm.repairUserName = obj.text
+			},
 			confirmDep(data, name) {
-				console.log('----------------------------------')
-				console.log(data)
-				console.log(name)
-				this.addForm.leaderDeptName = name
-				this.addForm.leaderDeptId = data[0]
-				this.addForm.leaderUserName = ''
-				this.addForm.leaderUserId = ''
+				if (this.depKey == 'leaderDeptName') {
+					this.addForm.leaderDeptName = name
+					this.addForm.leaderDeptId = data[0]
+					this.addForm.leaderUserName = ''
+					this.addForm.leaderUserId = ''
+				} else {
+					this.addForm.repairGroupName = name
+					this.addForm.repairGroupId = data[0]
+					this.addForm.repairUserName = ''
+					this.addForm.repairUserId = ''
+				}
+
+
+
+
 				this.getUser(data[0])
 			},
-			getUser(deptCode) {
+			getUser(deptCode, init) {
 				getUserPage({
 					pageNum: 1,
 					size: -1,
 					groupId: deptCode
 				}).then(data => {
-					this.userList = data.list.map(item => {
+					let list = data.list.map(item => {
 						item.text = item.name
 						item.value = item.id
 						return item
 					})
+					if (init) {
+						this.allList = list
+					}
+
+
+					if (this.depKey == 'leaderDeptName') {
+						this.userList = list
+					} else {
+						this.userList1 = list
+					}
+
 				})
 			},
 			getDept() {
@@ -338,7 +409,8 @@
 					this.listData = data
 				})
 			},
-			openPicker() {
+			openPicker(key) {
+				this.depKey = key
 				this.$refs.treePicker._show()
 			},
 			// 选择的设备

+ 73 - 30
pages/tour_tally/check/components/CheckCard.vue

@@ -1,6 +1,7 @@
 <template>
 	<view class="kd-check-card">
 		<view class="title">
+			<checkbox :value="item.id" color="#fff" />
 			<text class="label">{{ index + 1 }}</text>
 			<text>{{ item.name }}</text>
 		</view>
@@ -26,15 +27,27 @@
 			</view>
 			<view class="cell-content" v-else>无</view>
 		</view> -->
+		<view class="card-cell">
+			<text class="label">状态</text>
+			<text class="cell-content">
+
+				<view v-if="type == 'view'">
+					<div v-if="item.status == -1" style="color: red">异常</div>
+					<div v-else style="color: green">正常</div>
+				</view>
+				<view v-else>
+					<uni-data-picker @change="statusChange" style="width:100%" v-model="item.status" placeholder="请选择"
+						:localdata="statusList" :clear-icon="false">
+					</uni-data-picker>
+				</view>
+			</text>
+		</view>
 		<view class="card-cell">
 			<text class="label">结果</text>
 			<view class="cell-content">
-				<view class="content-status" v-if="type == 'view'">
-					<!-- {{ item.executeStatus?'正常':'异常' }} -->
-					<div v-if="item.status == 0" style="color: green">正常</div>
-					<div v-else-if="item.status == -1" style="color: red">异常</div>
-				</view>
-				<textarea v-if="type !== 'view'" placeholder="请输入" v-model="item.result" @input="inputChange($event, item)" />
+
+				<textarea v-if="type !== 'view'" placeholder="请输入" v-model="item.result"
+					 />
 				<view class="result-text" v-else>{{ item.result }}</view>
 				<view class="radio-wrapper">
 					<!-- <div
@@ -93,7 +106,9 @@
 <script>
 	import PreviewPhoto from '@/pages/maintenance/check/components/PreviewPhoto.vue'
 	export default {
-		components:{ PreviewPhoto },
+		components: {
+			PreviewPhoto
+		},
 		props: {
 			item: {
 				type: Object,
@@ -107,9 +122,14 @@
 		},
 		data() {
 			return {
-				statusList: [
-					{ label: '正常', status: 0 },
-					{ label: '异常', status: -1 }
+				statusList: [{
+						text: '正常',
+						value: 1
+					},
+					{
+						text: '异常',
+						value: -1
+					}
 				]
 			}
 		},
@@ -121,21 +141,26 @@
 			}
 		},
 		methods: {
-			inputChange(obj, item) {
-				if (obj.target.value.length > 0) {
-					item.status = -1
+			// inputChange(obj, item) {
+			// 	if (obj.target.value.length > 0 && obj.target.value != '正常') {
+			// 		item.status = -1
+			// 	} else {
+			// 		item.status = 1
+			// 	}
+			// },
+			statusChange() {
+				if (this.item.status == 1) {
+					this.item.result = '正常'
 				} else {
-					item.status = 0
+					this.item.result = '异常'
 				}
+
 			},
-			changeStatus(item, it) {
-				item.status = it.status
-			},
-			
+
 			// *** 新增拍照功能
 			chooseImage() {
 				const _this = this
-				if(_this.photoList.length >= 9){
+				if (_this.photoList.length >= 9) {
 					_this.$refs.uToast.show({
 						type: "warning",
 						message: "最多上传9张照片",
@@ -150,7 +175,7 @@
 						uni.showLoading({
 							title: '加载中'
 						})
-			
+
 						_this.uploadFile(res.tempFilePaths).then(res => {
 							res.forEach(item => {
 								let fileNames = item.storePath.split('/')
@@ -164,14 +189,14 @@
 									_this.$set(_this.item, 'photoList', [url])
 								} else {
 									// 不能存储超过 9 张
-									if(_this.item.photoList.length < 9){
+									if (_this.item.photoList.length < 9) {
 										_this.item.photoList.push(url);
 									}
 								}
 								// _this.imgs.push(url)
 							})
 							uni.hideLoading()
-			
+
 						})
 					}
 				});
@@ -201,8 +226,8 @@
 				return Promise.all(PromiseAll)
 			},
 			// 图片删除
-			imagedelete(index){
-				this.item.photoList.splice(index,1);
+			imagedelete(index) {
+				this.item.photoList.splice(index, 1);
 			},
 		}
 	}
@@ -210,9 +235,11 @@
 
 <style lang="scss" scoped>
 	$border-color: #f2f2f2;
+
 	.kd-check-card {
 		font-size: 28rpx;
 		border: 1rpx solid $border-color;
+
 		.label {
 			display: inline-block;
 			width: 80rpx;
@@ -220,28 +247,38 @@
 			border-right: 1px solid $border-color;
 			justify-content: center;
 		}
-		.mark{
+
+		.mark {
 			width: 80rpx;
 			height: 4rpx;
 			display: inline-block;
 		}
+
 		.title {
 			line-height: 72rpx;
 			font-weight: bold;
 			background-color: #f2f2f2;
 		}
+
 		.card-cell {
 			min-height: 72rpx;
 			display: flex;
 			align-items: stretch;
 			border: 1px solid $border-color;
+
 			text {
 				display: flex;
 				align-items: center;
 			}
 		}
+
 		.cell-content {
 			flex: 1;
+
+			/deep/span {
+				width: 100%;
+			}
+
 			.content-status {
 				width: 100%;
 				height: 50rpx;
@@ -250,27 +287,33 @@
 				border-bottom: 1rpx solid #f2f2f2;
 			}
 		}
+
 		.radio-wrapper {
 			padding: 10rpx 20rpx;
 			border-bottom: 1px solid $border-color;
 			margin-left: -8rpx;
 		}
+
 		/deep/uni-textarea {
 			width: 100%;
 			box-sizing: border-box;
 		}
+
 		.result-text {
 			min-height: 100rpx;
 			padding: 10rpx;
 		}
+
 		.cell-content {
 			padding-left: 8rpx;
 		}
+
 		.radio-wrapper {
 			display: flex;
 			align-items: center;
 			justify-content: space-around;
 		}
+
 		.wrapper-box {
 			width: 45%;
 			height: 80rpx;
@@ -281,15 +324,15 @@
 			border-radius: 15rpx;
 		}
 	}
-	
+
 	.photo_info {
 		width: 100%;
 		padding: 6px 12rpx;
-		
-		.btn_box{
+
+		.btn_box {
 			width: 100%;
 		}
-	
+
 		.photo_btn {
 			background-color: #157a2c;
 			width: 140rpx;
@@ -303,4 +346,4 @@
 			display: inline-block !important;
 		}
 	}
-</style>
+</style>

+ 7 - 4
pages/tour_tally/check/index.vue

@@ -2,7 +2,7 @@
 	<view>
 		<uni-nav-bar fixed="true" statusBar="true" left-icon="back" title="检查中" @clickLeft="back"></uni-nav-bar>
 
-		<view class="top-wrapper">
+<!-- 		<view class="top-wrapper">
 			<uni-section>
 				<uni-easyinput prefixIcon="search" style="width: 460rpx" v-model="keyWords" placeholder="请输入">
 				</uni-easyinput>
@@ -13,7 +13,7 @@
 			<image class="menu_icon" src="~@/static/pda/menu.svg"></image>
 
 
-		</view>
+		</view> -->
 
 		<view class="check-content">
 			<view class="title">
@@ -23,7 +23,7 @@
 			<view class="check-list" ref="scrollContainer">
 
 				<view v-for="(item,index) in filterList">
-					<CheckCard :item="item" class="mb20" :index="index"></CheckCard>
+					<CheckCard :item="item" class="mb20" :index="index" ref="CheckCardRef"></CheckCard>
 				</view>
 			</view>
 			<view class="footer">
@@ -106,6 +106,7 @@
 				let params = {
 					id: this.equipList[0].id,
 					executeStatus: isAllPass ? 1 : 2,
+					isAbnormal: isAllPass ? 1 : 0,
 					workItems: this.equipList.map(item => {
 						return {
 							content: item.content,
@@ -114,7 +115,7 @@
 							operationGuide: item.operationGuide,
 							result: item.result,
 							serialNum: item.serialNum,
-							status: item.status,
+							status: item.status == -1 ? -1 : 1,
 							photoList: item.photoList || []
 						}
 					})
@@ -238,6 +239,8 @@
 						return {
 							...item,
 							id: data.id,
+							status:1,
+							result:'正常',
 							executeStatus: 1
 						}
 					})

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

@@ -59,7 +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>
+							<button class="btn-reassignment" type="primary" @click="handleAssign" v-if="worksheetInfo.isGroup != 1">转派</button>
 						</template>
 						<button v-else-if="worksheetInfo.orderStatus === 3" :disabled="true" class="btn-execute"
 							type="primary">已报工</button>

+ 30 - 18
pages/tour_tally/order/OrderTask.vue

@@ -16,7 +16,7 @@
 						<view class="item_box rx-bc">
 							<view class="item_one perce50 rx-sc">
 								<view class="lable">设备名称:</view>
-								<view>{{item.deviceName}}</view>
+								<view class="deviceName">{{item.deviceName}}</view>
 							</view>
 						</view>
 						<view class="item_box rx-bc">
@@ -39,7 +39,7 @@
 						</u-empty>
 					</view>
 				</u-list-item>
-	
+
 			</u-list>
 		</view>
 	</view>
@@ -102,7 +102,7 @@
 	.marginTop {
 		border-top: 20rpx solid $page-bg;
 	}
-	
+
 	// .content_box {
 	// 	height: 100vh;
 	// 	overflow: hidden;
@@ -110,29 +110,29 @@
 	// 	flex-direction: column;
 	// 	background-color: $page-bg;
 	// }
-	
+
 	.list_box {
 		flex: 1;
 		overflow: hidden;
 		padding: 16rpx 0;
-	
+
 		.u-list {
 			height: 100% !important;
 		}
 	}
-	
+
 	.card_box {
 		width: 750rpx;
 		padding: 16rpx 32rpx;
 		box-sizing: border-box;
 		border-bottom: 2rpx solid #E1E1E1;
-	
-	
+
+
 		.item_box {
 			margin-top: 10rpx;
-	
-	
-	
+
+
+
 			.round {
 				width: 40rpx;
 				height: 40rpx;
@@ -143,7 +143,7 @@
 				text-align: center;
 				font-size: 20rpx;
 			}
-	
+
 			.orderId {
 				color: #000;
 				font-family: PingFang HK;
@@ -152,7 +152,7 @@
 				font-weight: 600;
 				margin-left: 16rpx;
 			}
-	
+
 			.item_one {
 				width: 100%;
 				font-size: 26rpx;
@@ -160,23 +160,35 @@
 				font-weight: 400;
 				line-height: 38rpx;
 				word-wrap: break-word;
+
+				.lable {
+					width: 150rpx;
+				}
+
+				.deviceName {
+					width: calc(750rpx - 150rpx);
+					display: -webkit-box;
+					-webkit-box-orient: vertical;
+					-webkit-line-clamp: 2;
+					overflow: hidden;
+				}
 			}
-	
+
 			.gylx {
 				color: $theme-color;
 			}
-	
+
 			.perce50 {
 				width: 100%;
 			}
 		}
-	
+
 		.flex_between {
 			display: flex;
 			justify-content: space-between;
 		}
 	}
-	
+
 	.state {
 		font-size: 28rpx;
 		color: #7f7f7f;
@@ -185,4 +197,4 @@
 		padding: 2px 5px;
 		border-radius: 10px;
 	}
-</style>
+</style>

+ 5 - 5
pages/warehouse/enterHouse/addStock.vue

@@ -480,9 +480,9 @@
 			// this.getDept()
 			// this.getSupplier()
 			const userInfo = uni.getStorageSync('userInfo')
-			console.log()
+			console.log('userInfo~~~', userInfo)
 			this.formData.extInfo.createUserName = userInfo.name
-			this.formData.createUserId = userInfo.name
+			this.formData.createUserId = userInfo.userId
 			this.storageTime = Number(new Date())
 			this.formData.storageTime = this.formatter(this.storageTime)
 			// this.formData.registerId = userInfo.id
@@ -1086,7 +1086,7 @@
 					console.log('!!this.getDict(item.measureUnit).dictValue--------', this.getDict(item.measureUnit))
 					if (outBoolen) {
 						// 计量单位为KG类,直接替换
-						item.weight = item.measureQuantity
+						item.weight = item.measureQuantity || 0
 					} else {
 						// 计量单位为不为KG类,重新统计计算
 						let inBoolen = !!this.getDict(item.packingSpecificationOption[0].packageUnit).dictValue
@@ -1104,11 +1104,11 @@
 						}
 						if (inBoolen) {
 							// 第二层为KG类
-							item.weight = total
+							item.weight = total || 0
 						} else {
 							// 第二层不为KG类
 							// item.weight = this.$math.format(total * item.netWeight, 14)
-							item.weight = total * item.netWeight
+							item.weight = total * item.netWeight  || 0
 						}
 					}
 					row.outInDetailRecordRequestList.push(item)

+ 31 - 9
store/modules/dict.js

@@ -1,14 +1,21 @@
 import dictEnum from '@/enum/dict'
 import Vue from 'vue'
+// import {
+// 	get,
+// 	postJ
+// } from "@/utils/api.js";
 import {
 	get,
-	postJ
-} from "@/utils/api.js";
-const getSubListByParentId = function (id = 0){
+	put,
+	putJ,
+	postJ,
+	deleteApi
+} from "@/utils/request";
+const getSubListByParentId = function(id = 0) {
 	return get(Vue.prototype.apiUrl + `/classify/getSubListByParentId/${id}`)
 }
-const getDictListByMainCode = function (mainCode){
-	return get(Vue.prototype.apiUrl + `/enumerationKeyvalue/getListByMainCode/${mainCode}`,undefined)
+const getDictListByMainCode = function(mainCode) {
+	return get(Vue.prototype.apiUrl + `/system/dict/getByCode/${mainCode}`)
 }
 //非枚举定义
 const otherDictConfig = {
@@ -28,6 +35,7 @@ const mutations = {
 		code,
 		dict
 	}) => {
+		console.log(dict, 'dict1')
 		Vue.set(state, code, dict)
 	}
 
@@ -61,7 +69,7 @@ const actions = {
 		let res
 		if (otherDictConfig[dictEnum[enumName]]) {
 			const config = otherDictConfig[dictEnum[enumName]]
-			console.log(config)
+
 			//非枚举定义
 			res = await config.request()
 			if (res?.success) {
@@ -78,10 +86,17 @@ const actions = {
 			}
 		} else {
 			res = await getDictListByMainCode(code)
-			if (res?.success) {
+			if (res?.code == 0) {
 				commit('ADD_DICT', {
 					code,
-					dict: res.data
+					dict: res.data.map((item) => {
+					const arr = Object.entries(item)[0] || [];
+
+					return {
+						dictCode:  arr[0],
+						dictValue: arr[1]
+					};
+				})
 				})
 				return res.data
 			}
@@ -98,7 +113,14 @@ const actions = {
 		if (res?.success) {
 			commit('ADD_DICT', {
 				code,
-				dict: res.data
+				dict: res.data.map((item) => {
+					const arr = Object.entries(item)[0] || [];
+
+					return {
+						dictCode:arr[0],
+						dictValue: arr[1]
+					};
+				})
 			})
 			return res.data
 		}