acquisitionContract.vue 33 KB

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