Pārlūkot izejas kodu

用印审批加所属公司

shanbinzhang 4 mēneši atpakaļ
vecāks
revīzija
0eabfc0626

+ 5 - 0
api/approve/seal.js

@@ -156,4 +156,9 @@ export const apiSealCheckBackFiles=params=>{
  */
 export const apiSearchAllCustome=params=>{
 	return httpGet('/seal/company_name_list',params)
+}
+
+
+export const getBelongCompany = params => {
+	return httpGet('/seal/getAffiliatedCompany')
 }

+ 1 - 0
pages-approve/components/approveListItem.vue

@@ -5,6 +5,7 @@
 			<view>{{data.title}}</view>
 		</view>
 		<view class="message-content">
+			<view class="info">归属公司:{{data.AffiliatedCompany}}</view>
 			<view class="info">申请销售:{{data.saller}}</view>
 			<view class="info">
 				<text>申请类型:{{data.applyType}}</text>

+ 27 - 0
pages-approve/seal/addSeal.vue

@@ -1,5 +1,10 @@
 <template>
 	<view class="add-page white-wrap" @click="handleClickPage">
+		<view class="section white-wrap">
+			<view class="section-title require">归属公司</view>
+			<view class="section-select-box" :style="{color:belongCompany?'#333':'#999'}" @click="showBelongCompanyPop=true">{{belongCompany?belongCompany:'请选择'}}</view>
+		</view>
+		
 		<view class="section white-wrap">
 			<view class="section-title require">用印用途</view>
 			<view class="section-select-box" :style="{color:purpose?'#333':'#999'}" @click="showPurpose=true">{{purpose?purpose:'请选择'}}</view>
@@ -106,6 +111,16 @@
 		</view>
 		
 		
+		<!-- 归属公司 -->
+		<van-popup :show="showBelongCompanyPop" @close="showBelongCompanyPop=false" position="bottom">
+			<van-picker 
+				show-toolbar 
+				title="选择归属公司" 
+				:columns="belongCompanyOptions" 
+				@confirm="handleComfirmBelongCmpany"  
+				@cancel="showBelongCompanyPop=false"
+			/>
+		</van-popup>
 		<!-- 用印用途 -->
 		<van-popup :show="showPurpose" @close="showPurpose=false" position="bottom">
 			<van-picker 
@@ -191,6 +206,9 @@
 				ContractfileUrl:'',//合同文件地址 pdf
 			}
 		},
+		onLoad() {
+			this.getBelongCompanyOptions()
+		},
 		methods: {
 			// 选择合同 更新表单数据
 			handleChooseContract(e){
@@ -201,6 +219,7 @@
 				this.UseCompanyName=e.ContractBusinessType=='代付合同'?e.UseCompanyName:e.CompanyName
 				this.ContractId=e.ContractId
 				this.ContractfileUrl=e.FileUrl
+				this.belongCompany=e.AffiliatedCompany
 				// 关闭搜索弹窗
 				this.showCustome=false
 				this.searchCustomeVal=''
@@ -239,8 +258,16 @@
 					ServiceType:this.ServiceType,
 					Use:this.purpose,
 					UseCompanyName:this.UseCompanyName,
+					AffiliatedCompany: this.belongCompany
 				}
 				
+				if(!params.AffiliatedCompany){
+					uni.showToast({
+						title:'请选择归属公司',
+						icon:"none"
+					})
+					return
+				}
 				if(!params.Use){
 					uni.showToast({
 						title:'请选择用印用途',

+ 38 - 3
pages-approve/seal/detail.vue

@@ -2,6 +2,9 @@
 	<view class="detail white-wrap">
 		<image :src="statusImg" mode="aspectFill" class="status-img" v-if="statusImg"></image>
 		<view class="section white-wrap">
+			<view class="section-title require">归属公司</view>
+			<view :class="opButton.CheckEdit?'section-select-box':null" :style="{color:belongCompany?'#333':'#999'}" @click="handleOperation('showPurpose')">{{belongCompany?belongCompany:'请选择'}}</view>
+		</view><view class="section white-wrap">
 			<view class="section-title require">用印用途</view>
 			<view :class="opButton.CheckEdit?'section-select-box':null" :style="{color:newUse?'#333':'#999'}" @click="handleOperation('showPurpose')">{{newUse?newUse:'请选择'}}</view>
 		</view>
@@ -102,6 +105,18 @@
 		<!-- <view class="fix-bottom-wrap" style="text-align: center;" v-if="opButton.Cancel">
 			<van-button type="info" color="#3385FF" custom-class="btn-big" round @click="handleCancelApply">撤回申请</van-button>
 		</view> -->
+
+
+		<!-- 归属公司 -->
+		<van-popup :show="showBelongCompanyPop" @close="showBelongCompanyPop=false" position="bottom">
+			<van-picker 
+				show-toolbar 
+				title="选择归属公司" 
+				:columns="belongCompanyOptions" 
+				@confirm="handleComfirmBelongCmpany"  
+				@cancel="showBelongCompanyPop=false"
+			/>
+		</van-popup>
 		
 		<!-- 用印用途 -->
 		<van-popup :show="showPurpose" @close="showPurpose=false" position="bottom">
@@ -186,8 +201,9 @@
 		apiApprovalPassModify,
 		apiSealCancelApply,
 		apiFlowDetail,
-		apiSealCheckBackFiles
-		} from '@/api/approve/seal.js'
+		apiSealCheckBackFiles,
+		getBelongCompany 
+	} from '@/api/approve/seal.js'
 	import steps from '../components/steps.vue'
 	import {preViewFile} from '../utils/util.js'
 	import {uploadFiles} from '@/utils/uploadFile.js'
@@ -282,7 +298,12 @@
 				newFileNum:'',
 				newSealType:[],
 				newRemark:'',
-				oldFile:''
+				oldFile:'',
+
+				//归属公司弹窗
+				showBelongCompanyPop:false,
+				belongCompany:'',
+				belongCompanyOptions:[]
 			}
 		},
 		onLoad(options) {
@@ -290,6 +311,7 @@
 			this.ContractApprovalRecordId=options.ContractApprovalRecordId||0
 			this.SealId=options.SealId||0
 			this.getDetail()
+			this.getBelongCompanyOptions()
 		},
 		onShow() {
 			uni.$once('updateSealDetail',(data)=>{
@@ -304,6 +326,12 @@
 			},1000)
 		},
 		methods: {
+			async getBelongCompanyOptions() {
+					const res = await getBelongCompany()
+					if(res.code !==200 ) return
+					this.belongCompanyOptions = res.data || []
+			},
+
 			// 上传(更新)签回附件
 			handleUploadCheckFile(){
 				wx.chooseMessageFile({
@@ -491,6 +519,12 @@
 				});
 				
 			},
+
+			//归属公司选择
+			handleComfirmBelongCmpany(e) {
+					this.belongCompany = e.detail.value;
+					this.showBelongCompanyPop = false;
+			},
 			
 			handlePurposeConfirm(e){
 				this.newUse=e.detail.value
@@ -749,6 +783,7 @@
 					this.newSealType=res.data.SealDetail.SealType.split(',')
 					this.temType=res.data.SealDetail.SealType.split(',')
 					this.newRemark=res.data.SealDetail.Remark
+					this.belongCompany=res.data.SealDetail.AffiliatedCompany
 					this.processData=res.data.FlowNodeList
 					this.opButton=res.data.OpButton
 					this.handleFile(res.data.SealDetail.FileUrls)

+ 27 - 1
pages-approve/seal/edit.vue

@@ -1,5 +1,10 @@
 <template>
 	<view class="add-page white-wrap">
+		<view class="section white-wrap">
+			<view class="section-title require">归属公司</view>
+			<view class="section-select-box" :style="{color:belongCompany?'#333':'#999'}" @click="showBelongCompanyPop=true">{{belongCompany?belongCompany:'请选择'}}</view>
+		</view>
+		
 		<view class="section white-wrap">
 			<view class="section-title require">用印用途</view>
 			<view class="section-select-box" :style="{color:purpose?'#333':'#999'}" @click="showPurpose=true">{{purpose?purpose:'请选择'}}</view>
@@ -99,6 +104,16 @@
 			<van-button type="info" custom-class="btn" round @click="handleSubmit">提交</van-button>
 		</view>
 		
+		<!-- 归属公司 -->
+		<van-popup :show="showBelongCompanyPop" @close="showBelongCompanyPop=false" position="bottom">
+			<van-picker 
+				show-toolbar 
+				title="选择归属公司" 
+				:columns="belongCompanyOptions" 
+				@confirm="handleComfirmBelongCmpany"  
+				@cancel="showBelongCompanyPop=false"
+			/>
+		</van-popup>
 		
 		<!-- 用印用途 -->
 		<van-popup :show="showPurpose" @close="showPurpose=false" position="bottom">
@@ -190,6 +205,7 @@
 			let ContractApprovalRecordId=options.ContractApprovalRecordId
 			let SealId=options.SealId
 			this.getDetail({ContractApprovalId,ContractApprovalRecordId,SealId})
+			this.getBelongCompanyOptions()
 		},
 		methods: {
 			
@@ -216,6 +232,7 @@
 					this.remark=res.data.SealDetail.Remark
 					this.CreditCode=res.data.SealDetail.CreditCode
 					this.UseCompanyName=res.data.SealDetail.UseCompanyName
+					this.belongCompany=res.data.SealDetail.AffiliatedCompany
 					// this.ContractfileUrl=res.data.SealDetail.FileUrl
 					this.handleFile(res.data.SealDetail.FileUrls)
 					this.ContractId=res.data.SealDetail.ContractId
@@ -258,6 +275,7 @@
 				this.ServiceType=e.ContractType
 				this.UseCompanyName=e.ContractBusinessType=='代付合同'?e.UseCompanyName:e.CompanyName
 				this.ContractId=e.ContractId
+				this.belongCompany=e.AffiliatedCompany
 				// this.ContractfileUrl=e.FileUrl
 				this.handleFile([e.FileUrl])
 				// 关闭搜索弹窗
@@ -281,9 +299,17 @@
 					ServiceType:this.ServiceType,
 					Use:this.purpose,
 					UseCompanyName:this.UseCompanyName,
-					SealId:Number(this.SealId)
+					SealId:Number(this.SealId),
+					AffiliatedCompany: this.belongCompany
 				}
 				
+				if(!params.AffiliatedCompany){
+					uni.showToast({
+						title:'请选择归属公司',
+						icon:"none"
+					})
+					return
+				}
 				if(!params.Use){
 					uni.showToast({
 						title:'请选择用印用途',

+ 20 - 3
pages-approve/seal/mixin.js

@@ -1,4 +1,4 @@
-import { apiFlowDetail, apiSealAdd, apiSearchCustome, apiSearchContract,apiSearchAllCustome } from "@/api/approve/seal.js";
+import { apiFlowDetail, apiSealAdd, apiSearchCustome, apiSearchContract,apiSearchAllCustome,getBelongCompany } from "@/api/approve/seal.js";
 import { uploadFiles } from "@/utils/uploadFile.js";
 import { preViewFile } from "../utils/util.js";
 export const sealMixin = {
@@ -32,7 +32,7 @@ export const sealMixin = {
             purpose: "",
 
             showType: false, //显示用印用途选项
-            typeArr: ["合同章", "公章", "法人章"],
+            typeArr: ["合同章", "公章", "法人章","电子合同章"],
             type: [],
             temType: [], //临时存放选择的用印用途
 
@@ -71,10 +71,21 @@ export const sealMixin = {
                 finished:false,
                 loading:false
             },
-            temCustomeName:''
+            temCustomeName:'',
+				
+            //归属公司弹窗
+            showBelongCompanyPop:false,
+            belongCompany:'',
+            belongCompanyOptions:[]
         };
     },
     methods: {
+        async getBelongCompanyOptions() {
+            const res = await getBelongCompany()
+            if(res.code !==200 ) return
+            this.belongCompanyOptions = res.data || []
+        },
+
         //删除上传的附件
         handleDeleteCheckFile(file) {
 			this.fileList = this.fileList.filter(item => item.url!= file.url)
@@ -159,6 +170,12 @@ export const sealMixin = {
                 }
             }
         },
+		  
+		  //归属公司选择
+        handleComfirmBelongCmpany(e) {
+            this.belongCompany = e.detail.value;
+            this.showBelongCompanyPop = false;
+        },
 
         // 选择用印用途
         handlePurposeConfirm(e) {

+ 1 - 0
pages-todomessages/list/list.vue

@@ -61,6 +61,7 @@
                         <view class="info">修改时间:{{item.CreateTime|formatTime}}</view>
                      </view>
                      <view v-else>
+                     <view class="info">归属公司:{{item.AffiliatedCompany}}</view>
                      <view class="info">申请销售:{{item.ApprovalInfo.ApplyName}}</view>
                      <view class="info" v-if="item.statusName==='待审批'">提交时间:{{item.ApprovalInfo.ApplyTime|formatTime}}</view>
                      <view class="info" v-else>审批时间:{{item.ApprovalInfo.ApprovalTime|formatTime}}</view>