acquisitionContract.vue 30 KB

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