| 
					
				 | 
			
			
				@@ -0,0 +1,174 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+<template> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  <a-modal 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    centered 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    class="intelligentReplenishmentDetail-modal" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    :footer="null" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    :maskClosable="false" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    title="预测单详情" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    v-model="isShow" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @cancle="isShow=false" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    :width="800"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    <div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      <a-alert type="info" showIcon style="margin-bottom:15px"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <div slot="message">此预测单的各项参数信息如下</div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      </a-alert> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      <div class="module-cont"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <p class="title">产品范围</p> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <a-tag color="blue" style="margin-bottom: 10px;">自选产品</a-tag> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <s-table 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          class="sTable" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          ref="table" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          size="small" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          :rowKey="(record) => record.id" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          :columns="columns" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          :data="loadData" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          :scroll="{ y: 400 }" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          bordered> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        </s-table> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      <div class="module-cont"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <p class="title">销售保障法</p> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <p class="explain">保障倍数:<span>1.5</span></p> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      <div class="module-cont"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <p class="title">趋势平均法</p> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <p class="explain">服务水平:<span>90%</span></p> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      <div class="spin-cont"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        按照以上参数设置,系统正在计算中,请耐心等待... 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <a-spin style="margin-left: 15px;" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      <div class="btn-cont"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <a-button type="primary" id="intelligentReplenishmentDetail-save" @click="handleDownload">结果下载</a-button> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <a-button id="intelligentReplenishmentDetail-back" @click="isShow = false">关闭</a-button> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  </a-modal> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+</template> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+<script> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import { STable } from '@/components' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+// import { custTypeSave } from '@/api/custType' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  name: 'IntelligentReplenishmentDetailModal', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  components: { STable }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  props: { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    openModal: { //  弹框显示状态 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      type: Boolean, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      default: false 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    itemId: { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      type: [Number, String], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      default: '' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  data () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    return { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      isShow: this.openModal, //  是否打开弹框 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      detailsData: null, //  详情数据 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      columns: [ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        { title: '序号', dataIndex: 'no', width: 80, align: 'center' }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        { title: '类型', dataIndex: 'createDate', align: 'center', customRender: function (text) { return text || '--' } }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        { title: '类型名称', dataIndex: 'name', align: 'center', customRender: function (text) { return text || '--' } } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      ], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      // 加载数据方法 必须为 Promise 对象 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      loadData: parameter => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        // return custTypeList(Object.assign(parameter, this.queryParam)).then(res => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //   const data = res.data 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //   const no = (data.pageNo - 1) * data.pageSize 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //   for (var i = 0; i < data.list.length; i++) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //     data.list[i].no = no + i + 1 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //   } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //   return data 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        // }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        return new Promise(function (resolve, reject) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          const data = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            pageNo: 1, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            pageSize: 10, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            list: [ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              { id: '1', state: 1, purchaseNo: 'jgqp11111111111', creatDate: '产品1', custName: 'jgqp111123545', totalP: '箭冠品牌', totalNums: '产品分类1', totalPrice: '5', payType: '122' }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              { id: '2', state: 2, purchaseNo: 'jgqp11111111111', creatDate: '产品1', custName: 'jgqp111123545', totalP: '箭冠品牌', totalNums: '产品分类1', totalPrice: '5', payType: '122' }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              { id: '3', state: 3, purchaseNo: 'jgqp11111111111', creatDate: '产品1', custName: 'jgqp111123545', totalP: '箭冠品牌', totalNums: '产品分类1', totalPrice: '5', payType: '122' }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              { id: '4', state: 4, purchaseNo: 'jgqp11111111111', creatDate: '产品1', custName: 'jgqp111123545', totalP: '箭冠品牌', totalNums: '产品分类1', totalPrice: '5', payType: '122' }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+              { id: '5', state: 5, purchaseNo: 'jgqp11111111111', creatDate: '产品1', custName: 'jgqp111123545', totalP: '箭冠品牌', totalNums: '产品分类1', totalPrice: '5', payType: '122' } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            ], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            count: 10 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          resolve(data) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  methods: { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    //  结果下载 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    handleDownload () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      const params = this.queryParam 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.downloadLoading = true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      // stockExport(params).then(res => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      //   this.downloadLoading = false 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      //   this.download(res) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      // }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    download (data) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      if (!data) { return } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      const url = window.URL.createObjectURL(new Blob([data])) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      const link = document.createElement('a') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      link.style.display = 'none' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      link.href = url 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      const a = moment().format('YYYYMMDDHHmmss') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      const fname = '智能补货' + a 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      link.setAttribute('download', fname + '.xlsx') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      document.body.appendChild(link) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      link.click() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  watch: { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    //  父页面传过来的弹框状态 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    openModal (newValue, oldValue) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.isShow = newValue 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    //  重定义的弹框状态 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    isShow (newValue, oldValue) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      if (!newValue) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        this.$emit('close') 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    itemId (newValue, oldValue) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      if (this.isShow && newValue) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+</script> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+<style lang="less"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  .intelligentReplenishmentDetail-modal{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    .module-cont{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      border: 1px dashed #e8e8e8; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      border-radius: 12px; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      position: relative; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      margin: 30px 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      padding: 20px 15px 15px; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      .title{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        position: absolute; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        left: 50px; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        top: -12px; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        padding: 0 10px; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        background-color: #fff; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      .explain{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        margin-bottom: 5px; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        font-weight: bold; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    .spin-cont{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      text-align: center; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    .btn-cont { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      text-align: center; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      font-weight: bold; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      margin: 35px 0 10px; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+</style> 
			 |