salesContract.vue 31 KB

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