salesContract.vue 31 KB

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