salesContract.vue 30 KB

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