direct_examine.vue 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283
  1. <template>
  2. <div class="detail-container">
  3. <el-page-header @back="goBack" content="审批"></el-page-header>
  4. <div class="main-title">
  5. <div class="title">基本信息</div>
  6. </div>
  7. <div class="diy-table-1">
  8. <el-row>
  9. <el-col :span="8" class="item">
  10. <div class="label">直接调拨单号</div>
  11. <div class="value">{{detailData.id}}</div>
  12. </el-col>
  13. <el-col :span="8" class="item">
  14. <div class="label">申请日期</div>
  15. <div class="value">{{detailData.orderTime}}</div>
  16. </el-col>
  17. <el-col :span="8" class="item">
  18. <div class="label">单据状态</div>
  19. <div class="value">{{detailData.examineStatus | statusFilter}}</div>
  20. </el-col>
  21. <el-col :span="8" class="item">
  22. <div class="label">经销商编号</div>
  23. <div class="value">{{detailData.customerNumber}}</div>
  24. </el-col>
  25. <el-col :span="16" class="item">
  26. <div class="label">经销商名称</div>
  27. <div class="value">{{detailData.customerName}}</div>
  28. </el-col>
  29. <el-col :span="8" class="item">
  30. <div class="label">销售订单号</div>
  31. <div class="value">{{detailData.orderNo}}</div>
  32. </el-col>
  33. <el-col :span="8" class="item">
  34. <div class="label">销售单类型</div>
  35. <div class="value">{{detailData.orderType | orderTypeFilter}}</div>
  36. </el-col>
  37. <el-col :span="8" class="item">
  38. <div class="label">调拨类型</div>
  39. <div class="value">{{detailData.type | typeFilter}}</div>
  40. </el-col>
  41. <el-col :span="8" class="item">
  42. <div class="label">调出库存组织</div>
  43. <div class="value">{{detailData.requsitionOut}}</div>
  44. </el-col>
  45. <el-col :span="8" class="item">
  46. <div class="label">调入库存组织</div>
  47. <div class="value">{{detailData.requsitionIn}}</div>
  48. </el-col>
  49. <el-col :span="8" class="item">
  50. <div class="label">调拨方向</div>
  51. <div class="value">{{detailData.direction}}</div>
  52. </el-col>
  53. <el-col :span="24" class="item">
  54. <div class="label">备注</div>
  55. <div class="value">{{detailData.remark}}</div>
  56. </el-col>
  57. </el-row>
  58. </div>
  59. <div class="main-title">
  60. <div class="title">货品信息</div>
  61. </div>
  62. <div class="table" style="margin-top: 20px">
  63. <el-table :data="detailData.results" element-loading-text="Loading" border fit highlight-current-row stripe max-height="400">
  64. <el-table-column align="center" label="序号" type="index" width="50"></el-table-column>
  65. <el-table-column align="center" label="销售类型" prop="saleTypeName" min-width="100" show-overflow-tooltip></el-table-column>
  66. <el-table-column align="center" label="产品编码" prop="materialCode" min-width="120" show-overflow-tooltip></el-table-column>
  67. <el-table-column align="center" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
  68. <el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
  69. <el-table-column align="center" label="单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
  70. <el-table-column align="center" label="调拨数量" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
  71. <el-table-column align="center" label="总成本" prop="totalAmount" min-width="100" show-overflow-tooltip></el-table-column>
  72. <el-table-column align="center" label="调出仓库" min-width="100" show-overflow-tooltip>
  73. <template slot-scope="">{{detailData.correspondName}}</template>
  74. </el-table-column>
  75. <el-table-column align="center" label="调出仓位" min-width="100" show-overflow-tooltip>
  76. <template slot-scope="">{{detailData.stockName}}</template>
  77. </el-table-column>
  78. <el-table-column align="center" label="调入仓库" min-width="100" show-overflow-tooltip>
  79. <template slot-scope="">{{detailData.inCorrespondName}}</template>
  80. </el-table-column>
  81. <el-table-column align="center" label="调入仓位" min-width="100" show-overflow-tooltip>
  82. <template slot-scope="">{{detailData.inStockName}}</template>
  83. </el-table-column>
  84. <el-table-column align="center" label="调出库存状态" min-width="110" show-overflow-tooltip>
  85. <template slot-scope="">{{detailData.stockStatusType}}</template>
  86. </el-table-column>
  87. <el-table-column align="center" label="调入库存状态" min-width="110" show-overflow-tooltip>
  88. <template slot-scope="">{{detailData.inStockStatusType}}</template>
  89. </el-table-column>
  90. <el-table-column align="center" label="调出库主" min-width="100" show-overflow-tooltip>
  91. <template slot-scope="">{{detailData.requsitionOut}}</template>
  92. </el-table-column>
  93. <el-table-column align="center" label="调入库主" min-width="100" show-overflow-tooltip>
  94. <template slot-scope="">{{detailData.requsitionIn}}</template>
  95. </el-table-column>
  96. <el-table-column align="center" label="备注" prop="remark" min-width="160" show-overflow-tooltip></el-table-column>
  97. </el-table>
  98. </div>
  99. <div class="main-title">
  100. <div class="title">审批信息</div>
  101. </div>
  102. <div class="diy-table-1">
  103. <el-row :gutter="0">
  104. <el-col :span="12" class="item">
  105. <div class="label">审批人</div>
  106. <div class="value">{{userName}}</div>
  107. </el-col>
  108. <el-col :span="12" class="item">
  109. <div class="label">审批日期</div>
  110. <div class="value">{{getDate()}}</div>
  111. </el-col>
  112. <el-col :span="24" class="item">
  113. <div class="label">审批说明</div>
  114. <div class="value"><el-input v-model="examineForm.remark" placeholder="请输入内容"></el-input></div>
  115. </el-col>
  116. </el-row>
  117. </div>
  118. <div class="page-footer">
  119. <div class="footer" :class="classObj">
  120. <el-button type="primary" @click="clickSubmitForm('OK')">审批通过</el-button>
  121. <el-button type="warning" @click="clickSubmitForm('SAVE')">审批驳回</el-button>
  122. <el-popconfirm title="确定关闭吗?" @onConfirm="goBack" style="margin-left: 10px;">
  123. <el-button slot="reference">关 闭</el-button>
  124. </el-popconfirm>
  125. </div>
  126. </div>
  127. </div>
  128. </template>
  129. <script>
  130. import { getDetail, examineData } from "@/api/supply/direct";
  131. export default {
  132. name: 'DirectExamine',
  133. componentName: 'DirectExamine',
  134. props: ['listItem'],
  135. filters: {
  136. statusFilter(val) {
  137. const MAP = [
  138. { label: '已保存', value: 'SAVE' },
  139. { label: '待审核', value: 'WAIT' },
  140. { label: '审核通过', value: 'OK' },
  141. { label: '审核驳回', value: 'FAIL' },
  142. { label: '已关闭', value: 'CLOSE' },
  143. ];
  144. let obj = MAP.find(o => o.value == val);
  145. return obj ? obj.label : ''
  146. },
  147. orderTypeFilter(val) {
  148. const MAP = [
  149. { label: '商用工程订单', value: 'TRADE' },
  150. { label: '家用工程订单', value: 'HOME' },
  151. { label: '零售单', value: 'RETAIL' },
  152. { label: '销售政策单', value: 'RETAIL_POLICY' },
  153. ];
  154. let obj = MAP.find(o => o.value == val);
  155. return obj ? obj.label : ''
  156. },
  157. typeFilter(val) {
  158. const MAP = {
  159. 1: '组织内调拨',
  160. }
  161. return MAP[val];
  162. }
  163. },
  164. data() {
  165. return {
  166. detailData: {},
  167. userName: JSON.parse(localStorage.getItem("supply_user")).nickName,
  168. formLoading: false,
  169. examineForm: {
  170. remark: '',
  171. },
  172. }
  173. },
  174. computed: {
  175. sidebar() {
  176. return this.$store.state.app.sidebar
  177. },
  178. classObj() {
  179. return {
  180. hideSidebar: !this.sidebar.opened,
  181. openSidebar: this.sidebar.opened
  182. }
  183. },
  184. },
  185. created() {
  186. this.getDetail();
  187. },
  188. methods: {
  189. getDate() {
  190. var date = new Date();
  191. var seperator1 = "-";
  192. var year = date.getFullYear();
  193. var month = date.getMonth() + 1;
  194. var strDate = date.getDate();
  195. if (month >= 1 && month <= 9) {
  196. month = "0" + month;
  197. }
  198. if (strDate >= 0 && strDate <= 9) {
  199. strDate = "0" + strDate;
  200. }
  201. var currentdate = year + seperator1 + month + seperator1 + strDate;
  202. return currentdate;
  203. },
  204. // 返回列表
  205. goBack() {
  206. this.$emit('backListFormDetail');
  207. },
  208. // 获取详情
  209. getDetail() {
  210. getDetail({id: this.listItem.id}).then(res => {
  211. this.detailData = res.data;
  212. })
  213. },
  214. // 提交审批
  215. clickSubmitForm(val) {
  216. this.$confirm('此操作将审批订单, 是否继续?', '提示', {
  217. confirmButtonText: '确定',
  218. cancelButtonText: '取消',
  219. type: 'warning'
  220. }).then(() => {
  221. let params = {
  222. id: this.detailData.id,
  223. examineStatus: val,
  224. approvalRemark: this.examineForm.remark
  225. };
  226. examineData(params).then(res => {
  227. this.$successMsg();
  228. this.goBack();
  229. this.$parent.getList();
  230. })
  231. }).catch(() => {});
  232. },
  233. }
  234. }
  235. </script>
  236. <style scoped lang="scss">
  237. .detail-container {
  238. width: 100%;
  239. height: 100%;
  240. }
  241. .main-title {
  242. display: flex;
  243. justify-content: space-between;
  244. align-items: center;
  245. margin-top: 20px;
  246. height: 60px;
  247. border-bottom: 1px solid #DCDFE6;
  248. margin-bottom: 20px;
  249. .title {
  250. font-size: 16px;
  251. font-weight: 600;
  252. padding-left: 10px;
  253. }
  254. }
  255. ::v-deep input::-webkit-outer-spin-button,
  256. ::v-deep input::-webkit-inner-spin-button {
  257. -webkit-appearance: none;
  258. }
  259. ::v-deep input[type='number'] {
  260. -moz-appearance: textfield;
  261. }
  262. </style>