acquisitionContract.vue 31 KB

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