ExceptionBox.vue 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313
  1. <template>
  2. <el-dialog
  3. title="账单异常"
  4. append-to-body
  5. :close-on-click-modal="false"
  6. :visible.sync="visible"
  7. width="60%"
  8. :show-close="false"
  9. >
  10. <el-row style="margin: 20px 0">
  11. <el-col :span="8" v-if="detail.merchantCheckCode">经销商:{{ detail.merchantName }}</el-col>
  12. <el-col :span="8">对账月份:{{ detail.autoCheckTimeSupply }}</el-col>
  13. <el-col v-if="detail.merchantCheckCode" :span="8">商家对账编码:{{ detail.merchantCheckCode }}</el-col>
  14. <el-col v-if="detail.salesCheckCode" :span="8">销司对账编码:{{ detail.salesCheckCode }}</el-col>
  15. </el-row>
  16. <zj-table
  17. ref="tableEl"
  18. :is-drop="true"
  19. :columns="columns"
  20. :table-data="recordSelected"
  21. :table-attributes="{
  22. border: true
  23. }"
  24. />
  25. <el-row type="flex" style="margin: 20px 0">
  26. <el-col :span="2">备注: </el-col>
  27. <el-col
  28. ><el-input
  29. v-model="comment"
  30. type="textarea"
  31. :rows="2"
  32. placeholder="请输入备注"
  33. :maxlength="-1"
  34. :show-word-limit="false"
  35. :autosize="{ minRows: 2, maxRows: 4 }"
  36. />
  37. </el-col>
  38. </el-row>
  39. <span slot="footer">
  40. <el-button @click="onClose">取消</el-button>
  41. <el-button type="primary" @click="onSbumit">确定</el-button>
  42. </span>
  43. </el-dialog>
  44. </template>
  45. <script>
  46. import { ticketGoToReview } from '@/api/reconciliation'
  47. export default {
  48. props: {
  49. visible: {
  50. type: Boolean,
  51. default: false
  52. },
  53. recordSelected: {
  54. type: Array,
  55. default: () => []
  56. },
  57. detail: {
  58. type: Object,
  59. default: () => {
  60. return {}
  61. }
  62. }
  63. },
  64. data() {
  65. return {
  66. comment: ''
  67. }
  68. },
  69. computed: {
  70. columns() {
  71. return [
  72. {
  73. columnAttributes: {
  74. label: '订单类型',
  75. prop: 'orderType',
  76. width: 200
  77. },
  78. render: (h, { row }) => {
  79. const { orderType } = row
  80. const typeObj = {
  81. TOB: '商家机工程机类型',
  82. ALL: '所有类型,广州的订单统一 开单价',
  83. TOC: '佛山销售销售订单类型公司'
  84. }
  85. return <div>{typeObj[orderType]}</div>
  86. }
  87. },
  88. {
  89. columnAttributes: {
  90. label: '实际是否卸货',
  91. prop: 'isRealUnload',
  92. width: 200
  93. },
  94. render: (h, { row }) => {
  95. return (
  96. <el-select
  97. value={row.isRealUnload}
  98. onInput={e => (row.isRealUnload = e)}
  99. placeholder='请选择'
  100. clearable
  101. filterable
  102. size='mini'
  103. >
  104. {[
  105. { label: '是', value: 1 },
  106. { label: '否', value: 0 }
  107. ].map(k => {
  108. return <el-option key={k.value} label={k.label} value={k.value}></el-option>
  109. })}
  110. </el-select>
  111. )
  112. }
  113. },
  114. {
  115. columnAttributes: {
  116. label: '实际是否上楼',
  117. prop: 'isRealUpstairs',
  118. width: 200
  119. },
  120. render: (h, { row }) => {
  121. return (
  122. <el-select
  123. value={row.isRealUpstairs}
  124. onInput={e => (row.isRealUpstairs = e)}
  125. placeholder='请选择'
  126. clearable
  127. filterable
  128. size='mini'
  129. >
  130. {[
  131. { label: '是', value: 1 },
  132. { label: '否', value: 0 }
  133. ].map(k => {
  134. return <el-option key={k.value} label={k.label} value={k.value}></el-option>
  135. })}
  136. </el-select>
  137. )
  138. }
  139. },
  140. {
  141. columnAttributes: {
  142. label: '订单时间',
  143. prop: 'orderDate',
  144. width: 200
  145. }
  146. },
  147. {
  148. columnAttributes: {
  149. label: '运费结算系数',
  150. prop: 'coefficient',
  151. width: 200
  152. },
  153. render: (h, { row }) => {
  154. return (
  155. <el-input
  156. value={row.coefficient}
  157. onInput={e => (row.coefficient = e)}
  158. placeholder='可修改内容'
  159. size='mini'
  160. clearable
  161. ></el-input>
  162. )
  163. }
  164. },
  165. {
  166. columnAttributes: {
  167. label: '补贴结算系数',
  168. prop: 'subsidyCoefficient',
  169. width: 200
  170. },
  171. render: (h, { row }) => {
  172. return (
  173. <el-input
  174. value={row.subsidyCoefficient}
  175. onInput={e => (row.subsidyCoefficient = e)}
  176. placeholder='可修改内容'
  177. size='mini'
  178. clearable
  179. ></el-input>
  180. )
  181. }
  182. },
  183. {
  184. columnAttributes: {
  185. label: '账号对应物料数量',
  186. prop: 'materialNumber',
  187. width: 200
  188. },
  189. render: (h, { row }) => {
  190. return (
  191. <el-input
  192. value={row.materialNumber}
  193. onInput={e => (row.materialNumber = e)}
  194. placeholder='可修改内容'
  195. size='mini'
  196. clearable
  197. ></el-input>
  198. )
  199. }
  200. },
  201. {
  202. columnAttributes: {
  203. label: '物料开单价',
  204. prop: 'materialPrice',
  205. width: 200
  206. },
  207. render: (h, { row }) => {
  208. return (
  209. <el-input
  210. value={row.materialPrice}
  211. onInput={e => (row.materialPrice = e)}
  212. placeholder='可修改内容'
  213. size='mini'
  214. clearable
  215. ></el-input>
  216. )
  217. }
  218. },
  219. {
  220. columnAttributes: {
  221. label: '退货费用',
  222. prop: 'returnOrderCost',
  223. width: 200
  224. },
  225. render: (h, { row }) => {
  226. return (
  227. <el-input
  228. value={row.returnOrderCost}
  229. onInput={e => (row.returnOrderCost = e)}
  230. placeholder='可修改内容'
  231. size='mini'
  232. clearable
  233. ></el-input>
  234. )
  235. }
  236. },
  237. {
  238. columnAttributes: {
  239. label: '单价计算',
  240. prop: 'unitPrice',
  241. width: 200
  242. },
  243. render: (h, { row }) => {
  244. return (
  245. <el-input
  246. value={row.unitPrice}
  247. onInput={e => (row.unitPrice = e)}
  248. placeholder='可修改内容'
  249. size='mini'
  250. clearable
  251. ></el-input>
  252. )
  253. }
  254. },
  255. {
  256. columnAttributes: {
  257. label: '卸货上楼结算系数',
  258. prop: 'unloadUpstairsCoefficient',
  259. width: 200
  260. },
  261. render: (h, { row }) => {
  262. return (
  263. <el-input
  264. value={row.unloadUpstairsCoefficient}
  265. onInput={e => (row.unloadUpstairsCoefficient = e)}
  266. placeholder='可修改内容'
  267. size='mini'
  268. clearable
  269. ></el-input>
  270. )
  271. }
  272. }
  273. ]
  274. }
  275. },
  276. methods: {
  277. onClose() {
  278. this.comment = ''
  279. this.$emit('close')
  280. },
  281. onSbumit() {
  282. let ticketType = null
  283. let orderCode = null
  284. if (this.detail.merchantCheckCode) {
  285. ticketType = 'MERCHANT_CHECK'
  286. orderCode = this.detail.merchantCheckCode
  287. } else {
  288. ticketType = 'SALES_CHECK'
  289. orderCode = this.detail.salesCheckCode
  290. }
  291. ticketGoToReview({
  292. ticketType,
  293. orderCode,
  294. comment: this.comment,
  295. modifiedCostBillList: this.recordSelected
  296. }).then(res => {
  297. this.$message({
  298. type: 'success',
  299. message: '成功'
  300. })
  301. this.onClose()
  302. })
  303. }
  304. }
  305. }
  306. </script>
  307. <style lang="sass" scoped></style>