retail_detail.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334
  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="progress-container">
  8. <el-progress :text-inside="true" :stroke-width="26" :percentage="detailData.thjd ? (detailData.thjd * 1000 / 10) : 0"></el-progress>
  9. </div>
  10. <div class="main-title">
  11. <div class="title">订单信息</div>
  12. </div>
  13. <div class="diy-table-1">
  14. <el-row>
  15. <el-col :span="8" class="item">
  16. <div class="label">订单号</div>
  17. <div class="value">{{detailData.id}}</div>
  18. </el-col>
  19. <el-col :span="8" class="item">
  20. <div class="label">订单日期</div>
  21. <div class="value">{{detailData.theTime}}</div>
  22. </el-col>
  23. <el-col :span="8" class="item">
  24. <div class="label">单据状态</div>
  25. <div class="value">{{detailData.examineStatus | statusFilter}}</div>
  26. </el-col>
  27. <el-col :span="16" class="item">
  28. <div class="label">备注</div>
  29. <div class="value">{{detailData.remark}}</div>
  30. </el-col>
  31. <el-col :span="8" class="item">
  32. <div class="label">业务员</div>
  33. <div class="value">{{detailData.serviceName}}</div>
  34. </el-col>
  35. <el-col :span="8" class="item">
  36. <div class="label">制单人</div>
  37. <div class="value">{{detailData.createName}}</div>
  38. </el-col>
  39. <el-col :span="8" class="item">
  40. <div class="label">制单日期</div>
  41. <div class="value">{{detailData.createTime}}</div>
  42. </el-col>
  43. <el-col :span="8" class="item">
  44. <div class="label">审核人</div>
  45. <div class="value">{{detailData.examineName}}</div>
  46. </el-col>
  47. <el-col :span="8" class="item">
  48. <div class="label">审核日期</div>
  49. <div class="value">{{detailData.examineTime}}</div>
  50. </el-col>
  51. <el-col :span="8" class="item">
  52. <div class="label">关闭人</div>
  53. <div class="value">{{detailData.closeName}}</div>
  54. </el-col>
  55. <el-col :span="8" class="item">
  56. <div class="label">关闭日期</div>
  57. <div class="value">{{detailData.closeTime}}</div>
  58. </el-col>
  59. </el-row>
  60. </div>
  61. <div class="main-title">
  62. <div class="title">货品信息</div>
  63. </div>
  64. <div class="table" style="margin-top: 20px">
  65. <el-table :data="detailData.retailOrderItemList" element-loading-text="Loading" border fit highlight-current-row stripe max-height="400">
  66. <el-table-column align="center" label="序号" type="index" width="50"></el-table-column>
  67. <el-table-column align="center" label="销售类型" prop="saleTypeName" min-width="100" show-overflow-tooltip></el-table-column>
  68. <el-table-column align="center" label="产品编码" prop="materialCode" min-width="160" show-overflow-tooltip></el-table-column>
  69. <el-table-column align="center" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
  70. <el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
  71. <el-table-column align="center" label="单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
  72. <el-table-column align="center" label="单价" prop="price" min-width="100" show-overflow-tooltip></el-table-column>
  73. <el-table-column align="center" label="数量" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
  74. <el-table-column align="center" label="订单金额" prop="totalAmount" min-width="100" show-overflow-tooltip></el-table-column>
  75. <el-table-column align="center" label="返利类型" prop="customerWalletName2" min-width="100" show-overflow-tooltip>
  76. <template slot-scope="scope">
  77. <el-tag type="success" size="small" v-if="scope.row.customerWalletName2">
  78. {{scope.row.customerWalletName2}}
  79. </el-tag>
  80. </template>
  81. </el-table-column> <el-table-column align="center" label="返利金额" prop="rebateAmount" min-width="100" show-overflow-tooltip></el-table-column>
  82. <el-table-column align="center" label="格力折扣" prop="discAmount" min-width="100" show-overflow-tooltip></el-table-column>
  83. <el-table-column align="center" label="现金钱包" prop="customerWalletName" min-width="100" show-overflow-tooltip></el-table-column>
  84. <el-table-column align="center" label="实付金额" prop="payAmount" min-width="100" show-overflow-tooltip></el-table-column>
  85. <el-table-column align="center" label="是否直调" prop="isDirectTransfer" min-width="100" show-overflow-tooltip>
  86. <template slot-scope="scope">
  87. {{scope.row.isDirectTransfer ? '是':'否'}}
  88. </template>
  89. </el-table-column>
  90. <el-table-column align="center" label="直调数量" prop="directTransferQty" min-width="100" show-overflow-tooltip></el-table-column>
  91. <el-table-column align="center" label="原订单数量" prop="oldQty" min-width="100" show-overflow-tooltip></el-table-column>
  92. <el-table-column align="center" label="备注" prop="remark" min-width="160" show-overflow-tooltip></el-table-column>
  93. <el-table-column align="center" label="税率" prop="tax" min-width="100" show-overflow-tooltip></el-table-column>
  94. </el-table>
  95. </div>
  96. <div class="page-footer">
  97. <div class="footer" :class="classObj">
  98. <!-- <el-button type="primary" @click="openDeliverDialog" :disabled="detailData.examineStatus !== 'OK'">直调发货</el-button> -->
  99. <el-button type="primary" @click="handleFinish" :disabled="detailData.examineStatus !== 'OK'">直调完成</el-button>
  100. <!-- <el-button @click="goBack">关 闭</el-button> -->
  101. </div>
  102. </div>
  103. <div v-if="isExamine">
  104. <div class="main-title">
  105. <div class="title">审批记录</div>
  106. </div>
  107. <div class="diy-table-1">
  108. <el-row :gutter="0">
  109. <el-col :span="12" class="item">
  110. <div class="label">审批人</div>
  111. <div class="value">{{detailData.examineName}}</div>
  112. </el-col>
  113. <el-col :span="12" class="item">
  114. <div class="label">审批结果</div>
  115. <div class="value">{{detailData.examineStatus | statusFilter}}</div>
  116. </el-col>
  117. <el-col :span="24" class="item">
  118. <div class="label">审批说明</div>
  119. <div class="value">{{detailData.examineRemark}}</div>
  120. </el-col>
  121. </el-row>
  122. </div>
  123. </div>
  124. <!--
  125. <div class="page-footer">
  126. <div class="footer" :class="classObj">
  127. <el-button type="primary" @click="openDeliverDialog">直调发货</el-button>
  128. <el-button @click="goBack">关 闭</el-button>
  129. </div>
  130. </div> -->
  131. <el-dialog title="直调发货" :visible.sync="isShowDeliverDialog" width="80%">
  132. <el-form ref="deliverForm" :model="deliverForm" label-width="70px" size="small" label-position="left">
  133. <el-row :gutter="20">
  134. <el-col :xs="24" :sm="8" :lg="8">
  135. <el-form-item label="工程订单" prop="orderNum">
  136. <el-input v-model="deliverForm.orderNum" placeholder="请输入工程订单"></el-input>
  137. </el-form-item>
  138. </el-col>
  139. <el-col :xs="24" :sm="8" :lg="8" style="height: 51px;">
  140. <el-form-item label="发货日期" prop="date">
  141. <el-date-picker
  142. v-model="deliverForm.date"
  143. type="date"
  144. value-format="yyyy-MM-dd"
  145. style="width: 100%;"
  146. placeholder="选择日期">
  147. </el-date-picker>
  148. </el-form-item>
  149. </el-col>
  150. <el-col :xs="24" :sm="8" :lg="8">
  151. <el-form-item label="发货仓库" prop="warehouse">
  152. <el-select v-model="deliverForm.warehouse" placeholder="请选择发货仓库">
  153. <el-option
  154. v-for="item in warehouseList"
  155. :key="item.value"
  156. :label="item.label"
  157. :value="item.value">
  158. </el-option>
  159. </el-select>
  160. </el-form-item>
  161. </el-col>
  162. </el-row>
  163. </el-form>
  164. <div class="table" style="margin-top: 20px">
  165. <el-table :data="detailData.retailOrderItemList" element-loading-text="Loading" border fit highlight-current-row stripe max-height="400">
  166. <el-table-column align="center" label="序号" type="index" width="50"></el-table-column>
  167. <el-table-column align="center" label="销售类型" prop="saleTypeName" min-width="160" show-overflow-tooltip></el-table-column>
  168. <el-table-column align="center" label="产品编码" prop="materialCode" min-width="160" show-overflow-tooltip></el-table-column>
  169. <el-table-column align="center" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
  170. <el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
  171. <el-table-column align="center" label="单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
  172. <el-table-column align="center" label="单价" prop="price" min-width="100" show-overflow-tooltip></el-table-column>
  173. <el-table-column align="center" label="数量" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
  174. <el-table-column align="center" label="订单金额" prop="totalAmount" min-width="100" show-overflow-tooltip></el-table-column>
  175. <el-table-column align="center" label="返利类型" prop="walletRebateName" min-width="100" show-overflow-tooltip></el-table-column>
  176. <el-table-column align="center" label="返利金额" prop="rebateAmount" min-width="100" show-overflow-tooltip></el-table-column>
  177. <el-table-column align="center" label="格力折扣" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
  178. <el-table-column align="center" label="现金钱包" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
  179. <el-table-column align="center" label="实付金额" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
  180. <el-table-column align="center" label="是否直调" prop="isDirectTransfer" min-width="100" show-overflow-tooltip>
  181. <template slot-scope="scope">
  182. {{scope.row.isDirectTransfer ? '是':'否'}}
  183. </template>
  184. </el-table-column>
  185. <el-table-column align="center" label="直调数量" prop="directTransferQty" min-width="100" show-overflow-tooltip></el-table-column>
  186. <el-table-column align="center" label="原订单数量" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
  187. <el-table-column align="center" label="备注" prop="remark" min-width="160" show-overflow-tooltip></el-table-column>
  188. <el-table-column align="center" label="税率" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
  189. </el-table>
  190. </div>
  191. <span slot="footer" class="dialog-footer">
  192. <el-button @click="closeDeliverDialog">取 消</el-button>
  193. <el-button type="primary" @click="submitDeliverForm">确 定</el-button>
  194. </span>
  195. </el-dialog>
  196. </div>
  197. </template>
  198. <script>
  199. import { getDetail } from "@/api/supply/policy";
  200. export default {
  201. name: 'RetailDetail',
  202. componentName: 'RetailDetail',
  203. props: ['listItem'],
  204. filters: {
  205. statusFilter(val) {
  206. const statusList = [
  207. { label: '已保存', value: 'SAVE' },
  208. { label: '待审核', value: 'WAIT' },
  209. { label: '审核通过', value: 'OK' },
  210. { label: '审核驳回', value: 'FAIL' },
  211. ];
  212. let obj = statusList.find(o => o.value == val);
  213. return obj ? obj.label : ''
  214. }
  215. },
  216. data() {
  217. return {
  218. detailData: {},
  219. isShowDeliverDialog: false,
  220. deliverForm: {
  221. orderNum: '',
  222. date: '',
  223. },
  224. warehouseList: [],
  225. }
  226. },
  227. computed: {
  228. sidebar() {
  229. return this.$store.state.app.sidebar
  230. },
  231. classObj() {
  232. return {
  233. hideSidebar: !this.sidebar.opened,
  234. openSidebar: this.sidebar.opened
  235. }
  236. },
  237. isExamine() {
  238. return this.detailData.examineStatus === 'OK' || this.detailData.examineStatus === 'FAIL'
  239. },
  240. progress() {
  241. if(this.detailData.totalQty == 0) return 0;
  242. return (this.detailData.takeQty * 100) / (this.detailData.totalQty * 100);
  243. }
  244. },
  245. created() {
  246. this.getDetail();
  247. },
  248. methods: {
  249. // 返回列表
  250. goBack() {
  251. this.$emit('backListFormDetail');
  252. },
  253. // 获取详情
  254. getDetail() {
  255. getDetail({id: this.listItem.id}).then(res => {
  256. this.detailData = res.data;
  257. })
  258. },
  259. // 直调完成
  260. handleFinish() {
  261. this.$confirm('此操作将直调完成, 是否继续?', '提示', {
  262. confirmButtonText: '确定',
  263. cancelButtonText: '取消',
  264. type: 'warning'
  265. }).then(() => {
  266. finishData({
  267. id: this.listItem.id
  268. }).then(res => {
  269. this.$successMsg();
  270. this.getDetail();
  271. })
  272. }).catch(() => {});
  273. },
  274. // 打开 直调发货
  275. openDeliverDialog() {
  276. this.isShowDeliverDialog = true;
  277. },
  278. // 关闭 直调发货
  279. closeDeliverDialog() {
  280. this.isShowDeliverDialog = false;
  281. },
  282. // 提交 直调发货
  283. submitDeliverForm() {
  284. },
  285. }
  286. }
  287. </script>
  288. <style scoped lang="scss">
  289. .detail-container {
  290. width: 100%;
  291. height: 100%;
  292. }
  293. .main-title {
  294. display: flex;
  295. justify-content: space-between;
  296. align-items: center;
  297. margin-top: 20px;
  298. height: 60px;
  299. border-bottom: 1px solid #DCDFE6;
  300. margin-bottom: 20px;
  301. .title {
  302. font-size: 16px;
  303. font-weight: 600;
  304. padding-left: 10px;
  305. }
  306. }
  307. .progress-container {
  308. display: flex;
  309. .el-progress {
  310. width: 500px;
  311. }
  312. }
  313. </style>