index.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603
  1. <template>
  2. <div class="app-container">
  3. <div class="filter-container">
  4. <!-- 搜索条件 -->
  5. <el-select v-model="getdataListParm.parammaps.pastureName" placeholder="牧场" class="filter-item" style="width: 140px;">
  6. <el-option v-for="item in findAllPasture" :key="item.id" :label="item.name" :value="item.name" />
  7. </el-select>
  8. <el-input v-model="getdataListParm.parammaps.partCode" placeholder="备件编号" style="width: 140px;" class="filter-item" />
  9. <el-input v-model="getdataListParm.parammaps.partName" placeholder="备件名称" style="width: 140px;" class="filter-item" />
  10. <el-select v-model="getdataListParm.parammaps.listType" clearable placeholder="清单类型" class="filter-item">
  11. <el-option v-for="item in findAllListType" :key="item.id" :label="item.name" :value="item.id" />
  12. </el-select>
  13. <el-select v-model="getdataListParm.parammaps.statue" clearable placeholder="处理状态" class="filter-item" style="width: 140px;">
  14. <el-option v-for="item in findAllStatus" :key="item.id" :label="item.name" :value="item.id" />
  15. </el-select>
  16. <el-date-picker ref="inputDatetime" v-model="getdataListParm.parammaps.inputDatetime" class="inputDatetime" type="datetimerange" style="width: 250px;top:-3px;" format="yyyy-MM-dd" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" />
  17. <el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="form_search">搜索</el-button>
  18. </div>
  19. <el-table
  20. :key="tableKey"
  21. v-loading="listLoading"
  22. element-loading-text="给我一点时间"
  23. :data="list"
  24. border
  25. fit
  26. highlight-current-row
  27. style="width: 100%;"
  28. :row-style="rowStyle"
  29. :cell-style="cellStyle"
  30. class="elTable"
  31. @sort-change="tableSort"
  32. >
  33. <el-table-column label="序号" align="center" type="index" width="50px">
  34. <template slot-scope="scope">
  35. <span>{{ scope.$index + (pageNum-1) * pageSize + 1 }}</span>
  36. </template>
  37. </el-table-column>
  38. <el-table-column label="清单编号" min-width="110px" align="center">
  39. <template slot-scope="scope">
  40. <span>{{ scope.row.repairCode }}</span>
  41. </template>
  42. </el-table-column>
  43. <el-table-column label="清单类型" min-width="80px" align="center">
  44. <template slot-scope="scope">
  45. <span>{{ scope.row.listType == 0?"维修":"保养" }}</span>
  46. </template>
  47. </el-table-column>
  48. <el-table-column label="牧场" min-width="90px" align="center">
  49. <template slot-scope="scope">
  50. <span>{{ scope.row.pastureName }}</span>
  51. </template>
  52. </el-table-column>
  53. <el-table-column label="部门" min-width="80px" align="center">
  54. <template slot-scope="scope">
  55. <span>{{ scope.row.departName }}</span>
  56. </template>
  57. </el-table-column>
  58. <el-table-column label="备件编号" min-width="130px" align="center">
  59. <template slot-scope="scope">
  60. <span>{{ scope.row.partCode }}</span>
  61. </template>
  62. </el-table-column>
  63. <el-table-column label="备件名称" min-width="80px" align="center">
  64. <template slot-scope="scope">
  65. <span>{{ scope.row.partName }}</span>
  66. </template>
  67. </el-table-column>
  68. <el-table-column label="备件规格" min-width="90px" align="center">
  69. <template slot-scope="scope">
  70. <span>{{ scope.row.specification }}</span>
  71. </template>
  72. </el-table-column>
  73. <el-table-column label="关联设备名称" min-width="90px" align="center">
  74. <template slot-scope="scope">
  75. <span>{{ scope.row.eqName }}</span>
  76. </template>
  77. </el-table-column>
  78. <el-table-column label="设备内部编号" min-width="90px" align="center">
  79. <template slot-scope="scope">
  80. <span>{{ scope.row.eqCode }}</span>
  81. </template>
  82. </el-table-column>
  83. <el-table-column label="数量" sortable prop="amount" min-width="80px" align="center">
  84. <template slot-scope="scope">
  85. <span>{{ scope.row.amount }}</span>
  86. </template>
  87. </el-table-column>
  88. <el-table-column label="处理状态" min-width="80px" align="center">
  89. <template slot-scope="scope">
  90. <span v-if="scope.row.statue == 0">未处理</span>
  91. <span v-if="scope.row.statue == 1">已卖掉</span>
  92. <span v-if="scope.row.statue == 2">已销毁</span>
  93. <span v-if="scope.row.statue == 3">已修复</span>
  94. </template>
  95. </el-table-column>
  96. <el-table-column label="处理价格" sortable prop="saleSum" min-width="90px" align="center">
  97. <template slot-scope="scope">
  98. <span>{{ scope.row.saleSum }}</span>
  99. </template>
  100. </el-table-column>
  101. <el-table-column label="处理日期" sortable prop="handleDate" min-width="90px" align="center" />
  102. <el-table-column label="操作" align="center" width="250" class-name="small-padding fixed-width" fixed="right">
  103. <template slot-scope="{row}">
  104. <el-button type="primary" size="mini" @click="form_see(row)">查看</el-button>
  105. <el-button v-if="row.statue == 0" type="success" size="mini" @click="handleDestruction(row)">处理</el-button>
  106. <!-- <el-button v-if="isOld" type="success" size="mini" @click="handleDestruction(row)">销毁/卖掉</el-button> -->
  107. </template>
  108. </el-table-column>
  109. </el-table>
  110. <pagination v-show="total>0" :total="total" :page.sync="getdataListParm.offset" :limit.sync="getdataListParm.pagecount" @pagination="getList" />
  111. <!-- 弹出层销毁/卖掉 -->
  112. <el-dialog title="旧品处理" :visible.sync="dialogFormVisibleDestruction" :close-on-click-modal="false" width="30%">
  113. <el-form ref="temp" :model="temp" label-position="right" label-width="100px" style="width: 400px;" :rules="rules">
  114. <el-row>
  115. <el-col :span="12">
  116. <el-form-item label="处理方式:" prop="radio" style="width:400px">
  117. <el-radio-group v-model="isOrNo">
  118. <el-radio v-model="isOrNo" label="0">销毁</el-radio>
  119. <el-radio v-model="isOrNo" label="1">卖掉</el-radio>
  120. <el-radio v-model="isOrNo" label="2">修复</el-radio>
  121. </el-radio-group>
  122. </el-form-item>
  123. </el-col>
  124. </el-row>
  125. <el-row v-if="isOrNo == 1">
  126. <el-col :span="12">
  127. <el-form-item label="卖出总价:" prop="saleSum">
  128. <el-input
  129. v-model="temp.saleSum"
  130. placeholder="卖出总价"
  131. style="width: 250px;"
  132. class="filter-item"
  133. />
  134. </el-form-item>
  135. </el-col>
  136. </el-row>
  137. <el-row v-if="isOrNo == 2">
  138. <el-col :span="12">
  139. <el-form-item label="修复价格:" prop="saleSum">
  140. <el-input v-model="temp.saleSum" placeholder="修复价格" style="width: 250px;" class="filter-item" />
  141. </el-form-item>
  142. </el-col>
  143. </el-row>
  144. <el-row>
  145. <el-col :span="12">
  146. <el-form-item label="处理人:" prop="employeId">
  147. <el-select
  148. v-model="temp.employeId"
  149. placeholder="处理人"
  150. class="filter-item"
  151. style="width:250px;"
  152. >
  153. <el-option
  154. v-for="item in findAllEmploye"
  155. :key="item.id"
  156. :label="item.name"
  157. :value="item.id"
  158. />
  159. </el-select>
  160. </el-form-item>
  161. </el-col>
  162. </el-row>
  163. <el-row>
  164. <el-col :span="12">
  165. <el-form-item label="处理日期:" prop="date">
  166. <el-date-picker
  167. v-model="temp.date"
  168. type="date"
  169. placeholder="日期"
  170. format="yyyy-MM-dd"
  171. value-format="yyyy-MM-dd"
  172. style="width:250px;"
  173. />
  174. </el-form-item>
  175. </el-col>
  176. </el-row>
  177. </el-form>
  178. <div slot="footer" class="dialog-footer">
  179. <el-button
  180. type="primary"
  181. @click="edit_dialog_saveDestruction()"
  182. >确认</el-button>
  183. <el-button @click="dialogFormVisibleDestruction = false">关闭</el-button>
  184. </div>
  185. </el-dialog>
  186. <!-- 记录 -->
  187. <el-dialog title="查看详情" :visible.sync="dialogFormVisibleCard" :close-on-click-modal="false" width="90%">
  188. <div class="app-contentcard">
  189. <el-form ref="rowSeeData" :model="rowSeeData" label-position="right" label-width="120px" style="width: 100%;margin:0 auto;">
  190. <div class="filter-container">
  191. <el-row>
  192. <el-col :span="6">
  193. <el-form-item label="清单编号:" prop="repairCode">
  194. <el-input v-model="rowSeeData.repairCode" placeholder="" style="width: 100%;" class="filter-item" disabled />
  195. </el-form-item>
  196. </el-col>
  197. <el-col :span="6">
  198. <el-form-item label="清单类型:" prop="listType">
  199. <el-input v-model="rowSeeData.listType == 0 ? '维修':'保养' " placeholder="" style="width: 100%;" class="filter-item" disabled />
  200. </el-form-item>
  201. </el-col>
  202. <el-col :span="6">
  203. <el-form-item label="牧场:" prop="pastureName">
  204. <el-input v-model="rowSeeData.pastureName" placeholder="" style="width: 100%;" class="filter-item" disabled />
  205. </el-form-item>
  206. </el-col>
  207. <el-col :span="6">
  208. <el-form-item label="部门:" prop="departName">
  209. <el-input v-model="rowSeeData.departName" placeholder="" style="width: 100%;" class="filter-item" disabled />
  210. </el-form-item>
  211. </el-col>
  212. </el-row>
  213. <el-row>
  214. <el-col :span="6">
  215. <el-form-item label="备件编号:" prop="partCode">
  216. <el-input v-model="rowSeeData.partCode" placeholder="" style="width: 100%;" class="filter-item" disabled />
  217. </el-form-item>
  218. </el-col>
  219. <el-col :span="6">
  220. <el-form-item label="备件名称:" prop="partName">
  221. <el-input v-model="rowSeeData.partName" placeholder="" style="width: 100%;" class="filter-item" disabled />
  222. </el-form-item>
  223. </el-col>
  224. <el-col :span="6">
  225. <el-form-item label="备件规格:" prop="specification">
  226. <el-input v-model="rowSeeData.specification" placeholder="" style="width: 100%;" class="filter-item" disabled />
  227. </el-form-item>
  228. </el-col>
  229. <el-col :span="6">
  230. <el-form-item label="关联设备名称:" prop="eqName">
  231. <el-input v-model="rowSeeData.eqName" placeholder="" style="width: 100%;" class="filter-item" disabled />
  232. </el-form-item>
  233. </el-col>
  234. </el-row>
  235. <el-row>
  236. <el-col :span="6">
  237. <el-form-item label="设备内部编号:" prop="eqCode">
  238. <el-input v-model="rowSeeData.eqCode" placeholder="" style="width: 100%;" class="filter-item" disabled />
  239. </el-form-item>
  240. </el-col>
  241. <el-col :span="6">
  242. <el-form-item label="数量:" prop="amount">
  243. <el-input v-model="rowSeeData.amount" placeholder="" style="width: 100%;" class="filter-item" disabled />
  244. </el-form-item>
  245. </el-col>
  246. <el-col :span="6">
  247. <el-form-item label="处理状态:" prop="statue">
  248. <el-input v-if="rowSeeData.statue == 0" value="未处理" placeholder="" style="width: 100%;" class="filter-item" disabled />
  249. <el-input v-if="rowSeeData.statue == 1" value="已卖掉" placeholder="" style="width: 100%;" class="filter-item" disabled />
  250. <el-input v-if="rowSeeData.statue == 2" value="已销毁" placeholder="" style="width: 100%;" class="filter-item" disabled />
  251. <el-input v-if="rowSeeData.statue == 3" value="已修复" placeholder="" style="width: 100%;" class="filter-item" disabled />
  252. </el-form-item>
  253. </el-col>
  254. <el-col :span="6">
  255. <el-form-item v-if="rowSeeData.statue == 1" label="卖出总价:" prop="saleSum">
  256. <el-input v-model="rowSeeData.saleSum" placeholder="" style="width: 100%;" class="filter-item" disabled />
  257. </el-form-item>
  258. <el-form-item v-if="rowSeeData.statue == 3" label="修复总价:" prop="saleSum">
  259. <el-input v-model="rowSeeData.saleSum" placeholder="" style="width: 100%;" class="filter-item" disabled />
  260. </el-form-item>
  261. </el-col>
  262. </el-row>
  263. <el-row>
  264. <el-col :span="6">
  265. <el-form-item label="处理日期:" prop="handleDate">
  266. <el-input v-model="rowSeeData.handleDate" placeholder="" style="width: 100%;" class="filter-item" disabled />
  267. </el-form-item>
  268. </el-col>
  269. <el-col :span="6">
  270. <el-form-item label="处理人:" prop="handlerName">
  271. <el-input v-model="rowSeeData.handlerName" placeholder="" style="width: 100%;" class="filter-item" disabled />
  272. </el-form-item>
  273. </el-col>
  274. </el-row>
  275. </div>
  276. </el-form>
  277. <div slot="footer" class="dialog-footer" style="right:30px;position:absolute;bottom:10px">
  278. <el-button @click="dialogFormVisibleCard = false">关闭</el-button>
  279. </div>
  280. </div>
  281. </el-dialog>
  282. </div>
  283. </template>
  284. <script>
  285. // 引入
  286. import { GetDataByName, GetDataByNames, PostDataByName, checkButtons } from '@/api/common'
  287. import waves from '@/directive/waves' // waves directive
  288. import { parseTime, sortChange } from '@/utils/index.js'
  289. import { validateEMail } from '@/utils/validate.js'
  290. import Pagination from '@/components/Pagination'
  291. import Cookies from 'js-cookie'
  292. export default {
  293. name: 'Refuse',
  294. components: { Pagination },
  295. directives: { waves },
  296. data() {
  297. return {
  298. isOld: [],
  299. isOrNo: '0',
  300. tableKey: 0,
  301. list: null,
  302. total: 0,
  303. listLoading: true,
  304. state1: '',
  305. radio: '',
  306. requestParam: {
  307. name: 'insertAsset',
  308. offset: 0,
  309. pagecount: 0,
  310. parammaps: {}
  311. },
  312. // 1-2:table&搜索传参
  313. getdataListParm: {
  314. name: 'getRefuseList',
  315. page: 1,
  316. offset: 1,
  317. pagecount: 10,
  318. returntype: 'Map',
  319. parammaps: {
  320. inputDatetime: new Date(),
  321. pastureName: Cookies.get('pasturename'),
  322. partCode: '',
  323. partName: '',
  324. listType: '',
  325. statue: '',
  326. startTime: '',
  327. stopTime: ''
  328. }
  329. },
  330. // 2-3:下拉框请求后数据加入[]
  331. findAllListType: [
  332. { id: 0, name: '维修' },
  333. { id: 1, name: '保养' }],
  334. findAllStatus: [
  335. { id: 0, name: '未处理' },
  336. { id: 1, name: '已卖掉' },
  337. { id: 2, name: '已销毁' },
  338. { id: 3, name: '已修复' }
  339. ],
  340. findAllProvider: [],
  341. findAllAssetType: [],
  342. findAllPasture: [],
  343. findAllDepart: [],
  344. findAllEmploye: [],
  345. getDictByName: [],
  346. // 2-1.请求下拉框接口
  347. requestParams: [
  348. { name: 'findAllProvider', offset: 0, pagecount: 0, params: [] },
  349. { name: 'findAllAssetType', offset: 0, pagecount: 0, params: [] },
  350. { name: 'findAllPasture', offset: 0, pagecount: 0, returntype: 'Map', parammaps: { 'id': Cookies.get('pastureid') }},
  351. { name: 'findAllDepart', offset: 0, pagecount: 0, parammaps: { 'pastureId': Cookies.get('pastureid') }},
  352. { name: 'findAllEmploye', offset: 0, pagecount: 0, parammaps: { 'pastureId': Cookies.get('pastureid') }},
  353. { name: 'getDictByName', offset: 0, pagecount: 0, params: ['旧品状态'] }
  354. ],
  355. temp: {
  356. date: parseTime(new Date(), '{y}-{m}-{d}'),
  357. employeId: this.$store.state.user.employeid,
  358. departmentId: this.$store.state.user.departmentid,
  359. pastureId: this.$store.state.user.pastureid
  360. },
  361. dialogFormVisibleDestruction: false,
  362. dialogStatusDestruction: '',
  363. dialogPvVisible: false,
  364. // 校验规则
  365. rules: {
  366. // saleSum: [
  367. // { required: true, message: '必填', trigger: 'blur' }
  368. // 引入自定义校验并使用
  369. // { validator: validateEMail, trigger: 'blur' }
  370. // ],
  371. },
  372. rowStyle: { maxHeight: 50 + 'px', height: 45 + 'px' },
  373. cellStyle: { padding: 0 + 'px' },
  374. dialogFormVisibleCard: false,
  375. rowSeeData: {},
  376. buttons: []
  377. }
  378. },
  379. created() {
  380. const that = this
  381. GetDataByName({ 'name': 'getUserPCButtons', 'parammaps': { 'jwt_username': Cookies.get('name') }}).then(response => {
  382. that.buttons = response.data.list
  383. that.getButtons()
  384. })
  385. this.getDownList()
  386. this.getList()
  387. },
  388. methods: {
  389. tableSort(column) {
  390. sortChange(column, this.list)
  391. },
  392. getButtons() {
  393. // 销毁/卖掉
  394. const Old = 'customs:receive:old'
  395. const isOld = checkButtons(this.$store.state.user.buttons, Old)
  396. this.isOld = isOld
  397. },
  398. changeStorageType(val) {
  399. console.log(val)
  400. if (val === 0) {
  401. } else {
  402. }
  403. },
  404. // 供应商模糊查询
  405. providerSearch(queryString, cb) {
  406. var returnList = this.findAllProvider
  407. var results = queryString
  408. ? returnList.filter(this.createFilter(queryString))
  409. : returnList
  410. // 调用 callback 返回建议列表的数据
  411. cb(results)
  412. },
  413. createFilter(queryString) {
  414. return returnValue => {
  415. return (
  416. returnValue.name.toLowerCase().indexOf(queryString.toLowerCase()) >= 0
  417. )
  418. }
  419. },
  420. handleSelect(item) {
  421. console.log(item)
  422. },
  423. // 1-1: table&搜索
  424. getList() {
  425. this.listLoading = true
  426. if (this.$refs['inputDatetime'] !== undefined && this.$refs['inputDatetime'].value !== null) {
  427. this.getdataListParm.parammaps.startTime = this.$refs['inputDatetime'].value[0]
  428. this.getdataListParm.parammaps.stopTime = this.$refs['inputDatetime'].value[1]
  429. } else {
  430. this.getdataListParm.parammaps.startTime = ''
  431. this.getdataListParm.parammaps.stopTime = ''
  432. }
  433. GetDataByName(this.getdataListParm).then(response => {
  434. this.list = response.data.list
  435. this.pageNum = response.data.pageNum
  436. this.pageSize = response.data.pageSize
  437. if (response.data.total) {
  438. this.total = response.data.total
  439. }
  440. // Just to simulate the time of the request
  441. setTimeout(() => {
  442. this.listLoading = false
  443. }, 100)
  444. })
  445. },
  446. // 2-2:下拉框
  447. getDownList() {
  448. GetDataByNames(this.requestParams).then(response => {
  449. this.findAllProvider = response.data.findAllProvider.list
  450. this.findAllAssetType = response.data.findAllAssetType.list
  451. this.findAllPasture = response.data.findAllPasture.list
  452. this.findAllDepart = response.data.findAllDepart.list
  453. this.findAllEmploye = response.data.findAllEmploye.list
  454. this.getDictByName = response.data.getDictByName.list
  455. })
  456. },
  457. form_search() {
  458. this.listLoading = true
  459. this.getdataListParm.offset = 1
  460. this.getList()
  461. },
  462. handleModifyStatus(row, status) {
  463. this.$message({
  464. message: '操作成功',
  465. type: 'success'
  466. })
  467. row.status = status
  468. },
  469. form_reset() {
  470. this.temp = {
  471. // 格式化日期
  472. inputDatetime: parseTime(new Date(), '{y}-{m}-{d}')
  473. }
  474. },
  475. form_see(row) {
  476. console.log(row)
  477. this.rowSeeData = Object.assign({}, row)
  478. this.dialogFormVisibleCard = true
  479. },
  480. // 销毁/卖掉
  481. handleDestruction(row) {
  482. this.temp.id = row.id
  483. this.dialogFormVisibleDestruction = true
  484. // if (row.statue === '未处理') {
  485. // console.log(row)
  486. // this.temp = Object.assign({}, row) // copy obj
  487. // this.dialogStatusDestruction = 'destruction'
  488. // this.dialogFormVisibleDestruction = true
  489. // } else {
  490. // this.$notify({
  491. // title: '',
  492. // message: '旧品已处理...',
  493. // type: 'warning',
  494. // duration: 2000
  495. // })
  496. // }
  497. },
  498. edit_dialog_saveDestruction() {
  499. this.$refs['temp'].validate(valid => {
  500. if (valid) {
  501. console.log(this.temp)
  502. if (this.isOrNo == 0) {
  503. this.$confirm('是否销毁?', '提示', {
  504. confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning', center: true
  505. }).then(() => {
  506. var send_data1 = {
  507. name: 'handleRefuseXH',
  508. parammaps: { id: this.temp.id, empId: this.temp.employeId, handleDate: this.temp.date }
  509. }
  510. PostDataByName(send_data1).then(response => {
  511. console.log(response)
  512. if (response.msg === 'fail') {
  513. this.$notify({ title: '失败', message: '保存失败-' + response.data, type: 'warning', duration: 2000 })
  514. } else {
  515. this.getList()
  516. this.dialogFormVisibleDestruction = false
  517. this.$notify({ title: '成功', message: '成功', type: 'success', duration: 2000 })
  518. }
  519. })
  520. }).catch(() => {
  521. this.$message({ type: 'info', message: '已取消' })
  522. })
  523. } else if (this.isOrNo == 1) {
  524. console.log(this.temp.saleSum)
  525. if (this.temp.saleSum == '' || this.temp.saleSum == undefined) {
  526. this.$message('未输入价格!')
  527. } else {
  528. this.$confirm('是否卖掉?', '提示', {
  529. confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning', center: true
  530. }).then(() => {
  531. var send_data2 = {
  532. name: 'handleRefuseMC',
  533. parammaps: { id: this.temp.id, saleSum: this.temp.saleSum, empId: this.temp.employeId, handleDate: this.temp.date }
  534. }
  535. PostDataByName(send_data2).then(response => {
  536. console.log(response)
  537. if (response.msg === 'fail') {
  538. this.$notify({ title: '失败', message: '保存失败-' + response.data, type: 'warning', duration: 2000 })
  539. } else {
  540. this.getList()
  541. this.dialogFormVisibleDestruction = false
  542. this.$notify({ title: '成功', message: '成功', type: 'success', duration: 2000 })
  543. }
  544. })
  545. }).catch(() => {
  546. this.$message({ type: 'info', message: '已取消' })
  547. })
  548. }
  549. } else if (this.isOrNo == 2) {
  550. if (this.temp.saleSum == '' || this.temp.saleSum == undefined) {
  551. this.$message('未输入价格!')
  552. } else {
  553. this.$confirm('是否修复?', '提示', {
  554. confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning', center: true
  555. }).then(() => {
  556. var send_data3 = {
  557. name: 'handleRefuseXF',
  558. parammaps: { id: this.temp.id, saleSum: this.temp.saleSum, empId: this.temp.employeId, handleDate: this.temp.date }
  559. }
  560. PostDataByName(send_data3).then(response => {
  561. console.log(response)
  562. if (response.msg === 'fail') {
  563. this.$notify({ title: '失败', message: '保存失败-' + response.data, type: 'warning', duration: 2000 })
  564. } else {
  565. this.getList()
  566. this.dialogFormVisibleDestruction = false
  567. this.$notify({ title: '成功', message: '成功', type: 'success', duration: 2000 })
  568. }
  569. })
  570. }).catch(() => {
  571. this.$message({ type: 'info', message: '已取消' })
  572. })
  573. }
  574. }
  575. }
  576. })
  577. }
  578. }
  579. }
  580. </script>