grainpulseenterprisereview.vue 32 KB

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