Z 1 рік тому
батько
коміт
6bd6b606ba

+ 24 - 2
api/saleManage/saleorder/index.js

@@ -98,7 +98,7 @@ export async function projectsPageAPI(data) {
     return Promise.reject(new Error(res.message));
     return Promise.reject(new Error(res.message));
 }
 }
 /**
 /**
- * 查询货单列表
+ * 查询货单列表
  * @data data
  * @data data
  */
  */
 export async function saleordersendrecord(data) {
 export async function saleordersendrecord(data) {
@@ -109,7 +109,7 @@ export async function saleordersendrecord(data) {
     return Promise.reject(new Error(res.message));
     return Promise.reject(new Error(res.message));
 }
 }
 /**
 /**
- * 查询收货单列表
+ * 查询发货单详情
  * @data data
  * @data data
  */
  */
 export async function saleordersendrecordInfo(id) {
 export async function saleordersendrecordInfo(id) {
@@ -119,3 +119,25 @@ export async function saleordersendrecordInfo(id) {
     }
     }
     return Promise.reject(new Error(res.message));
     return Promise.reject(new Error(res.message));
 }
 }
+/**
+ * 新增发货确认单
+ * @data data
+ */
+export async function saleordersendconfirmSave(data) {
+    const res = await postJ(Vue.prototype.apiUrl+`/eom/saleordersendconfirm/save`, data);
+    if (res.code == 0) {
+        return res.data;
+    }
+    return Promise.reject(new Error(res.message));
+}
+/**
+ * 查询发货确认单详情
+ * @data data
+ */
+export async function saleordersendconfirmInfo(id) {
+    const res = await get(Vue.prototype.apiUrl+`/eom/saleordersendconfirm/getById/${id}`, {});
+    if (res.code == 0) {
+        return res.data;
+    }
+    return Promise.reject(new Error(res.message));
+}

+ 22 - 1
api/wt/index.js

@@ -402,4 +402,25 @@ export async function getProcessInstanceNoticePage(data) {
 	  return res.data;
 	  return res.data;
 	}
 	}
 	return Promise.reject(new Error(res.data.message));
 	return Promise.reject(new Error(res.data.message));
-	};
+	};
+	
+	//发起流程通用接口
+	export async function processInstanceCreateAPI(params, loding = true) {
+		const res = await postJ(
+			Vue.prototype.apiUrl + `/bpm/process-instance/create`, params, loding
+		);
+		if (res.code == 0) {
+			return res.data;
+		}
+		return Promise.reject(new Error(res.message));
+	}
+	//流程列表
+	export async function processInstancePage(params, loding = false) {
+		const res = await get(
+			Vue.prototype.apiUrl + `/bpm/model/page`, params, loding
+		);
+		if (res.code == 0) {
+			return res.data;
+		}
+		return Promise.reject(new Error(res.message));
+	}

+ 41 - 1
pages.json

@@ -1951,6 +1951,22 @@
 				"navigationBarTextStyle": "white"
 				"navigationBarTextStyle": "white"
 			}
 			}
 		},
 		},
+		{
+					"path": "pages/saleManage/businessOpportunity/followList",
+					"style": {
+						"navigationBarTitleText": "商机跟进记录",
+						"navigationStyle": "custom",
+						"navigationBarTextStyle": "white"
+					}
+				},
+				{
+					"path": "pages/saleManage/contact/followList",
+					"style": {
+						"navigationBarTitleText": "客户跟进记录",
+						"navigationStyle": "custom",
+						"navigationBarTextStyle": "white"
+					}
+				},
 		{
 		{
 			"path": "pages/saleManage/components/selectContact",
 			"path": "pages/saleManage/components/selectContact",
 			"style": {
 			"style": {
@@ -2028,7 +2044,31 @@
 				"navigationStyle": "custom",
 				"navigationStyle": "custom",
 				"navigationBarTextStyle": "white"
 				"navigationBarTextStyle": "white"
 			}
 			}
-		}
+		},
+		{
+					"path": "pages/saleManage/components/selectProject",
+					"style": {
+						"navigationBarTitleText": "选择项目",
+						"navigationStyle": "custom",
+						"navigationBarTextStyle": "white"
+					}
+				},
+				{
+					"path": "pages/doc/selectDoc",
+					"style": {
+						"navigationBarTitleText": "关联文档库",
+						"navigationStyle": "custom",
+						"navigationBarTextStyle": "white"
+					}
+				},
+				{
+					"path": "pages/doc/docList",
+					"style": {
+						"navigationBarTitleText": "文档管理",
+						"navigationStyle": "custom",
+						"navigationBarTextStyle": "white"
+					}
+				}
 	],
 	],
 	"tabBar": {
 	"tabBar": {
 		"color": "#908f8f",
 		"color": "#908f8f",

+ 46 - 37
pages/invoiceConfirm/index.vue

@@ -43,9 +43,14 @@
 <script>
 <script>
 	import fileDoc from '../doc/index.vue'
 	import fileDoc from '../doc/index.vue'
 	import {
 	import {
-		saleordersendrecordInfo
+		saleordersendrecordInfo,
+		saleordersendconfirmSave,
+		saleordersendconfirmInfo
 	} from '@/api/saleManage/saleorder/index.js'
 	} from '@/api/saleManage/saleorder/index.js'
-	
+	import {
+		processInstanceCreateAPI,
+		processInstancePage
+	} from '@/api/wt/index.js'
 	export default {
 	export default {
 		components: {fileDoc},
 		components: {fileDoc},
 		data() {
 		data() {
@@ -60,13 +65,10 @@
 			}
 			}
 		},
 		},
 		onLoad(options={}) {
 		onLoad(options={}) {
-			console.log(options,'====')
 			// 详情
 			// 详情
 			if(options.id){
 			if(options.id){
 				this.getInfo(options.id)
 				this.getInfo(options.id)
 			}
 			}
-		
-
 		},
 		},
 		computed: {
 		computed: {
 		
 		
@@ -74,25 +76,22 @@
 
 
 		methods: {
 		methods: {
 			back() {
 			back() {
-				uni.navigateBack({
+				uni.switchTab({
 					url: '/pages/index/index'
 					url: '/pages/index/index'
 				})
 				})
 			},
 			},
 			async getInfo(id) {
 			async getInfo(id) {
-		
 				      const data = await saleordersendrecordInfo(id);
 				      const data = await saleordersendrecordInfo(id);
-				    
 				      if (data) {
 				      if (data) {
 				       this.info = data;
 				       this.info = data;
 				       this.info.sendId = this.info.id
 				       this.info.sendId = this.info.id
 				       this.info.sendNo = this.info.docNo
 				       this.info.sendNo = this.info.docNo
 				        this.info.docNo = ''
 				        this.info.docNo = ''
 				        this.info.id = ''
 				        this.info.id = ''
-				      
+				
 				      }
 				      }
-
 			},
 			},
-			handleSubmit() {
+			async handleSubmit() {
 				if(!this.info.sendNo){
 				if(!this.info.sendNo){
 					uni.showModal({
 					uni.showModal({
 						title: `请选择发货单`,
 						title: `请选择发货单`,
@@ -100,12 +99,9 @@
 						icon: 'error',
 						icon: 'error',
 						confirmText: '确认',
 						confirmText: '确认',
 						showCancel: false, // 是否显示取消按钮,默认为 true
 						showCancel: false, // 是否显示取消按钮,默认为 true
-						success: res => {
-							if (res.confirm) {
-								this.back()
-							}
-						}
+						
 					})
 					})
+					return
 				}
 				}
 				if(!this.info.repliedFiles.length){
 				if(!this.info.repliedFiles.length){
 					uni.showModal({
 					uni.showModal({
@@ -114,35 +110,48 @@
 						icon: 'error',
 						icon: 'error',
 						confirmText: '确认',
 						confirmText: '确认',
 						showCancel: false, // 是否显示取消按钮,默认为 true
 						showCancel: false, // 是否显示取消按钮,默认为 true
-						success: res => {
-							if (res.confirm) {
-								this.back()
-							}
-						}
+					
 					})
 					})
+					return
 				}
 				}
-				// this.currentRow.status = status
-				// logistictraklistnoteUpdateAPI(this.currentRow)
-				// uni.showModal({
-				// 	title: `此工单执行成功`,
-				// 	content: '',
-				// 	confirmText: '确认',
-				// 	showCancel: false, // 是否显示取消按钮,默认为 true
-				// 	success: res => {
-				// 		if (res.confirm) {
-				// 			this.back()
-				// 		}
-				// 	}
-				// })
+			   try{
+				   //后台不提供接口
+				   let id = await saleordersendconfirmSave(this.info)
+				   let data = await saleordersendconfirmInfo(id)
+				   let list = await processInstancePage({pageNo: 1,pageSize: 1,reset: true,key: 'sales_sendconfirm_approve'})
+				   let params = {
+				             businessId: data.id,
+				             businessKey : 'sales_sendconfirm_approve',
+				             formCreateUserId: data.createUserId,
+							 processDefinitionId: list?.list[0]?.processDefinition.id,
+				             variables: {
+				               businessCode: data.docNo
+				             },
+				           }
+						   
+						await processInstanceCreateAPI(params)
+						uni.showModal({ 
+							title: `提交成功`,
+							content: '',
+							confirmText: '确认',
+							showCancel: false, // 是否显示取消按钮,默认为 true
+							success:()=> {
+								this.back()
+							}
+						
+						})
+						
+						   
+			   }catch{
+				   
+			   }
+			    
 			},
 			},
 			handleInvoiceList() {
 			handleInvoiceList() {
 				uni.navigateTo({
 				uni.navigateTo({
 					url: `/pages/invoiceConfirm/invoice`
 					url: `/pages/invoiceConfirm/invoice`
 				})
 				})
 			},
 			},
-			handleAssign() {
-				this.$refs.transferRef.open(this.currentRow)
-			},
 		}
 		}
 	}
 	}
 </script>
 </script>

+ 5 - 0
pages/invoiceConfirm/invoice.vue

@@ -66,6 +66,11 @@
 			this.getList()
 			this.getList()
 		},
 		},
 		methods: {
 		methods: {
+			back(){
+				uni.navigateTo({
+					url:'/pages/invoiceConfirm/index'
+				})
+			},
 			async getList() {
 			async getList() {
 				let params = {
 				let params = {
 					pageNum: this.page,
 					pageNum: this.page,