Explorar o código

Merge branch 'master' of http://36.137.93.232:3000/hf/byte-sailing-mobile

cz hai 1 ano
pai
achega
1097d59256

+ 1 - 1
src/assets/css/index.scss

@@ -229,5 +229,5 @@ li {
 }
 
 :root{
-    --van-field-label-width:8.2em!important;
+    --van-field-label-width:10.2em!important;
 }

+ 1 - 1
src/components/testForm/index.vue

@@ -10,7 +10,7 @@
       ref="testForm"
     >
       <van-cell-group inset>
-        <div v-for="(i, index) in formConfig" :key="index">
+        <div v-for="(i, index) in formConfig" :key="index" :style="i.style || ''">
           <van-field v-if="i.type == 'title'">
             <template #input>
               <div class="_title">

+ 61 - 84
src/views/commonModule/contractTemplate/add.vue

@@ -45,24 +45,22 @@ const formOption = reactive({
 	// hiddenSubmitBtn: true,
 })
 const formConfig = reactive([
+    {
+        type:"title",
+        title:"基本信息"
+    },
 	{
 		type: 'input',
 		itemType: 'text',
-		label: '公司名称',
-		prop: 'name',
-		clearable: true,
-	},
-	{
-		type: 'input',
-		itemType: 'text',
-		label: '英文名',
-		prop: 'nameEn',
+		label: '模板名称',
+		prop: 'templateName',
 		clearable: true,
 	},
+	
 	{
 		type: 'picker',
-		label: '企业类型',
-		prop: 'type',
+		label: '公司名称',
+		prop: 'corporationId',
 		itemType: 'onePicker',
 		showPicker: false,
 		fieldNames: {
@@ -71,117 +69,96 @@ const formConfig = reactive([
 		},
         data:[],
 	},
-
-	{
+    {
+        type:"title",
+        title:"联系信息"
+    },
+    {
 		type: 'input',
 		itemType: 'text',
-		label: '统一社会信用代码',
-		prop: 'uscCode',
+		label: '业务联系人',
+		prop: 'contactName',
 		clearable: true,
 	},
 	{
 		type: 'input',
-		itemType: 'text',
-		label: '法定代表人',
-		prop: 'legalPersonName',
+		itemType: 'number',
+		label: '业务联系人电话',
+		prop: 'contactNumber',
 		clearable: true,
 	},
 	{
 		type: 'input',
-		itemType: 'text',
-		label: '注册资本',
-		prop: 'registeredCapital',
+		itemType: 'number',
+		label: '公司电话',
+		prop: 'corporationNumber',
 		clearable: true,
 	},
-	{
-		type: 'picker',
-		label: '营业时间(开始)',
-		prop: 'startDate',
-		itemType: 'datePicker',
-		showPicker: false,
-		split: '-',
-	},
-	{
-		type: 'picker',
-		label: '营业时间(结束)',
-		prop: 'stopDate',
-		itemType: 'datePicker',
-		showPicker: false,
-		split: '-',
-	},
-	{
+    {
 		type: 'cascader',
-		label: '注册地址',
-		prop: 'city',
+		label: '公司地址',
+		prop: 'cityObj',
 		itemType: 'city',
 		showPicker: false,
+        style:'border-top:6px solid #f7f8fa;'
 	},
-	{
+    {
 		type: 'input',
 		itemType: 'textarea',
 		label: '详细地址',
-		prop: 'detailedAddress',
+		prop: 'address',
 	},
 	{
-		type: 'picker',
-		label: '纳税人资质',
-		prop: 'taxpayerQualification',
+		type: 'input',
+		itemType: 'text',
+		label: '公司地址(英文/国家)',
+		prop: 'countryEnStr',
 		clearable: true,
-		itemType: 'onePicker',
-		showPicker: false,
-		fieldNames: {
-			text: 'dictValue',
-			value: 'dictKey',
-		},
+        style:'border-top:6px solid #f7f8fa;'
 	},
-	{
+    {
 		type: 'input',
 		itemType: 'text',
-		label: '海关注册代码',
-		prop: 'crCode',
+		label: '公司地址(英文/省/州)',
+		prop: 'provinceEnStr',
 		clearable: true,
 	},
-	{
-		type: 'upload',
-		label: '企业logo',
-		prop: 'enterpriseLogoList',
-	},
-	{
-		type: 'upload',
-		label: '法人签名',
-		prop: 'larSignList',
+    {
+		type: 'input',
+		itemType: 'text',
+		label: '公司地址(英文/城市)',
+		prop: 'cityEnStr',
+		clearable: true,
 	},
 	{
-		type: 'upload',
-		label: '公章',
-		prop: 'officialSealList',
+		type: 'input',
+		itemType: 'textarea',
+		label: '详细地址(英文)',
+		prop: 'addressEn',
 	},
-	{
-		type: 'upload',
-		label: '合同章',
-		prop: 'contractSealList',
+    {
+		type: 'input',
+		itemType: 'textarea',
+		label: '合同模板',
+		prop: 'templateContent',
 	},
 ])
 const rules = {
-	name: [{ required: true, message: '公司名称不能为空' }],
+	templateName: [{ required: true, message: "请输入模板名称", trigger: "blur" }],
+	corporationId: [{ required: true, message: "请选择公司", trigger: "change" }],
+	countryId: [{ required: true, message: "请选择国家", trigger: "change" }],
+	countryEnStr: [{ required: true, message: "请输入国家 (英文)", trigger: "blur" }],
+	provinceEnStr: [{ required: true, message: "请输入省/洲 (英文)", trigger: "blur" }],
 }
 const unitList = ref([])
 
 const getDict = () => {
 	proxy
-		.post('/tenantDict/getDict', {
-			dictCode: 'enterprise_type',
-		})
-		.then((res) => {
-			formConfig[2].data = res.data
-		})
-	proxy
-		.post('/tenantDict/getDict', {
-			dictCode: 'taxpayer_qualification',
-		})
+		.post('/corporation/page', { pageNum: 1, pageSize: 999 })
 		.then((res) => {
-			formConfig[10].data = res.data
+			formConfig[2].data = res.data.rows
 		})
+	
 }
 getDict()
 const fileList = ref([])
@@ -206,7 +183,7 @@ const onSubmit = () => {
 				formData.data.cityObj.selectedOptions[2].value
 		}
 	}
-	proxy.post('/corporation/' + route.query.type, formData.data).then(() => {
+	proxy.post('/contractTemplate/' + route.query.type, formData.data).then(() => {
 		showSuccessToast('添加成功')
 		setTimeout(() => {
 			history.back()
@@ -228,7 +205,7 @@ const treeToList = (arr) => {
 onMounted(() => {
 	if (route.query.id) {
 		proxy
-			.post('/corporation/detail', { id: route.query.id })
+			.post('/contractTemplate/detail', { id: route.query.id })
 			.then((resDetail) => {
 				formData.data = resDetail.data
 			})

+ 5 - 5
src/views/commonModule/contractTemplate/index.vue

@@ -30,15 +30,15 @@ const classification = ref([]);
 const listConfig = ref([
   {
     label: "公司名称",
-    prop: "name",
+    prop: "corporationName",
   },
   {
-    label: "公司英文名称",
-    prop: "nameEn",
+    label: "模板名称",
+    prop: "templateName",
   },
   {
-    label: "法定代表人",
-    prop: "legalPersonName",
+    label: "联系人",
+    prop: "contactName",
   },
 ]);
 const onRefresh = () => {

+ 2 - 1
src/views/home/index.vue

@@ -41,7 +41,7 @@
 				</div>
 			</li>
 		</ul>
-		<van-button class="logout" type="primary" @click="logout" block
+		<van-button class="logout" v-if="!corpId" type="primary" @click="logout" block
 			>退出登录</van-button
 		>
 	</div>
@@ -54,6 +54,7 @@ import { getUserInfo } from '@/utils/auth'
 const onClickLeft = () => history.back()
 const proxy = getCurrentInstance().proxy
 const userInfo = ref(getUserInfo())
+const corpId = window.localStorage.getItem('corpId')
 console.log(userInfo)
 const toMessageList = () => {
 	proxy.$router.push('/main/messageList')

+ 3 - 10
src/views/login.vue

@@ -49,7 +49,6 @@
 				</div>
 			</van-form>
 		</div>
-		{{ loginData }}+++{{code}}
 		<div class="login-btn">
 			<div class="check-warp">
 				<div class="check-icon-warp">
@@ -63,11 +62,7 @@
 				{{ $t('login.agreement.and') }}
 				<span>{{ $t('login.agreement.agreement') }}</span>
 			</div>
-			<!-- <button type="default" @click="lodingFn">
-				{{ $t('login.loginText') }}
-			</button>
-			<p @click="toDemo" class="demo">{{ $t('login.demo') }}</p> -->
-			<!-- <p @click="change11">切换 {{system_info}}</p> -->
+
 		</div>
 	</div>
 </template>
@@ -211,7 +206,6 @@ const ddLoginInit = () => {
 		proxy.$router.push('/main')
 	}
 	dd.ready(function () {
-		alert(route.query.id)
 		dd.runtime.permission.requestAuthCode({
 			corpId: route.query.id, // 企业id
 			onSuccess: function (info) {
@@ -220,14 +214,13 @@ const ddLoginInit = () => {
 				proxy
 					.post('/open/dingApi/getUserToken', { code: code.value,corpId:route.query.id })
 					.then((res) => {
-						
+						window.localStorage.setItem('corpId',route.query.id)
 						setToken(res.data)
 						getInfo()
 					})
 			},
 			onFail: function (err) {
-				alert(JSON.stringify(err))
-				
+			
 			},
 		})
 	})

+ 6 - 1
src/views/main.vue

@@ -47,4 +47,9 @@ if(isDev) {
 
 }
 
-</script>
+</script>
+<style lang="scss">
+	.footer{
+		
+	}
+</style>

+ 1 - 1
src/views/message/index.vue

@@ -11,7 +11,7 @@
                 </div>
                 <div class="text-center">
                     <div class="title">系统通知</div>
-                    <div class="content">啊实打实多阿萨德啊撒打说的啊打打萨达打萨达萨达阿萨德啊打萨达</div>
+                    <div class="content">啊实打实多阿萨德啊撒打说</div>
                 </div>
                 <div class="text-right">
                     <div class="time-or-num">