collectionContract.vue 31 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054
  1. <template>
  2. <div>
  3. <BaseHeaderLayout :leftSpan="4">
  4. <template slot="left">
  5. <ws-button type="primary" @click="handleAdd()"
  6. v-hasPermission="`contractManagement.dsContract.dsContractInfo.add`">添加</ws-button>
  7. <ws-button @click="exportlist()" v-hasPermission="
  8. `contractManagement.dsContract.dsContractInfo.view`
  9. ">导出</ws-button>
  10. </template>
  11. <template slot="right">
  12. <span style="width: 205px; display: inline-block; color: #8890b1">创建人:</span>
  13. <ws-select v-model="createPersion" placeholder="可按创建人筛选" class="typeselect" @change="getList"
  14. :value="searchType">
  15. <ws-option key="全部内勤" label="全部内勤" value="" style="color: #8890b1" />
  16. <ws-option v-for="item in persionList" :key="item.staffName" :label="item.staffName" :value="item.staffName"
  17. style="color: #8890b1" />
  18. </ws-select>
  19. <span style="width: 150px; display: inline-block; color: #8890b1;margin-left: 5px;">状态:</span>
  20. <ws-select v-model="searchTypeText" placeholder="" class="typeselect" @change="selecttaskType"
  21. :value="searchType">
  22. <ws-option v-for="item in taskTypeList" :key="item.value" :label="item.value" :value="item.value"
  23. style="color: #8890b1" />
  24. </ws-select>
  25. <el-date-picker v-model="value2" type="daterange" align="right" unlink-panels range-separator="至"
  26. start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions">
  27. </el-date-picker>
  28. <el-input v-model="searchKeyWord" placeholder="可按照合同编号、买方名称、卖方名称进行查找" clearable maxlength="500" type="input"
  29. class="findValue" @keyup.enter.native="find()"></el-input>
  30. <ws-button class="find" type="primary" @click="find()"><img width="16" height="16" style="
  31. vertical-align: text-top;
  32. position: relative;
  33. top: 0px;
  34. left: -8px;
  35. " src="../../../public/img/sousuo.png" alt="" /></ws-button>
  36. </template>
  37. </BaseHeaderLayout>
  38. <el-table class="wenzi" :data="contractList.records" style="width: 100%; margin-top: 10px"
  39. height="calc(100% - 105px)">
  40. <el-table-column type="index" label="序号">
  41. <template scope="scope">
  42. <span v-if="scope.$index < 9">0{{ scope.$index + 1 }}</span>
  43. <span v-else>{{ scope.$index + 1 }}</span>
  44. </template>
  45. </el-table-column>
  46. <el-table-column prop="contractNo" label="合同编号">
  47. </el-table-column>
  48. <el-table-column prop="creator" label="创建人" width="90">
  49. </el-table-column>
  50. <el-table-column prop="goodsName" label="货名"></el-table-column>
  51. <el-table-column prop="buyer" label="买方"> </el-table-column>
  52. <el-table-column prop="seller" label="卖方"> </el-table-column>
  53. <el-table-column prop="weight" label="重量(吨)"> </el-table-column>
  54. <el-table-column prop="completed" label="已完成(吨)">
  55. <template slot-scope="scope">
  56. <span style="color: #5473e8; font-weight: 600">{{
  57. scope.row.completed
  58. }}</span>
  59. </template>
  60. </el-table-column>
  61. <el-table-column prop="amountIngPayable" label="应付(元)"> </el-table-column>
  62. <el-table-column prop="amountEdPayableNew" label="已付(元)"> </el-table-column>
  63. <el-table-column prop="amountNotCollectable" label="应收(元)"> </el-table-column>
  64. <el-table-column prop="amountEdCollectionable" label="已收(元)"> </el-table-column>
  65. <el-table-column width='200' prop="invoiced" label="已开销售发票(元)"> </el-table-column>
  66. <el-table-column prop="status" label="状态">
  67. <template slot-scope="scope">
  68. <span v-if="scope.row.approveStatus">{{
  69. scope.row.approveStatus
  70. }}</span>
  71. <el-popover v-else placement="left" trigger="click" visible-arrow="false" @show="history(scope.row)">
  72. <template>
  73. <span slot="reference">
  74. <span v-if="scope.row.status == '待执行'" class="executory"></span>
  75. <span v-if="scope.row.status == '执行中'" class="inExecution"></span>
  76. <span v-if="scope.row.status == '已完成'" class="done"></span>{{ scope.row.status }}
  77. </span>
  78. </template>
  79. <div>
  80. <p style="margin-top: 0; padding-left: 10px">操作历史</p>
  81. <div v-for="(item, index) in historyList" :key="index" class="flex">
  82. <div class="vertical-text vertical-text-left">
  83. {{ item.updateDate }}
  84. </div>
  85. <div>
  86. <div class="vertical-circle"></div>
  87. <div v-if="index != historyList.length - 1" class="vertical-line"></div>
  88. </div>
  89. <div class="vertical-text">
  90. {{ item.operateUser }}<br />{{ item.dealMsg }}
  91. </div>
  92. </div>
  93. </div>
  94. </el-popover>
  95. <img v-if="!scope.row.approveStatus" width="17" height="18"
  96. style="vertical-align: text-top; position: relative; top: -1px" src="../../../public/img/edit.png"
  97. @click="editClick(scope.row)" alt="" />
  98. </template>
  99. </el-table-column>
  100. <el-table-column prop="addressUrl" label="附件">
  101. <template slot-scope="scope">
  102. <img width="18" height="20" style="vertical-align: text-top; position: relative; top: -1px"
  103. src="../../../public/img/fujian.png" @click="fujian(scope.row)" alt="" />
  104. <span v-if="scope.row.addressUrlArray != null">
  105. {{
  106. scope.row.addressUrlArray.length == 0
  107. ? ''
  108. : scope.row.addressUrlArray.length
  109. }}
  110. </span>
  111. </template>
  112. </el-table-column>
  113. <el-table-column prop="signingDate" label="签订日期"> </el-table-column>
  114. <el-table-column class="handle" prop="address" label="操作" width="150">
  115. <template slot-scope="scope">
  116. <el-link v-hasPermission="
  117. `contractManagement.dsContract.dsContractInfo.view`
  118. " target="_blank" type="primary" :underline="false" @click="handleExamine(scope.row)"
  119. >查看</el-link>
  120. <el-divider direction="vertical"></el-divider>
  121. <el-link v-hasPermission="
  122. `contractManagement.dsContract.dsContractInfo.edit`
  123. " target="_blank" type="primary" :underline="false" @click="handleEdit(scope.row)"
  124. :disabled="scope.row.approveStatus">编辑</el-link>
  125. <el-dropdown>
  126. <span class="btn_css">•••</span>
  127. <el-dropdown-menu slot="dropdown">
  128. <el-dropdown-item v-hasPermission="
  129. `contractManagement.dsContract.dsContractInfo.delete`
  130. "><el-link target="_blank" type="primary" :underline="false" @click="handleDelete(scope.row)"
  131. :disabled="scope.row.approveStatus">删除</el-link>
  132. </el-dropdown-item>
  133. <el-dropdown-item v-hasPermission="
  134. `contractManagement.dsContract.dsContractInfo.edit`
  135. ">
  136. <el-link target="_blank" type="primary" :underline="false" @click="withdraw(scope.row)"
  137. :disabled="scope.row.approveStatus && scope.row.approveStatus=='发起人撤回'">撤回</el-link>
  138. </el-dropdown-item>
  139. <el-dropdown-item v-hasPermission="
  140. `contractManagement.dsContract.dsContractInfo.list`
  141. ">
  142. <el-link target="_blank" type="primary" :underline="false" @click="handleRecord(scope.row)">记录</el-link>
  143. </el-dropdown-item>
  144. <el-dropdown-item v-hasPermission="
  145. `contractManagement.dsContract.dsContractInfo.view`
  146. ">
  147. <el-link target="_blank" type="primary" :underline="false" @click="handleaudit(scope.row)"
  148. :disabled="!scope.row.taskId">审核</el-link>
  149. </el-dropdown-item>
  150. <el-dropdown-item v-hasPermission="`contractManagement.buyContract.buyContractInfo.view`">
  151. <el-link target="_blank" type="primary" :underline="false" @click="handlecost(scope.row)">费用详情</el-link>
  152. </el-dropdown-item>
  153. <el-dropdown-item v-hasPermission="`contractManagement.buyContract.buyContractInfo.view`">
  154. <el-link target="_blank" type="primary" :underline="false" @click="handleprofit(scope.row)">利润详情</el-link>
  155. </el-dropdown-item>
  156. </el-dropdown-menu>
  157. </el-dropdown>
  158. <!-- <img width="16" height="16" style="vertical-align: text-top; margin: 0 6px"
  159. src="../../../public/img/chakan.png" @click="handleExamine(scope.row)" v-hasPermission="
  160. `contractManagement.dsContract.dsContractInfo.view`
  161. " alt="" />
  162. <div v-if="
  163. (scope.row.approveStatus != '待决策人审核' &&
  164. !scope.row.approveStatus || scope.row.approveStatus == '发起人撤回')
  165. " style="display: inline-block">
  166. <img width="17" height="16" style="vertical-align: text-top; margin: 0 6px"
  167. src="../../../public/img/bianji.png" @click="handleEdit(scope.row)" v-hasPermission="
  168. `contractManagement.dsContract.dsContractInfo.edit`
  169. " alt="" />
  170. </div>
  171. <img width="16" height="17" style="
  172. vertical-align: text-top;
  173. position: relative;
  174. top: -1px;
  175. margin: 0 6px;
  176. " v-if="scope.row.status != '执行中'&&scope.row.status != '已完成'" src="../../../public/img/shanchu.png"
  177. v-hasPermission="
  178. `contractManagement.dsContract.dsContractInfo.delete`
  179. " @click="handleDelete(scope.row)" alt="" />
  180. <img width="16" height="17" style="
  181. vertical-align: text-top;
  182. position: relative;
  183. top: -1px;
  184. margin: 0 6px;
  185. " src="../../../public/img/jl.png"
  186. v-hasPermission="
  187. `contractManagement.dsContract.dsContractInfo.list`
  188. " @click="handleRecord(scope.row)" alt="" />
  189. <div v-show="scope.row.showFlag" v-if="scope.row.approveStatus && scope.row.approveStatus!='发起人撤回'" style="display: inline-block">
  190. <img width="17" height="16" style="vertical-align: text-top; margin: 0 6px" src="../../../public/img/chehui.png"
  191. @click="withdraw(scope.row)" v-hasPermission="`contractManagement.dsContract.dsContractInfo.edit`" alt="" />
  192. </div> -->
  193. </template>
  194. </el-table-column>
  195. </el-table>
  196. <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
  197. :page-size="deptCircularPage.pageSize" layout="total, sizes, prev, pager, next, jumper" :total="deptBudgetTotal">
  198. </el-pagination>
  199. <WinseaContentModal v-model="accessoryTFs" :title="$t('system.noticeCircular.information')"
  200. @on-cancel="handleClose">
  201. <ws-upload ref="upload" :size-limit="size" @onChange="onChange" :comp-id="compId" :appendix-ids="appendixIdss"
  202. accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar" />
  203. </WinseaContentModal>
  204. </div>
  205. </template>
  206. <script>
  207. import {
  208. getList,
  209. export2,
  210. editstatus,
  211. billoperatehis,
  212. deletecontract,
  213. editInfo,
  214. getstafffind,
  215. sponsorWithdraw
  216. } from '@/model/contarct/index'
  217. import {
  218. downloadFile
  219. } from '@/utils/batchDown'
  220. import Pagination from '@/components/Pagination'
  221. import WsUpload from '@/components/WsUpload'
  222. import {
  223. dayjs,
  224. EventBus
  225. } from 'base-core-lib'
  226. export default {
  227. name: 'viewSpareMoney',
  228. components: {
  229. WsUpload,
  230. Pagination,
  231. },
  232. watch: {
  233. vesselId(val) {
  234. this.getList()
  235. },
  236. // isShow(val) {
  237. // this.showType = val
  238. // },
  239. },
  240. data() {
  241. return {
  242. id: '',
  243. //弹出框
  244. dialogViewSpareMoney: false,
  245. dialogApproveFormVisible: false,
  246. // 船舶类型
  247. monetaryKey: null,
  248. // 表格显示数据
  249. tableDate: [],
  250. size: 10,
  251. // 是否显示
  252. // showType: true,
  253. // 年
  254. year: '',
  255. showFlag:false,
  256. deliver_type: 1,
  257. deptBudgetTotal: 0,
  258. currentPage: 1,
  259. pageSize: 9999,
  260. appendixIdsAdd: '',
  261. searchType: 1,
  262. searchTypeText: '未完成',
  263. searchKeyWord: '',
  264. contractType: 3,
  265. goodsType: 1,
  266. startDate: null,
  267. endDate: null,
  268. addressUrls: [],
  269. accesscard: false,
  270. // 提交类型
  271. submitType: true,
  272. deptCircularPage: {},
  273. date: {
  274. year: dayjs().format('YYYY'),
  275. month: dayjs().format('MM'),
  276. },
  277. contractList: [],
  278. deptBudgetList: {},
  279. historyList: [],
  280. appendixIdss: [],
  281. fileList: [],
  282. compId: localStorage.getItem('ws-pf_compId'),
  283. pickerBeginDateBefore: {
  284. disabledDate: (time) => {
  285. return time.getTime() > Date.now()
  286. },
  287. },
  288. accessoryTFs: false,
  289. taskTypeList: [{
  290. value: '未完成',
  291. type: 1,
  292. },
  293. {
  294. value: '已完成',
  295. type: 2,
  296. },
  297. {
  298. value: '审批中',
  299. type: 4,
  300. },
  301. {
  302. value: '全部合同',
  303. type: '',
  304. },
  305. ],
  306. pickerOptions: {
  307. shortcuts: [{
  308. text: '本周',
  309. onClick(picker) {
  310. const end = new Date()
  311. const start = new Date()
  312. var thisDay = start.getDay()
  313. var thisDate = start.getDate()
  314. if (thisDay != 0) {
  315. start.setDate(thisDate - thisDay)
  316. }
  317. picker.$emit('pick', [start, end])
  318. },
  319. },
  320. {
  321. text: '本月',
  322. onClick(picker) {
  323. const end = new Date()
  324. const start = new Date()
  325. start.setDate(1)
  326. picker.$emit('pick', [start, end])
  327. },
  328. },
  329. {
  330. text: '本季度',
  331. onClick(picker) {
  332. var oDate = new Date()
  333. var thisYear = oDate.getFullYear()
  334. var thisMonth = oDate.getMonth() + 1
  335. var n = Math.ceil(thisMonth / 3) // 季度
  336. var Month = n * 3 - 1
  337. var start = new Date(thisYear, Month - 2, 1)
  338. var end = new Date()
  339. picker.$emit('pick', [start, end])
  340. },
  341. },
  342. ],
  343. },
  344. value1: '',
  345. value2: '',
  346. createPersion: '',//创建人
  347. persionList: [],
  348. }
  349. },
  350. activated() {
  351. //cg.viewBudget
  352. //cg.viewSpareMoney
  353. // this.getVesselData();
  354. this.getList()
  355. // this.showType = this.isShow
  356. this.persionXiaLa()
  357. },
  358. methods: {
  359. handleaudit(row) {
  360. this.$router.push({
  361. name: 'collectionContractAudit',
  362. query: {
  363. id: row.id,
  364. status: row.status,
  365. },
  366. })
  367. },
  368. handlecost(row) {
  369. this.$router.push({
  370. name: 'expensemanagementdetails',
  371. query: {
  372. contractNo: row.contractNo,
  373. },
  374. })
  375. },
  376. handleprofit(row) {
  377. this.$router.push({
  378. name: 'contractprofits',
  379. query: {
  380. contractNo: row.contractNo,
  381. },
  382. })
  383. },
  384. withdraw(row) {
  385. this.$confirm(`撤回成功后,可再次提交,确定撤回该合同吗?`, {
  386. cancelButtonText: '取消',
  387. confirmButtonText: '确定',
  388. type: 'warning',
  389. }).then(() => {
  390. sponsorWithdraw({
  391. workflowId: row.workflowId,
  392. businessKey: row.id,
  393. }).toPromise()
  394. .then((response) => {
  395. this.$message.success('撤回成功')
  396. this.getList()
  397. })
  398. })
  399. },
  400. persionXiaLa() {
  401. getstafffind({
  402. roles: 'b96299bb5dcf461e916b72b64c6943b0'
  403. })
  404. .toPromise()
  405. .then((response) => {
  406. this.persionList = response
  407. })
  408. },
  409. onChange() {
  410. this.$refs.upload
  411. .handleSaveBill()
  412. .then(async (response) => {
  413. this.deptBudgetList.addressUrl = response
  414. this.deptBudgetList.id = this.id
  415. this.deptBudgetList.flag = 1
  416. editInfo(this.deptBudgetList)
  417. .toPromise()
  418. .then((response) => {
  419. this.accessoryTFs = false
  420. this.$message.success('上传成功')
  421. this.getList()
  422. })
  423. })
  424. .catch((res) => {
  425. EventBus.$emit('error', (JSON.parse(res) || {}).message)
  426. this.$refs.upload.clearFiles()
  427. })
  428. },
  429. dateFormat(fmt, date) {
  430. let ret
  431. const opt = {
  432. 'Y+': date.getFullYear().toString(), // 年
  433. 'm+': (date.getMonth() + 1).toString(), // 月
  434. 'd+': date.getDate().toString(), // 日
  435. 'H+': date.getHours().toString(), // 时
  436. // "M+": date.getMinutes().toString(), // 分
  437. // "S+": date.getSeconds().toString() // 秒
  438. // 有其他格式化字符需求可以继续添加,必须转化成字符串
  439. }
  440. for (let k in opt) {
  441. ret = new RegExp('(' + k + ')').exec(fmt)
  442. if (ret) {
  443. fmt = fmt.replace(
  444. ret[1],
  445. ret[1].length == 1 ? opt[k] : opt[k].padStart(ret[1].length, '0')
  446. )
  447. }
  448. }
  449. return fmt
  450. },
  451. handleClose() {
  452. this.dialogViewSpareMoney = false
  453. },
  454. handleSizeChange(val) {
  455. console.log(`每页 ${val} 条`)
  456. this.pageSize = val
  457. this.getList()
  458. },
  459. handleCurrentChange(val) {
  460. this.currentPage = val
  461. console.log(`当前页: ${val}`)
  462. this.getList()
  463. },
  464. getList() {
  465. getList({
  466. compId: localStorage.getItem('ws-pf_compId'),
  467. contractType: this.contractType,
  468. goodsType: this.goodsType,
  469. currentPage: this.currentPage,
  470. pageSize: this.pageSize,
  471. agreementType: '代收合同',
  472. searchType: this.searchType,
  473. searchKeyWord: this.searchKeyWord,
  474. startDate: this.startDate,
  475. endDate: this.endDate,
  476. contrPage: this.contrPage,
  477. creator:this.createPersion
  478. })
  479. .toPromise()
  480. .then((response) => {
  481. for (var i = 0; i < response.records.length; i++) {
  482. if (response.records[i].completedQuantity) {
  483. response.records[i].completedQuantity = response.records[i].completedQuantity.toFixed(3)
  484. }
  485. if (response.records[i].creator == localStorage.getItem('ws-pf_staffName')) {
  486. response.records[i].showFlag = true
  487. }
  488. if (response.records[i].addressUrl != null) {
  489. if (response.records[i].addressUrl) {
  490. response.records[i].addressUrlArray =
  491. response.records[i].addressUrl.split(',')
  492. }
  493. } else {
  494. response.records[i].addressUrlArray = []
  495. }
  496. }
  497. this.deptCircularPage.currentPage = response.current
  498. this.deptCircularPage.pageSize = response.size
  499. this.deptBudgetTotal = response.total
  500. this.contractList = response
  501. for (var i = 0; i < response.records.length; i++) {
  502. var arr = new Array()
  503. this.addressUrls[i] = new Array()
  504. if (this.contractList.records[i].addressUrl != null) {
  505. arr = this.contractList.records[i].addressUrl.split(',')
  506. this.addressUrls[i] = arr
  507. }
  508. }
  509. })
  510. },
  511. // 上传附件
  512. uploadSuccess(data, files, url) {
  513. console.log(data, files, url)
  514. // this.deptBudgetList.
  515. // this.formData.append('files', files)
  516. // this.feedbackObj.uploadNameAttachment = data.appendixName
  517. // this.feedbackObj.pathUploadAttachment = data.appendixPath
  518. // // this.newAppendixs = files
  519. // this.onChangeFlag = true
  520. },
  521. editClick(row) {
  522. var status = ''
  523. if (row.status == '待执行' || row.status == '已完成') {
  524. status = '执行中'
  525. } else if (row.status == '执行中') {
  526. status = '已完成'
  527. }
  528. this.$confirm(`是否将状态改为${status}`, '提示', {
  529. confirmButtonText: '确定',
  530. cancelButtonText: '取消',
  531. type: 'warning',
  532. })
  533. .then(() => {
  534. editstatus({
  535. id: row.id,
  536. })
  537. .toPromise()
  538. .then((response) => {
  539. this.$notify.success({
  540. title: '成功',
  541. message: '状态修改成功',
  542. })
  543. this.getList()
  544. })
  545. .catch((response) => {
  546. // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
  547. })
  548. })
  549. .catch(() => {
  550. return false
  551. })
  552. },
  553. selecttaskType(e) {
  554. for (var i = 0; i < this.taskTypeList.length; i++) {
  555. if (this.taskTypeList[i].value == e) {
  556. this.searchType = this.taskTypeList[i].type
  557. this.find()
  558. }
  559. }
  560. },
  561. fujian(row) {
  562. this.id = row.id
  563. this.accessoryTFs = true
  564. this.appendixIdss = row.addressUrl
  565. console.log(this.appendixIdss)
  566. },
  567. handleExamine(row) {
  568. console.log(row)
  569. this.$router.push({
  570. name: 'collectionContractExamine',
  571. query: {
  572. id: row.id,
  573. status: row.status,
  574. },
  575. })
  576. },
  577. handleAdd() {
  578. this.$router.push({
  579. path: 'collectionContractAdd',
  580. })
  581. },
  582. handleEdit(row) {
  583. this.$router.push({
  584. name: 'collectionContractEdit',
  585. query: {
  586. id: row.id,
  587. },
  588. })
  589. },
  590. // 关闭 dialog时 处理文件url 初始化upload组件
  591. history(row) {
  592. console.log(row)
  593. billoperatehis({
  594. id: row.id,
  595. })
  596. .toPromise()
  597. .then((response) => {
  598. this.historyList = response
  599. })
  600. },
  601. find() {
  602. if (this.value2) {
  603. this.startDate = this.dateFormat('YYYY-mm-dd', this.value2[0])
  604. this.endDate = this.dateFormat('YYYY-mm-dd', this.value2[1])
  605. } else {
  606. this.startDate = ''
  607. this.endDate = ''
  608. }
  609. this.currentPage = 1
  610. this.getList()
  611. },
  612. async exportlist() {
  613. const {
  614. data
  615. } = await export2({
  616. compId: localStorage.getItem('ws-pf_compId'),
  617. contractType: this.contractType,
  618. goodsType: this.goodsType,
  619. currentPage: this.currentPage,
  620. pageSize: this.pageSize,
  621. searchType: this.searchType,
  622. searchKeyWord: this.searchKeyWord,
  623. startDate: this.startDate,
  624. endDate: this.endDate,
  625. }, {}, {
  626. responseType: 'blob',
  627. }).toPromise()
  628. downloadFile({
  629. res: data,
  630. fileName: `${
  631. this.date.year + (this.date.month ? `-${this.date.month}` : '')
  632. }_代收合同`,
  633. type: 'xls',
  634. })
  635. },
  636. // deletecontract(){},
  637. //删除
  638. handleDelete(row) {
  639. var text = ''
  640. if (row.deliverType == 1) {
  641. text =
  642. '删除该合同将同时永久删除合同对应的临时仓库相关数据,是否确定删除?'
  643. } else {
  644. text = '合同删除后不可恢复,是否继续删除?'
  645. }
  646. this.$confirm(text, '提示', {
  647. confirmButtonText: '确定',
  648. cancelButtonText: '取消',
  649. type: 'warning',
  650. })
  651. .then(() => {
  652. deletecontract({
  653. id: row.id,
  654. })
  655. .toPromise()
  656. .then((response) => {
  657. this.$notify.success({
  658. title: '成功',
  659. message: '删除成功',
  660. })
  661. this.getList()
  662. })
  663. .catch((response) => {})
  664. })
  665. .catch(() => {
  666. return false
  667. })
  668. },
  669. //记录
  670. handleRecord(row) {
  671. this.$router.push({
  672. name: 'collectionContractRecord',
  673. query: {
  674. contractNo: row.contractNo,
  675. compId:row.compId,
  676. buyer:row.buyer,
  677. goodsName:row.goodsName,
  678. weight:row.weight,
  679. completed:row.completed,
  680. agencyCharge:row.agencyCharge
  681. },
  682. })
  683. },
  684. },
  685. }
  686. </script>
  687. <style lang="scss" scoped>
  688. .vertical-text-left {
  689. width: 62px;
  690. text-align: right;
  691. }
  692. .flex {
  693. display: flex;
  694. }
  695. .el-range-editor.el-input__inner {
  696. margin-left: 10px;
  697. }
  698. /deep/.base_header_layout .grid-content.right .find.el-button--primary {
  699. width: 30px;
  700. margin-left: -10px;
  701. border-top-left-radius: 0px;
  702. border-bottom-left-radius: 0px;
  703. }
  704. .el-button--primary {
  705. background-color: #5878e8;
  706. border-color: #5878e8;
  707. }
  708. .el-button--default {
  709. border: 1px solid #5473e8;
  710. color: #5473e8;
  711. }
  712. .warning {
  713. width: 100%;
  714. height: 2px;
  715. background: red;
  716. }
  717. .executory,
  718. .inExecution,
  719. .done {
  720. width: 6px;
  721. height: 6px;
  722. display: inline-block;
  723. border-radius: 50%;
  724. position: relative;
  725. top: -1px;
  726. }
  727. .executory {
  728. background: #ff9f24;
  729. }
  730. .inExecution {
  731. background: #5878e8;
  732. }
  733. .done {
  734. background: #50cad4;
  735. }
  736. // .top-grade {
  737. // background: linear-gradient(90deg, #5678e9, #7993f6);
  738. // color: #fff;
  739. // padding: 3px;
  740. // border-radius: 2px;
  741. // }
  742. // .second-class {
  743. // background: linear-gradient(90deg, #50cdd9, #82e2ea);
  744. // color: #fff;
  745. // padding: 3px;
  746. // border-radius: 2px;
  747. // }
  748. // .third-class {
  749. // background: linear-gradient(90deg, #ffa735, #ffbf70);
  750. // color: #fff;
  751. // padding: 3px;
  752. // border-radius: 2px;
  753. // }
  754. // .substandard {
  755. // background: linear-gradient(90deg, #b2b4bb, #ced0d5);
  756. // color: #fff;
  757. // padding: 3px;
  758. // border-radius: 2px;
  759. // }
  760. .wrap {
  761. width: 400px;
  762. position: absolute;
  763. top: 131px;
  764. left: 794px;
  765. transform-origin: right center;
  766. z-index: 2005;
  767. }
  768. .vertical-line {
  769. height: 64px;
  770. border-left: 2px solid #e9ecf7;
  771. margin-left: 4px;
  772. padding: 0 3px;
  773. // border-image: -webkit-linear-gradient(#00eba7, #08b8e6) 30 30;
  774. // border-image: -moz-linear-gradient(#00eba7, #08b8e6) 30 30;
  775. // border-image: linear-gradient(#00eba7, #08b8e6) 30 30;
  776. }
  777. .el-pagination {
  778. padding: 10px 15px;
  779. margin-bottom: 0;
  780. text-align: center;
  781. }
  782. /deep/.el-pager li.active {
  783. color: #5878e8;
  784. cursor: default;
  785. }
  786. /deep/.el-pager li:hover {
  787. color: #5878e8;
  788. cursor: default;
  789. }
  790. .vertical-circle {
  791. width: 10px;
  792. height: 10px;
  793. border: 2px solid #5878e8;
  794. background-color: #ffffff;
  795. -webkit-border-radius: 100px;
  796. }
  797. .vertical-circle:first-child {
  798. color: red;
  799. }
  800. .vertical-text {
  801. margin: 0 10px;
  802. color: #8890b1;
  803. font-size: 12px;
  804. margin-top: -4px;
  805. }
  806. /deep/.el-table .el-table__header .cell,
  807. /deep/.el-table .el-table__body .cell {
  808. text-align: center;
  809. }
  810. .typeselect {
  811. width: 500px;
  812. }
  813. // .padding-xs {
  814. // padding: 15px;
  815. // text-align: right;
  816. // }
  817. .clearfix:after {
  818. content: '';
  819. display: block;
  820. clear: both;
  821. }
  822. .el-table {
  823. font-size: 16px;
  824. }
  825. .taskType {
  826. width: 100%;
  827. background-color: #fff;
  828. margin-top: 2px;
  829. margin-bottom: 10px;
  830. list-style: none;
  831. // padding-bottom: 20px;
  832. li {
  833. float: left;
  834. border: 1px solid #6ea0f3;
  835. border-radius: 5px;
  836. max-width: 190px;
  837. padding: 0 5px;
  838. text-align: center;
  839. margin: 10px 20px;
  840. cursor: pointer;
  841. font-size: 14px;
  842. p {
  843. margin: 8px 0px;
  844. span {
  845. color: #e74c3c;
  846. }
  847. }
  848. }
  849. li:hover {
  850. background-color: #e4eeff;
  851. color: #1d6ced;
  852. }
  853. }
  854. .el-date-editor--date {
  855. margin: 0 10px;
  856. }
  857. .findValue {
  858. margin: 0 10px;
  859. }
  860. /deep/.findValue .el-input__inner {
  861. border-top-right-radius: 0px;
  862. border-bottom-right-radius: 0px;
  863. }
  864. // .button-container {
  865. // display: flex;
  866. // flex-wrap: nowrap;
  867. // justify-content: space-between;
  868. // align-items: center;
  869. // background-color: #fff;
  870. // width: 100%;
  871. // height: 50px;
  872. // padding: 0 10px;
  873. // &>div {
  874. // margin-left: 10px;
  875. // display: flex;
  876. // flex-wrap: nowrap;
  877. // flex-direction: row;
  878. // &>span {
  879. // line-height: 50px;
  880. // }
  881. // }
  882. // /deep/.auditFlow-box {
  883. // position: unset;
  884. // margin-left: 10px;
  885. // &/deep/.auditFlow-icon {
  886. // width: auto;
  887. // padding-right: 30px;
  888. // }
  889. // &/deep/.auditFlow-main {
  890. // position: absolute;
  891. // }
  892. // }
  893. // }
  894. .box-app {
  895. display: inline-block;
  896. float: left;
  897. margin-left: 30px;
  898. line-height: 50px;
  899. }
  900. /deep/.el-dialog {
  901. .el-form-item {
  902. margin-bottom: 0 !important;
  903. .el-input--medium {
  904. textarea {
  905. min-height: 100px !important;
  906. }
  907. }
  908. }
  909. }
  910. .collapse-bottom {
  911. margin-bottom: 20px;
  912. }
  913. .input-main .textarea .el-textarea__inner {
  914. width: 100%;
  915. z-index: 1;
  916. }
  917. /*.crt-main .textarea /deep/ .el-form-item__label {*/
  918. /* height: 82px;*/
  919. /*}*/
  920. // 控制select为只读的时候显示样式
  921. // .hide-sel {
  922. // .el-input__inner {
  923. // border: 0px;
  924. // }
  925. // .el-icon-arrow-up {
  926. // display: none;
  927. // }
  928. // .el-textarea__inner {
  929. // background-color: #fff !important;
  930. // border: 0;
  931. // }
  932. // .el-date-editor {
  933. // i {
  934. // display: none;
  935. // }
  936. // }
  937. // .is-disabled {
  938. // .el-input__inner:hover {
  939. // background-color: #fff !important;
  940. // border: 0;
  941. // }
  942. // color: #606266;
  943. // .el-input__inner {
  944. // background-color: #fff !important;
  945. // border: 0;
  946. // color: #606266;
  947. // }
  948. // .el-textarea__inner {
  949. // background-color: #fff !important;
  950. // border: 0;
  951. // color: #606266;
  952. // }
  953. // }
  954. // }
  955. // 控制select为只读的时候显示样式
  956. /deep/.ws-class-table-col {
  957. height: auto;
  958. padding: 0px 2px;
  959. /deep/.el-input__inner {
  960. padding: 0px 2px;
  961. }
  962. }
  963. /deep/.is-disabled {
  964. .el-input__prefix,
  965. .el-input__suffix {
  966. display: none;
  967. }
  968. .el-input__inner {
  969. background-color: #fff;
  970. border-color: #fff !important;
  971. color: #000 !important;
  972. font-size: 14px;
  973. cursor: text;
  974. padding: 0 !important;
  975. }
  976. }
  977. /deep/.typeselect .el-input__inner {
  978. color: #8890b1;
  979. }
  980. .btn_css {
  981. color: #409eff;
  982. cursor: pointer;
  983. position:relative;
  984. top:2px;
  985. }
  986. </style>