purchaseContract.vue 29 KB

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