grainpulseenterprisereview.vue 31 KB

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