salesContract.vue 31 KB

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