storageContract.vue 34 KB

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