grainpulseenterprisereview.vue 30 KB

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