salesContract.vue 32 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099
  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="160">
  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 :page-sizes="[10, 30, 50, 100, 500, 1000, 9999]" @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. handlecost(row){
  365. this.$router.push({
  366. name: 'salesContractcost',
  367. query: {
  368. id: row.id,
  369. contractNo: row.contractNo,
  370. status:row.status,
  371. buyer:row.buyer
  372. },
  373. })
  374. },
  375. selectstatuschange(e,row){
  376. var data={}
  377. if(e=='发运结束'){
  378. data={id: row.id,endFlag:1}
  379. }else{
  380. data={id: row.id}
  381. }
  382. if(e=='执行中'){
  383. if(row.addressUrl==''){
  384. this.$notify.error({
  385. title: '失败',
  386. message: '修改失败,未上传双章合同附件',
  387. })
  388. return
  389. }
  390. console.log(row)
  391. }
  392. this.$confirm(`是否将状态改为${e}`, {
  393. confirmButtonText: '确定',
  394. cancelButtonText: '取消',
  395. type: 'warning',
  396. })
  397. .then(() => {
  398. editstatus(data)
  399. .toPromise()
  400. .then((response) => {
  401. this.$notify.success({
  402. title: '成功',
  403. message: '状态修改成功',
  404. })
  405. this.getList()
  406. })
  407. .catch((response) => {
  408. // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
  409. })
  410. })
  411. .catch(() => {
  412. row.status=row.currectstatus
  413. return false
  414. })
  415. },
  416. onChange() {
  417. this.$refs.upload
  418. .handleSaveBill()
  419. .then(async (response) => {
  420. this.deptBudgetList.addressUrl = response
  421. this.deptBudgetList.id = this.id
  422. this.deptBudgetList.flag = 1
  423. editInfo(this.deptBudgetList)
  424. .toPromise()
  425. .then((response) => {
  426. this.accessoryTFs = false
  427. this.$message.success('上传成功')
  428. this.getList()
  429. })
  430. })
  431. .catch((res) => {
  432. EventBus.$emit('error', (JSON.parse(res) || {}).message)
  433. this.$refs.upload.clearFiles()
  434. })
  435. },
  436. dateFormat(fmt, date) {
  437. let ret
  438. const opt = {
  439. 'Y+': date.getFullYear().toString(), // 年
  440. 'm+': (date.getMonth() + 1).toString(), // 月
  441. 'd+': date.getDate().toString(), // 日
  442. 'H+': date.getHours().toString(), // 时
  443. // "M+": date.getMinutes().toString(), // 分
  444. // "S+": date.getSeconds().toString() // 秒
  445. // 有其他格式化字符需求可以继续添加,必须转化成字符串
  446. }
  447. for (let k in opt) {
  448. ret = new RegExp('(' + k + ')').exec(fmt)
  449. if (ret) {
  450. fmt = fmt.replace(
  451. ret[1],
  452. ret[1].length == 1 ? opt[k] : opt[k].padStart(ret[1].length, '0')
  453. )
  454. }
  455. }
  456. return fmt
  457. },
  458. handleClose() {
  459. this.dialogViewSpareMoney = false
  460. },
  461. handleClose1() {
  462. this.accesscard = false
  463. },
  464. handleSizeChange(val) {
  465. console.log(`每页 ${val} 条`)
  466. this.pageSize = val
  467. this.getList()
  468. },
  469. handleCurrentChange(val) {
  470. this.currentPage = val
  471. console.log(`当前页: ${val}`)
  472. this.getList()
  473. },
  474. getList() {
  475. getList({
  476. compId: localStorage.getItem('ws-pf_compId'),
  477. contractType: this.contractType,
  478. goodsType: this.goodsType,
  479. currentPage: this.currentPage,
  480. pageSize: this.pageSize,
  481. searchType: this.searchType,
  482. searchKeyWord: this.searchKeyWord,
  483. startDate: this.startDate,
  484. endDate: this.endDate,
  485. contrPage: this.contrPage,
  486. })
  487. .toPromise()
  488. .then((response) => {
  489. var date=new Date().getTime()
  490. for (var i = 0; i < response.records.length; i++) {
  491. if(response.records[i].status){
  492. response.records[i].currectstatus=response.records[i].status
  493. }
  494. if(response.records[i].collectionDeadline){
  495. response.records[i].date=new Date(response.records[i].collectionDeadline).getTime()
  496. console.log(response.records[i].date,parseInt(date) + (5 * 24 * 3600 * 1000))
  497. if(response.records[i].date<parseInt(date) + (5 * 24 * 3600 * 1000)){
  498. response.records[i].datestatus=true
  499. }
  500. }else{
  501. response.records[i].datestatus=false
  502. }
  503. if (response.records[i].completedQuantity) {
  504. response.records[i].completedQuantity = response.records[i].completedQuantity.toFixed(3)
  505. }
  506. if (response.records[i].addressUrl != null) {
  507. if (response.records[i].addressUrl != '') {
  508. response.records[i].addressUrlArray =
  509. response.records[i].addressUrl.split(',')
  510. }
  511. } else {
  512. response.records[i].addressUrlArray = []
  513. }
  514. if (response.records[i].imperfectGrain != null) {
  515. response.records[i].proportion =
  516. Math.floor(
  517. (response.records[i].imperfectGrain /
  518. response.records[i].weight) *
  519. 10000
  520. ) / 100
  521. } else {
  522. response.records[i].proportion = 0
  523. }
  524. }
  525. this.deptCircularPage.currentPage = response.current
  526. this.deptCircularPage.pageSize = response.size
  527. this.deptBudgetTotal = response.total
  528. this.contractList = response
  529. for (var i = 0; i < response.records.length; i++) {
  530. var arr = new Array()
  531. this.addressUrls[i] = new Array()
  532. if (this.contractList.records[i].addressUrl != null) {
  533. arr = this.contractList.records[i].addressUrl.split(',')
  534. this.addressUrls[i] = arr
  535. }
  536. }
  537. })
  538. },
  539. // 上传附件
  540. uploadSuccess(data, files, url) {
  541. console.log(data, files, url)
  542. // this.deptBudgetList.
  543. // this.formData.append('files', files)
  544. // this.feedbackObj.uploadNameAttachment = data.appendixName
  545. // this.feedbackObj.pathUploadAttachment = data.appendixPath
  546. // // this.newAppendixs = files
  547. // this.onChangeFlag = true
  548. },
  549. editClick(row) {
  550. var status = ''
  551. if (row.status == '待执行' || row.status == '已完成') {
  552. status = '执行中'
  553. } else if (row.status == '执行中'||row.status == '发运结束') {
  554. status = '已完成'
  555. }
  556. //cancelButtonClass: "btn-custom-cancel"
  557. this.$confirm(`是否将状态改为${status}`, {
  558. confirmButtonText: '确定',
  559. cancelButtonText: '取消',
  560. type: 'warning',
  561. })
  562. .then(() => {
  563. editstatus({
  564. id: row.id,
  565. })
  566. .toPromise()
  567. .then((response) => {
  568. this.$notify.success({
  569. title: '成功',
  570. message: '状态修改成功',
  571. })
  572. this.getList()
  573. })
  574. .catch((response) => {
  575. // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
  576. })
  577. })
  578. .catch(() => {
  579. return false
  580. })
  581. },
  582. selecttaskType(e) {
  583. for (var i = 0; i < this.taskTypeList.length; i++) {
  584. if (this.taskTypeList[i].value == e) {
  585. this.searchType = this.taskTypeList[i].type
  586. this.find()
  587. }
  588. }
  589. },
  590. // receiveAttachmentPath
  591. fujian(row) {
  592. this.id = row.id
  593. this.accessoryTFs = true
  594. this.appendixIdss = row.addressUrl
  595. console.log(this.appendixIdss)
  596. },
  597. handleExamine(row) {
  598. this.$router.push({
  599. name: 'salesContractExamine',
  600. query: {
  601. id: row.id,
  602. },
  603. })
  604. },
  605. handleAdd() {
  606. this.$router.push({
  607. path: 'salesContractAdd',
  608. })
  609. },
  610. handleEdit(row) {
  611. this.$router.push({
  612. name: 'salesContractEdit',
  613. query: {
  614. id: row.id,
  615. },
  616. })
  617. },
  618. // 关闭 dialog时 处理文件url 初始化upload组件
  619. handleCloe() {
  620. this.dialogViewSpareMoney = false
  621. },
  622. history(row) {
  623. billoperatehis({
  624. id: row.id,
  625. })
  626. .toPromise()
  627. .then((response) => {
  628. this.historyList = response
  629. })
  630. },
  631. find() {
  632. if (this.value2) {
  633. this.startDate = this.dateFormat('YYYY-mm-dd', this.value2[0])
  634. this.endDate = this.dateFormat('YYYY-mm-dd', this.value2[1])
  635. } else {
  636. this.startDate = ''
  637. this.endDate = ''
  638. }
  639. this.currentPage = 1
  640. this.getList()
  641. },
  642. async exportlist() {
  643. const {
  644. data
  645. } = await export1({
  646. compId: localStorage.getItem('ws-pf_compId'),
  647. contractType: this.contractType,
  648. goodsType: this.goodsType,
  649. currentPage: this.currentPage,
  650. pageSize: this.pageSize,
  651. searchType: this.searchType,
  652. searchKeyWord: this.searchKeyWord,
  653. startDate: this.startDate,
  654. endDate: this.endDate,
  655. }, {}, {
  656. responseType: 'blob',
  657. }).toPromise()
  658. downloadFile({
  659. res: data,
  660. fileName: `${
  661. this.date.year + (this.date.month ? `-${this.date.month}` : '')
  662. }_销售合同`,
  663. type: 'xls',
  664. })
  665. },
  666. handleDelete(row) {
  667. var handleDelete = ' '
  668. if (row.handleDelete == '') {}
  669. this.$confirm(
  670. `删除该合同将同时永久删除合同对应的临时仓库相关数据,是否确定删除?`, {
  671. cancelButtonText: '取消',
  672. confirmButtonText: '确定',
  673. type: 'warning',
  674. }
  675. )
  676. .then(() => {
  677. deletecontract({
  678. id: row.id,
  679. })
  680. .toPromise()
  681. .then((response) => {
  682. this.$notify.success({
  683. title: '成功',
  684. message: '删除成功',
  685. })
  686. this.getList()
  687. })
  688. .catch((response) => {
  689. // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
  690. })
  691. })
  692. .catch(() => {
  693. return false
  694. })
  695. },
  696. },
  697. }
  698. </script>
  699. <style lang="scss" scoped>
  700. .vertical-text-left {
  701. width: 62px;
  702. text-align: right;
  703. }
  704. .flex {
  705. display: flex;
  706. }
  707. .el-range-editor.el-input__inner {
  708. margin-left: 10px;
  709. }
  710. /deep/.base_header_layout .grid-content.right .find.el-button--primary {
  711. width: 30px;
  712. margin-left: -10px;
  713. border-top-left-radius: 0px;
  714. border-bottom-left-radius: 0px;
  715. }
  716. .el-button--primary {
  717. background-color: #5878e8;
  718. border-color: #5878e8;
  719. }
  720. .el-button--default {
  721. border: 1px solid #5473e8;
  722. color: #5473e8;
  723. }
  724. .warning {
  725. width: 100%;
  726. height: 2px;
  727. background: red;
  728. }
  729. .executory,
  730. .inExecution,
  731. .done {
  732. width: 6px;
  733. height: 6px;
  734. display: inline-block;
  735. border-radius: 50%;
  736. position: relative;
  737. top: -1px;
  738. }
  739. .executory {
  740. background: #ff9f24;
  741. }
  742. .inExecution {
  743. background: #5878e8;
  744. }
  745. .done {
  746. background: #50cad4;
  747. }
  748. .top-grade {
  749. background: linear-gradient(90deg, #5678e9, #7993f6);
  750. color: #fff;
  751. padding: 3px;
  752. border-radius: 2px;
  753. }
  754. .second-class {
  755. background: linear-gradient(90deg, #50cdd9, #82e2ea);
  756. color: #fff;
  757. padding: 3px;
  758. border-radius: 2px;
  759. }
  760. .third-class {
  761. background: linear-gradient(90deg, #ffa735, #ffbf70);
  762. color: #fff;
  763. padding: 3px;
  764. border-radius: 2px;
  765. }
  766. .substandard {
  767. background: linear-gradient(90deg, #b2b4bb, #ced0d5);
  768. color: #fff;
  769. padding: 3px;
  770. border-radius: 2px;
  771. }
  772. .wrap {
  773. width: 400px;
  774. position: absolute;
  775. top: 131px;
  776. left: 794px;
  777. transform-origin: right center;
  778. z-index: 2005;
  779. }
  780. .vertical-line {
  781. height: 100px;
  782. border-left: 2px solid #e9ecf7;
  783. margin-left: 4px;
  784. padding: 0 3px;
  785. // border-image: -webkit-linear-gradient(#00eba7, #08b8e6) 30 30;
  786. // border-image: -moz-linear-gradient(#00eba7, #08b8e6) 30 30;
  787. // border-image: linear-gradient(#00eba7, #08b8e6) 30 30;
  788. }
  789. .el-pagination {
  790. padding: 10px 15px;
  791. margin-bottom: 0;
  792. text-align: center;
  793. }
  794. /deep/.el-pager li.active {
  795. color: #5878e8;
  796. cursor: default;
  797. }
  798. /deep/.el-pager li:hover {
  799. color: #5878e8;
  800. cursor: default;
  801. }
  802. .vertical-circle {
  803. width: 10px;
  804. height: 10px;
  805. border: 2px solid #5878e8;
  806. background-color: #ffffff;
  807. -webkit-border-radius: 100px;
  808. }
  809. .vertical-circle:first-child {
  810. color: red;
  811. }
  812. .vertical-text {
  813. margin: 0 10px;
  814. color: #8890b1;
  815. font-size: 12px;
  816. margin-top: -4px;
  817. }
  818. /deep/.el-table .el-table__header .cell,
  819. /deep/.el-table .el-table__body .cell {
  820. text-align: center;
  821. }
  822. .typeselect {
  823. width: 500px;
  824. }
  825. .padding-xs {
  826. padding: 15px;
  827. text-align: right;
  828. }
  829. .clearfix:after {
  830. content: '';
  831. display: block;
  832. clear: both;
  833. }
  834. .el-table {
  835. font-size: 16px;
  836. }
  837. .taskType {
  838. width: 100%;
  839. background-color: #fff;
  840. margin-top: 2px;
  841. margin-bottom: 10px;
  842. list-style: none;
  843. // padding-bottom: 20px;
  844. li {
  845. float: left;
  846. border: 1px solid #6ea0f3;
  847. border-radius: 5px;
  848. max-width: 190px;
  849. padding: 0 5px;
  850. text-align: center;
  851. margin: 10px 20px;
  852. cursor: pointer;
  853. font-size: 14px;
  854. p {
  855. margin: 8px 0px;
  856. span {
  857. color: #e74c3c;
  858. }
  859. }
  860. }
  861. li:hover {
  862. background-color: #e4eeff;
  863. color: #1d6ced;
  864. }
  865. }
  866. .el-date-editor--date {
  867. margin: 0 10px;
  868. }
  869. .findValue {
  870. margin: 0 10px;
  871. }
  872. /deep/.findValue .el-input__inner {
  873. border-top-right-radius: 0px;
  874. border-bottom-right-radius: 0px;
  875. }
  876. .button-container {
  877. display: flex;
  878. flex-wrap: nowrap;
  879. justify-content: space-between;
  880. align-items: center;
  881. background-color: #fff;
  882. width: 100%;
  883. height: 50px;
  884. padding: 0 10px;
  885. &>div {
  886. margin-left: 10px;
  887. display: flex;
  888. flex-wrap: nowrap;
  889. flex-direction: row;
  890. &>span {
  891. line-height: 50px;
  892. }
  893. }
  894. /deep/.auditFlow-box {
  895. position: unset;
  896. margin-left: 10px;
  897. &/deep/.auditFlow-icon {
  898. width: auto;
  899. padding-right: 30px;
  900. }
  901. &/deep/.auditFlow-main {
  902. position: absolute;
  903. }
  904. }
  905. }
  906. .box-app {
  907. display: inline-block;
  908. float: left;
  909. margin-left: 30px;
  910. line-height: 50px;
  911. }
  912. /deep/.el-dialog {
  913. .el-form-item {
  914. margin-bottom: 0 !important;
  915. .el-input--medium {
  916. textarea {
  917. min-height: 100px !important;
  918. }
  919. }
  920. }
  921. }
  922. .collapse-bottom {
  923. margin-bottom: 20px;
  924. }
  925. .input-main .textarea .el-textarea__inner {
  926. width: 100%;
  927. z-index: 1;
  928. }
  929. /*.crt-main .textarea /deep/ .el-form-item__label {*/
  930. /* height: 82px;*/
  931. /*}*/
  932. // 控制select为只读的时候显示样式
  933. .hide-sel {
  934. .el-input__inner {
  935. border: 0px;
  936. }
  937. .el-icon-arrow-up {
  938. display: none;
  939. }
  940. .el-textarea__inner {
  941. background-color: #fff !important;
  942. border: 0;
  943. }
  944. .el-date-editor {
  945. i {
  946. display: none;
  947. }
  948. }
  949. .is-disabled {
  950. .el-input__inner:hover {
  951. background-color: #fff !important;
  952. border: 0;
  953. }
  954. color: #606266;
  955. .el-input__inner {
  956. background-color: #fff !important;
  957. border: 0;
  958. color: #606266;
  959. }
  960. .el-textarea__inner {
  961. background-color: #fff !important;
  962. border: 0;
  963. color: #606266;
  964. }
  965. }
  966. }
  967. // 控制select为只读的时候显示样式
  968. /deep/.ws-class-table-col {
  969. height: auto;
  970. padding: 0px 2px;
  971. /deep/.el-input__inner {
  972. padding: 0px 2px;
  973. }
  974. }
  975. /deep/.is-disabled {
  976. .el-input__prefix,
  977. .el-input__suffix {
  978. display: none;
  979. }
  980. .el-input__inner {
  981. background-color: #fff;
  982. border-color: #fff !important;
  983. color: #000 !important;
  984. font-size: 14px;
  985. cursor: text;
  986. padding: 0 !important;
  987. }
  988. .el-message-box {
  989. width: 440px;
  990. height: 160px;
  991. background: #ffffff;
  992. box-shadow: 0px 2px 31px 0px rgba(66, 75, 112, 0.23);
  993. border-radius: 4px;
  994. }
  995. /deep/.el-message-box__message p {
  996. width: 351px;
  997. height: 20px;
  998. font-size: 14px;
  999. font-weight: 400;
  1000. color: #191919;
  1001. line-height: 20px;
  1002. }
  1003. .el-message-box__title {
  1004. width: 440px;
  1005. height: 160px;
  1006. background: #ffffff;
  1007. box-shadow: 0px 2px 31px 0px rgba(66, 75, 112, 0.23);
  1008. border-radius: 4px;
  1009. }
  1010. }
  1011. /deep/.typeselect .el-input__inner {
  1012. color: #8890b1;
  1013. }
  1014. /deep/.statusselect .el-input__inner {
  1015. color: #8890b1;
  1016. width:100%;
  1017. }
  1018. </style>