grainpulseenterprisereview.vue 32 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048
  1. <!--粮脉企业审核-->
  2. <template>
  3. <div>
  4. <BaseHeaderLayout :leftSpan="15">
  5. <template slot="right">
  6. <ws-select
  7. v-model="searchTypeText"
  8. placeholder=""
  9. class="typeselect"
  10. @change="selectExamineType"
  11. :value="searchType"
  12. >
  13. <ws-option
  14. v-for="item in searchTypeList"
  15. :key="item.value"
  16. :label="item.value"
  17. :value="item.value"
  18. style="color: #8890b1"
  19. />
  20. </ws-select>
  21. <ws-input
  22. class='findinput'
  23. v-model="searchKeyWord"
  24. placeholder="可按账号、企业名称查找"
  25. clearable
  26. @keyup.enter.native="lookUp()"
  27. maxlength="500"
  28. type="input"
  29. ></ws-input>
  30. <ws-button class="find" type="primary" @click="lookUp()"
  31. ><img
  32. width="16"
  33. height="16"
  34. style="
  35. vertical-align: text-top;
  36. position: relative;
  37. top: 0px;
  38. left: -8px;
  39. "
  40. src="../../../public/img/sousuo.png"
  41. alt=""
  42. /></ws-button>
  43. <!-- </div> -->
  44. </template>
  45. </BaseHeaderLayout>
  46. <div class="container">
  47. <el-table
  48. class="wenzi"
  49. :data="grainList.records"
  50. style="width: 100%"
  51. height="680"
  52. >
  53. <el-table-column type="index" label="序号" width="50">
  54. <template scope="scope">
  55. <span v-if="scope.$index < 9">0{{ scope.$index + 1 }}</span>
  56. <span v-else>{{ scope.$index + 1 }}</span>
  57. </template>
  58. </el-table-column>
  59. <el-table-column prop="userName" label="昵称"> </el-table-column>
  60. <el-table-column prop="createPhone" label="账号"> </el-table-column>
  61. <el-table-column prop="compName" label="企业名称"> </el-table-column>
  62. <el-table-column prop="address" label="地址">
  63. </el-table-column>
  64. <el-table-column prop="updateDate" label="更新时间" width="140">
  65. </el-table-column>
  66. <el-table-column prop="" label="操作" width="240">
  67. <template slot-scope="scope">
  68. <div
  69. class="record"
  70. @click="nocomplete(scope.row)"
  71. v-hasPermission="`audit.tranMerchant.tranMerchantInfo.view`"
  72. >
  73. 查看
  74. </div>
  75. <div
  76. class="record"
  77. @click="delivery(scope.row)"
  78. v-hasPermission="`audit.tranMerchant.tranMerchantInfo.view`"
  79. >
  80. 编辑
  81. </div>
  82. <div
  83. class="record"
  84. @click="deleteclick(scope.row)"
  85. v-hasPermission="`audit.tranMerchant.tranMerchantInfo.view`"
  86. >
  87. 删除
  88. </div>
  89. </template>
  90. </el-table-column>
  91. <el-table-column prop="address" label="审核" width="180">
  92. <template slot-scope="scope">
  93. <el-button
  94. size="medium"
  95. type="text"
  96. class="record"
  97. v-if="scope.row.statusFlag == 1"
  98. v-hasPermission="`audit.tranMerchant.tranMerchantInfo.view`"
  99. @click="reject(scope.row)"
  100. >驳回</el-button
  101. >
  102. <el-button
  103. size="medium"
  104. type="text"
  105. class="record"
  106. v-if="scope.row.statusFlag == 1"
  107. @click="adopt(scope.row)"
  108. v-hasPermission="`audit.tranMerchant.tranMerchantInfo.view`"
  109. >通过</el-button
  110. >
  111. <template
  112. v-else
  113. v-hasPermission="`audit.tranMerchant.tranMerchantInfo.view`"
  114. slot-scope="scope"
  115. >
  116. {{ scope.row.status }}
  117. </template>
  118. </template>
  119. </el-table-column>
  120. </el-table>
  121. <!-- 页数 -->
  122. <el-pagination
  123. @size-change="handleSizeChange"
  124. @current-change="handleCurrentChange"
  125. :current-page="currentPage"
  126. :page-size="deptCircularPage.pageSize"
  127. layout="total, sizes, prev, pager, next, jumper"
  128. :total="deptBudgetTotal"
  129. >
  130. </el-pagination>
  131. <!--查看-->
  132. <el-dialog
  133. width="40%"
  134. title="查看企业信息"
  135. :visible.sync="dialogFormVisible1"
  136. :append-to-body="true"
  137. >
  138. <el-form class="customer" :model="form">
  139. <h3 style="margin-left: 30px">基本信息</h3>
  140. <el-form-item label="公司名称" :label-width="formLabelWidth">
  141. {{ companyList.compName }}
  142. </el-form-item>
  143. <el-form-item label="主营类型" :label-width="formLabelWidth">
  144. {{ companyList.mainBusinessType }}
  145. </el-form-item>
  146. <el-form-item label="标题" :label-width="formLabelWidth">
  147. {{ companyList.title }}
  148. </el-form-item>
  149. <el-form-item label="封面简介" :label-width="formLabelWidth">
  150. {{ companyList.companyProfile }}
  151. </el-form-item>
  152. <el-form-item label="坐标" :label-width="formLabelWidth">
  153. <span>经度:{{ companyList.longitude }}</span>
  154. <span>纬度:{{ companyList.latitude }}</span>
  155. </el-form-item>
  156. <el-form-item label="所在区域" :label-width="formLabelWidth">
  157. {{ companyList.province }}{{ companyList.city }}{{ companyList.area }}
  158. </el-form-item>
  159. <el-form-item label="详细地址" :label-width="formLabelWidth">
  160. {{ companyList.detailedAddress }}
  161. </el-form-item>
  162. <el-form-item label="封面图片" :label-width="formLabelWidth">
  163. <!-- <img width="50%" :src="companyList.attachmentAddress" alt /> -->
  164. <el-image
  165. style="width: 50%"
  166. :src="companyList.attachmentAddress"
  167. :preview-src-list="srcList">
  168. </el-image>
  169. </el-form-item>
  170. <el-form-item label="营业执照" :label-width="formLabelWidth">
  171. <img width="50%" :src="companyList.licenseAddress" alt />
  172. </el-form-item>
  173. <h3 style="margin-left: 30px">附加信息</h3>
  174. <el-form-item label="企业概况" :label-width="formLabelWidth">
  175. {{ companyList.companyContant }}
  176. </el-form-item>
  177. <el-form-item label="标签" :label-width="formLabelWidth">
  178. {{ companyList.label }}
  179. </el-form-item>
  180. <el-form-item label="场地图片" :label-width="formLabelWidth">
  181. <div :key="index" v-for="(item, index) in companyList.sitePhotoAddress">
  182. <img style="float:left" v-if="item" :src="item" class="avatar">
  183. </div>
  184. </el-form-item>
  185. <h3 style="margin-left: 30px">联系方式</h3>
  186. <div
  187. v-for="(item, index) in companyList.settledCompanyContacts"
  188. :key="index">
  189. <el-form-item label="联系人" :label-width="formLabelWidth">
  190. {{ item.contacts }}
  191. </el-form-item>
  192. <el-form-item label="电话" :label-width="formLabelWidth">
  193. {{ item.contactsPhone }}
  194. </el-form-item>
  195. </div>
  196. <el-form-item label="邮箱" :label-width="formLabelWidth">
  197. {{ companyList.email }}
  198. </el-form-item>
  199. <el-form-item label="传真" :label-width="formLabelWidth">
  200. {{ companyList.fax }}
  201. </el-form-item>
  202. </el-form>
  203. <div slot="footer" class="dialog-footer">
  204. <el-button v-if="companyList.statusFlag != 1" @click="dialogFormVisible1 = false" type="primary">关闭</el-button>
  205. <el-button v-if="companyList.statusFlag == 1" @click="reject1(id)" type="danger">驳回</el-button>
  206. <el-button v-if="companyList.statusFlag == 1" @click="adopt1(id)" type="primary">通过</el-button>
  207. </div>
  208. </el-dialog>
  209. <!--编辑-->
  210. <el-dialog
  211. width="40%"
  212. title="编辑企业信息"
  213. :visible.sync="dialogFormVisible2"
  214. :append-to-body="true"
  215. >
  216. <el-form class="" :model="form1">
  217. <h3 style="margin-left: 30px">基本信息(必填)</h3>
  218. <el-form-item label="公司名称" :label-width="formLabelWidth" prop="compName">
  219. <el-input v-model="companyList1.compName" placeholder="请输入公司名称"></el-input>
  220. </el-form-item>
  221. <el-form-item label="主营类型(可多选,必须为真实经营类型)" prop="mainBusinessType">
  222. <el-checkbox-group v-model="companyList1.mainBusinessType">
  223. <el-checkbox-button label="粮库" name="Type"></el-checkbox-button>
  224. <el-checkbox-button label="加工厂" name="Type"></el-checkbox-button>
  225. <el-checkbox-button label="烘干塔" name="Type"></el-checkbox-button>
  226. <el-checkbox-button label="饲料厂" name="Type"></el-checkbox-button>
  227. <el-checkbox-button label="养殖场" name="Type"></el-checkbox-button>
  228. <el-checkbox-button label="粮贸" name="Type"></el-checkbox-button>
  229. <el-checkbox-button label="期货" name="Type"></el-checkbox-button>
  230. </el-checkbox-group>
  231. </el-form-item>
  232. <el-form-item label="标题" :label-width="formLabelWidth" prop="title">
  233. <el-input v-model="companyList1.title" placeholder="请输入标题"></el-input>
  234. </el-form-item>
  235. <el-form-item label="封面简介" :label-width="formLabelWidth" prop="companyProfile">
  236. <el-input type="textarea" v-model="companyList1.companyProfile" placeholder="请输入封面简介"></el-input>
  237. </el-form-item>
  238. <el-form-item label="坐标" :label-width="formLabelWidth" >
  239. <span>经度:{{ companyList1.longitude }}</span>
  240. <span>纬度:{{ companyList1.latitude }}</span>
  241. </el-form-item>
  242. <el-form-item label="所在区域" :label-width="formLabelWidth" >
  243. {{ companyList1.province }}{{ companyList1.city }}{{ companyList1.area }}
  244. </el-form-item>
  245. <el-form-item label="详细地址" :label-width="formLabelWidth" prop="detailedAddress">
  246. <el-input v-model="companyList1.detailedAddress" placeholder="请输入详细地址"></el-input>
  247. </el-form-item>
  248. <el-form-item label="上传封面图片" :label-width="formLabelWidth" prop="attachmentAddress">
  249. <el-upload
  250. class="avatar-uploader"
  251. action="https://www.zthymaoyi.com/upload/admin"
  252. :show-file-list="false"
  253. :on-success="handleAvatarSuccess"
  254. :before-upload="beforeAvatarUpload">
  255. <img v-if="companyList1.attachmentAddress" :src="companyList1.attachmentAddress" class="avatar">
  256. <i v-else class="el-icon-plus avatar-uploader-icon"></i>
  257. </el-upload>
  258. </el-form-item>
  259. <el-form-item label="营业执照" :label-width="formLabelWidth" prop="licenseAddress">
  260. <el-upload
  261. class="avatar-uploader"
  262. action="https://www.zthymaoyi.com/upload/admin"
  263. :show-file-list="false"
  264. :on-success="handleAvatarSuccess1"
  265. :before-upload="beforeAvatarUpload">
  266. <img v-if="companyList1.licenseAddress" :src="companyList1.licenseAddress" class="avatar">
  267. <i v-else class="el-icon-plus avatar-uploader-icon"></i>
  268. </el-upload>
  269. </el-form-item>
  270. <h3 style="margin-left: 30px">附加信息(选填)</h3>
  271. <el-form-item label="企业概况" :label-width="formLabelWidth" prop="companyContant">
  272. <el-input type="textarea" v-model="companyList1.companyContant" maxlength="300" placeholder="请输入企业概况,如经营项目、产品类型、企业规模等,不超过300字"></el-input>
  273. </el-form-item>
  274. <el-form-item label="标签(标签应突出企业特色,最多6个)" prop="label" >
  275. <el-tag
  276. :key="tag"
  277. v-for="tag in companyList1.label"
  278. closable
  279. :disable-transitions="false"
  280. @close="handleClose(tag)">
  281. {{tag}}
  282. </el-tag>
  283. <el-input
  284. class="input-new-tag"
  285. v-if="inputVisible"
  286. v-model="label"
  287. ref="saveTagInput"
  288. maxlength="6"
  289. placeholder="请输入标签内容,不超过6个字符"
  290. size="medium"
  291. @keyup.enter.native="handleInputConfirm"
  292. @blur="handleInputConfirm"
  293. >
  294. </el-input>
  295. <el-button v-else class="button-new-tag" size="small" @click="showInput">添加</el-button>
  296. </el-form-item>
  297. <el-form-item label="场地图片(图片清晰,最多9张)" :label-width="formLabelWidth" prop="sitePhotoAddress">
  298. <div :key="index" v-for="(item, index) in companyList1.sitePhotoAddress">
  299. <img style="float:left" v-if="item" :src="item" class="avatar">
  300. </div>
  301. <el-upload
  302. action="https://www.zthymaoyi.com/upload/admin"
  303. :show-file-list="false"
  304. :limit="9"
  305. :on-success="handlePictureCardPreview"
  306. :on-remove="handleRemove"
  307. >
  308. <i class="el-icon-plus avatar-uploader-icon"></i>
  309. </el-upload>
  310. <!-- <el-dialog :visible.sync="dialogVisible3">
  311. <img width="100%" :src="companyList1.sitePhotoAddress" alt="" />
  312. </el-dialog> -->
  313. </el-form-item>
  314. <h3 style="margin-left: 30px">联系方式</h3>
  315. <div :key="index" v-for="(item, index) in companyList1.settledCompanyContacts">
  316. <el-form-item label="联系人" :label-width="formLabelWidth" prop="contacts">
  317. <el-input v-model="item.contacts" placeholder="请输入联系人姓名"></el-input>
  318. </el-form-item>
  319. <el-form-item label="电话" :label-width="formLabelWidth" prop="createPhone">
  320. <el-input v-model="item.contactsPhone" placeholder="请输入联系人电话"></el-input>
  321. </el-form-item>
  322. <img
  323. width="22"
  324. height="22"
  325. class="add"
  326. @click="add()"
  327. src="../../../public/img/add.png"
  328. alt=""
  329. />
  330. <img
  331. width="22"
  332. height="22"
  333. class="del"
  334. @click="del(index)"
  335. src="../../../public/img/del.png"
  336. alt=""
  337. />
  338. </div>
  339. <el-form-item label="邮箱" :label-width="formLabelWidth" prop="email">
  340. <el-input v-model="companyList1.email" placeholder="请输入电子邮箱"></el-input>
  341. </el-form-item>
  342. <el-form-item label="传真" :label-width="formLabelWidth" prop="fax">
  343. <el-input v-model="companyList1.fax" placeholder="请输入传真号"></el-input>
  344. </el-form-item>
  345. </el-form>
  346. <div slot="footer" class="dialog-footer">
  347. <el-button @click="submit(id)" type="primary">提交</el-button>
  348. </div>
  349. </el-dialog>
  350. </div>
  351. </div>
  352. </template>
  353. <script>
  354. import { settledList,getSettled,editSettled,settledExamine,deleteSettled } from '@/model/platformaudit/index'
  355. import Pagination from '@/components/Pagination'
  356. import WsUpload from '@/components/WsUpload'
  357. import { EventBus } from 'base-core-lib'
  358. export default {
  359. name: 'viewSpareMoney',
  360. components: {
  361. WsUpload,
  362. Pagination,
  363. },
  364. watch: {
  365. vesselId(val) {
  366. this.getList()
  367. },
  368. isShow(val) {
  369. this.showType = val
  370. },
  371. },
  372. data() {
  373. return {
  374. //标签
  375. dynamicTags: [],
  376. inputVisible: false,
  377. label: '',
  378. //图片
  379. dialogImageUrl: '',
  380. dialogVisible1: false,
  381. dialogVisible2: false,
  382. dialogVisible3: false,
  383. //弹窗
  384. dialogFormVisible1: false,
  385. dialogFormVisible2: false,
  386. checkboxGroup2: [],
  387. // 是否显示
  388. showType: true,
  389. // 年
  390. year: '',
  391. currentPage: 1,
  392. pageSize: 10,
  393. deptBudgetTotal: 0,
  394. searchTypeText: '待审核',
  395. searchKeyWord: '',
  396. // 提交类型
  397. submitType: true,
  398. size: 10,
  399. address:'',
  400. searchType: 1,
  401. formLabelWidth: '120px',
  402. form: {
  403. },
  404. form1: {
  405. Type: [],
  406. textarea: '',
  407. },
  408. srcList: [
  409. ],
  410. compId: localStorage.getItem('ws-pf_compId'),
  411. deptCircularPage: {},
  412. grainList: [],
  413. searchTypeList: [
  414. { value: '待审核', type: 1 },
  415. { value: '已通过', type: 2 },
  416. { value: '未通过', type: 3 },
  417. { value: '全部', type: '' },
  418. ],
  419. companyList: {
  420. },
  421. companyList1: {
  422. id:'',
  423. label:'',
  424. attachmentAddress: '',
  425. licenseAddress: '',
  426. sitePhotoAddress: '',
  427. },
  428. settledCompanyInfo: {
  429. id: '',
  430. flag: '',
  431. },
  432. freightspace: [{}],
  433. pickerBeginDateBefore: {
  434. disabledDate: (time) => {
  435. return time.getTime() > Date.now()
  436. },
  437. },
  438. }
  439. },
  440. activated() {
  441. this.getList()
  442. this.showType = this.isShow
  443. },
  444. methods: {
  445. handleAvatarSuccess(res, file) {
  446. this.companyList1.attachmentAddress = file.response.url;
  447. },
  448. handleAvatarSuccess1(res, file) {
  449. this.companyList1.licenseAddress = file.response.url;
  450. },
  451. beforeAvatarUpload(file) {
  452. const isJPG = file.type === 'image/jpeg';
  453. const isLt2M = file.size / 1024 / 1024 < 2;
  454. if (!isJPG) {
  455. this.$message.error('上传图片只能是 JPG 格式!');
  456. }
  457. if (!isLt2M) {
  458. this.$message.error('上传图片大小不能超过 2MB!');
  459. }
  460. return isJPG && isLt2M;
  461. },
  462. //图片
  463. handleRemove(file, fileList) {
  464. console.log(file, fileList)
  465. },
  466. handlePictureCardPreview(res, file) {
  467. let url = file.response.url;
  468. if(this.companyList1.sitePhotoAddress.length>=9){
  469. this.$message({
  470. message: '最多上传九张图片!',
  471. type: 'warning',
  472. })
  473. return
  474. }
  475. else{
  476. this.companyList1.sitePhotoAddress.push(url)
  477. }
  478. },
  479. close(index) {
  480. this.addressUrls.splice(index, 1)
  481. },
  482. //联系人
  483. add() {
  484. this.companyList1.settledCompanyContacts.push({})
  485. },
  486. del(index) {
  487. if (this.companyList1.settledCompanyContacts.length > 1) {
  488. this.companyList1.settledCompanyContacts.splice(index, 1)
  489. }
  490. },
  491. //列表
  492. getList() {
  493. settledList({
  494. compId: localStorage.getItem('ws-pf_compId'),
  495. searchType: this.searchType,
  496. currentPage: this.currentPage,
  497. pageSize: this.pageSize,
  498. searchKeyWord: this.searchKeyWord,
  499. })
  500. .toPromise()
  501. .then((response) => {
  502. this.grainList = response
  503. for(var i=0;i<this.grainList.records.length;i++){
  504. this.grainList.records[i].address=this.grainList.records[i].province+this.grainList.records[i].city+this.grainList.records[i].area+this.grainList.records[i].detailedAddress
  505. }
  506. this.deptCircularPage.currentPage = response.current
  507. this.deptCircularPage.pageSize = response.size
  508. this.deptBudgetTotal = response.total
  509. })
  510. },
  511. //删除
  512. deleteclick(row) {
  513. this.$confirm(`企业信息删除后不可恢复,是否确定删除?`, {
  514. confirmButtonText: '确定',
  515. cancelButtonText: '取消',
  516. type: 'warning',
  517. })
  518. .then(() => {
  519. deleteSettled({
  520. id: row.id,
  521. })
  522. .toPromise()
  523. .then((response) => {
  524. this.getList()
  525. })
  526. })
  527. .catch(() => {
  528. return false
  529. })
  530. },
  531. //查看
  532. nocomplete(row) {
  533. getSettled({ id: row.id })
  534. .toPromise()
  535. .then((response) => {
  536. this.companyList = response
  537. if(response.sitePhotoAddress!=null){
  538. this.companyList.sitePhotoAddress=response.sitePhotoAddress.split(',')
  539. }
  540. this.id=response.id
  541. this.dialogFormVisible1 = true
  542. })
  543. },
  544. //编辑
  545. delivery(row) {
  546. getSettled({ id: row.id })
  547. .toPromise()
  548. .then((response) => {
  549. this.companyList1 = response
  550. this.id=response.id
  551. if(response.mainBusinessType!=null){
  552. this.companyList1.mainBusinessType=response.mainBusinessType.split(',')
  553. }
  554. if(response.label!=null){
  555. this.companyList1.label=response.label.split(',')
  556. }
  557. else{
  558. this.companyList1.label=[]
  559. }
  560. if(response.sitePhotoAddress!=null){
  561. this.companyList1.sitePhotoAddress=response.sitePhotoAddress.split(',')
  562. }
  563. else{
  564. this.companyList1.sitePhotoAddress=[]
  565. }
  566. if(response.settledCompanyContacts.length==0){
  567. this.companyList1.settledCompanyContacts.push({})
  568. }
  569. this.dialogFormVisible2 = true
  570. })
  571. },
  572. submit(id){
  573. if (!this.companyList1.compName) {
  574. this.$message({
  575. message: '公司名称不能为空!',
  576. type: 'warning',
  577. })
  578. return
  579. }
  580. if (
  581. this.companyList1.compName.length > 25 ||
  582. this.companyList1.compName.length < 2
  583. ) {
  584. this.$message({
  585. message: '公司名称输入错误!',
  586. type: 'warning',
  587. })
  588. return
  589. }
  590. if (this.companyList1.mainBusinessType.length<1) {
  591. this.$message({
  592. message: '至少选择一个主营类型',
  593. type: 'warning',
  594. })
  595. return
  596. }
  597. if (!this.companyList1.title) {
  598. this.$message({
  599. message: '标题不能为空!',
  600. type: 'warning',
  601. })
  602. return
  603. }
  604. if (
  605. this.companyList1.title.length > 16 ||
  606. this.companyList1.title.length < 2
  607. ) {
  608. this.$message({
  609. message: '标题长度2-16个字',
  610. type: 'warning',
  611. })
  612. return
  613. }
  614. if (!this.companyList1.companyProfile) {
  615. this.$message({
  616. message: '简介不能为空!',
  617. type: 'warning',
  618. })
  619. return
  620. }
  621. if (
  622. this.companyList1.companyProfile.length > 60 ||
  623. this.companyList1.companyProfile.length < 10
  624. ) {
  625. this.$message({
  626. message: '简介长度10-60个字',
  627. type: 'warning',
  628. })
  629. return
  630. }
  631. if (!this.companyList1.detailedAddress) {
  632. this.$message({
  633. message: '详细地址不能为空!',
  634. type: 'warning',
  635. })
  636. return
  637. }
  638. if (
  639. this.companyList1.detailedAddress.length > 12 ||
  640. this.companyList1.detailedAddress.length < 2
  641. ) {
  642. this.$message({
  643. message: '详细地址2-12个字',
  644. type: 'warning',
  645. })
  646. return
  647. }
  648. if (!this.companyList1.attachmentAddress) {
  649. this.$message({
  650. message: '封面照片不能为空!',
  651. type: 'warning',
  652. })
  653. return
  654. }
  655. if (!this.companyList1.licenseAddress) {
  656. this.$message({
  657. message: '营业执照不能为空!',
  658. type: 'warning',
  659. })
  660. return
  661. }
  662. if (
  663. this.companyList1.contacts > 10 ||
  664. this.companyList1.contacts < 2
  665. ) {
  666. this.$message({
  667. message: '联系人姓名2-10个字',
  668. type: 'warning',
  669. })
  670. return
  671. }
  672. if (
  673. this.companyList1.createPhone.length > 15 ||
  674. this.companyList1.createPhone.length < 7
  675. ) {
  676. this.$message({
  677. message: '联系人电话7-15位数字',
  678. type: 'warning',
  679. })
  680. return
  681. }
  682. // if (
  683. // this.companyList1.fax.length > 20 ||
  684. // this.companyList1.fax.length < 6
  685. // ) {
  686. // this.$message({
  687. // message: '传真输入错误',
  688. // type: 'warning',
  689. // })
  690. // return
  691. // }
  692. this.companyList1.id = id
  693. this.companyList1.mainBusinessType=this.companyList1.mainBusinessType.toString()
  694. this.companyList1.label=this.companyList1.label.toString()
  695. this.companyList1.sitePhotoAddress=this.companyList1.sitePhotoAddress.toString()
  696. this.$confirm(`确定提交企业信息?`, {
  697. cancelButtonText: '取消',
  698. confirmButtonText: '确定',
  699. type: 'warning'
  700. })
  701. .then(() => {
  702. editSettled(this.companyList1)
  703. .toPromise()
  704. .then((response) => {
  705. this.$notify.success({
  706. title: '成功',
  707. message: '提交成功',
  708. })
  709. this.dialogFormVisible2 = false
  710. this.getList()
  711. })
  712. .catch((response) => {
  713. EventBus.$emit('error', response.message)
  714. })
  715. })
  716. .catch(() => {
  717. return false
  718. })
  719. },
  720. //查找
  721. lookUp() {
  722. this.currentPage = 1
  723. this.getList()
  724. },
  725. selectExamineType(e) {
  726. for (var i = 0; i < this.searchTypeList.length; i++) {
  727. if (this.searchTypeList[i].value == e) {
  728. this.searchType = this.searchTypeList[i].type
  729. }
  730. }
  731. this.currentPage = 1
  732. this.getList()
  733. },
  734. //查看审核通过
  735. adopt1(id) {
  736. this.settledCompanyInfo.id = id
  737. this.settledCompanyInfo.flag = 1
  738. this.$confirm(`确定通过该入驻申请?`, '提示', {
  739. confirmButtonText: '通过',
  740. cancelButtonText: '取消',
  741. type: 'warning',
  742. })
  743. .then(() => {
  744. settledExamine(this.settledCompanyInfo)
  745. .toPromise()
  746. .then((response) => {
  747. this.$notify.success({
  748. title: '成功',
  749. message: '通过成功',
  750. })
  751. this.getList()
  752. })
  753. .catch((response) => {
  754. EventBus.$emit('error', response.message)
  755. })
  756. })
  757. .catch(() => {
  758. return false
  759. })
  760. },
  761. //查看审核驳回
  762. reject1(id) {
  763. this.settledCompanyInfo.id = id
  764. this.settledCompanyInfo.flag = 2
  765. this.$confirm(`确定驳回该入驻申请?`, '提示', {
  766. confirmButtonText: '驳回',
  767. cancelButtonText: '取消',
  768. type: 'warning',
  769. })
  770. .then(() => {
  771. settledExamine(this.settledCompanyInfo)
  772. .toPromise()
  773. .then((response) => {
  774. this.$notify.success({
  775. title: '成功',
  776. message: '驳回成功',
  777. })
  778. this.getList()
  779. })
  780. .catch((response) => {
  781. EventBus.$emit('error', response.message)
  782. })
  783. })
  784. .catch(() => {
  785. return false
  786. })
  787. },
  788. //审核通过
  789. adopt(row) {
  790. this.settledCompanyInfo.id = row.id
  791. this.settledCompanyInfo.flag = 1
  792. this.$confirm(`确定通过该入驻申请?`, '提示', {
  793. confirmButtonText: '通过',
  794. cancelButtonText: '取消',
  795. type: 'warning',
  796. })
  797. .then(() => {
  798. settledExamine(this.settledCompanyInfo)
  799. .toPromise()
  800. .then((response) => {
  801. this.$notify.success({
  802. title: '成功',
  803. message: '通过成功',
  804. })
  805. this.getList()
  806. })
  807. .catch((response) => {
  808. EventBus.$emit('error', response.message)
  809. })
  810. })
  811. .catch(() => {
  812. return false
  813. })
  814. },
  815. //审核驳回
  816. reject(row) {
  817. this.settledCompanyInfo.id = row.id
  818. this.settledCompanyInfo.flag = 2
  819. this.$confirm(`确定驳回该入驻申请?`, '提示', {
  820. confirmButtonText: '驳回',
  821. cancelButtonText: '取消',
  822. type: 'warning',
  823. })
  824. .then(() => {
  825. settledExamine(this.settledCompanyInfo)
  826. .toPromise()
  827. .then((response) => {
  828. this.$notify.success({
  829. title: '成功',
  830. message: '驳回成功',
  831. })
  832. this.getList()
  833. })
  834. .catch((response) => {
  835. EventBus.$emit('error', response.message)
  836. })
  837. })
  838. .catch(() => {
  839. return false
  840. })
  841. },
  842. handleSizeChange(val) {
  843. console.log(`每页 ${val} 条`)
  844. this.pageSize = val
  845. this.getList()
  846. },
  847. handleCurrentChange(val) {
  848. this.currentPage = val
  849. console.log(`当前页: ${val}`)
  850. this.getList()
  851. },
  852. //标签
  853. handleClose(tag) {
  854. this.companyList1.label.splice(this.companyList1.label.indexOf(tag), 1)
  855. },
  856. showInput() {
  857. this.inputVisible = true
  858. this.$nextTick((_) => {
  859. this.$refs.saveTagInput.$refs.input.focus()
  860. })
  861. },
  862. handleInputConfirm() {
  863. let label = this.label;
  864. if (label) {
  865. if(this.companyList1.label.length>5){
  866. this.$message({
  867. message: '最多添加六个标签!',
  868. type: 'warning',
  869. })
  870. return
  871. }
  872. else{
  873. this.companyList1.label.push(label)
  874. }
  875. }
  876. this.inputVisible = false
  877. this.label = ''
  878. },
  879. },
  880. }
  881. </script>
  882. <style lang="scss" scoped>
  883. .container {
  884. width: 100%;
  885. margin: 0 auto;
  886. }
  887. .vertical-text-left {
  888. width: 62px;
  889. text-align: right;
  890. }
  891. .el-button--primary {
  892. background-color: #5878e8;
  893. border-color: #5878e8;
  894. }
  895. .el-button--default {
  896. color: #8890b1;
  897. border-color: #e8eaf1;
  898. }
  899. /deep/.base_header_layout .find.el-button--primary {
  900. width: 30px;
  901. border-top-left-radius: 0px;
  902. border-bottom-left-radius: 0px;
  903. }
  904. /deep/.base_header_layout .findinput input {
  905. border-top-right-radius: 0px;
  906. border-bottom-right-radius: 0px;
  907. }
  908. /deep/.findValue .el-input__inner {
  909. border-top-right-radius: 0px;
  910. border-bottom-right-radius: 0px;
  911. }
  912. //操作按钮
  913. .record,
  914. .adjustment {
  915. display: inline-block;
  916. color: #5878e8;
  917. padding: 0 4px !important;
  918. position: relative;
  919. font-size: 14px;
  920. }
  921. .record:after {
  922. position: absolute;
  923. content: '';
  924. display: block;
  925. top: 5px;
  926. right: -2px;
  927. width: 1px;
  928. height: 12px;
  929. background: #e9ecf7;
  930. }
  931. //状态样式
  932. .executory,
  933. .inExecution,
  934. .done {
  935. width: 6px;
  936. height: 6px;
  937. display: inline-block;
  938. border-radius: 50%;
  939. position: relative;
  940. top: -1px;
  941. font-size: 14px;
  942. }
  943. .executory {
  944. background: #ff9f24;
  945. }
  946. .inExecution {
  947. background: #5878e8;
  948. }
  949. .done {
  950. background: #50cad4;
  951. }
  952. .putstorage.el-button--default,
  953. .deliverystorage.el-button--default {
  954. border-color: #8890b1;
  955. background-color: #fff;
  956. color: #8890b1;
  957. }
  958. /deep/.el-table td,
  959. /deep/.el-table th.is-leaf {
  960. border-right: 1px solid #e9ecf7;
  961. text-align: center;
  962. }
  963. /deep/.el-table tr td:first-child,
  964. /deep/.el-table tr th.is-leaf:first-child {
  965. border-left: 1px solid #e9ecf7;
  966. }
  967. .el-row {
  968. height: 60px;
  969. }
  970. .base_header_layout .grid-content {
  971. margin-top: 80px;
  972. }
  973. .el-input--small .el-input__inner {
  974. margin-left: 20px;
  975. }
  976. .el-range-editor--small.el-input__inner {
  977. height: 32px;
  978. margin: 0 10px;
  979. }
  980. /deep/.el-pagination {
  981. text-align: center;
  982. white-space: nowrap;
  983. padding: 2px 5px;
  984. color: #303133;
  985. font-weight: 700;
  986. margin-bottom: 20px;
  987. }
  988. .el-select {
  989. width: 30%;
  990. margin-right: 10px;
  991. }
  992. .el-tag + .el-tag {
  993. margin-left: 10px;
  994. }
  995. .button-new-tag {
  996. margin-left: 10px;
  997. height: 32px;
  998. line-height: 30px;
  999. padding-top: 0;
  1000. padding-bottom: 0;
  1001. }
  1002. .input-new-tag {
  1003. width: 240px;
  1004. margin-left: 10px;
  1005. vertical-align: bottom;
  1006. }
  1007. .customer .el-form-item {
  1008. border-bottom: 1px solid #ccc;
  1009. }
  1010. /deep/.typeselect .el-input__inner {
  1011. color: #8890b1;
  1012. }
  1013. .add{
  1014. margin-left: 10%;
  1015. }
  1016. .avatar-uploader .el-upload {
  1017. border: 1px dashed #d9d9d9;
  1018. border-radius: 6px;
  1019. cursor: pointer;
  1020. position: relative;
  1021. overflow: hidden;
  1022. }
  1023. .avatar-uploader .el-upload:hover {
  1024. border-color: #409EFF;
  1025. }
  1026. .avatar-uploader-icon {
  1027. font-size: 28px;
  1028. color: #8c939d;
  1029. width: 178px;
  1030. height: 178px;
  1031. line-height: 178px;
  1032. text-align: center;
  1033. }
  1034. .avatar {
  1035. width: 178px;
  1036. height: 178px;
  1037. display: block;
  1038. }
  1039. </style>