1
0

freight.html 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title></title>
  5. #parse("sys/header.html")
  6. </head>
  7. <body>
  8. <div id="rrapp" v-cloak>
  9. <div v-show="!showViewList">
  10. <Row :gutter="16">
  11. <div class="search-group">
  12. <i-col span="4">
  13. <i-button type="ghost" @click="reload"><i class="fa fa-refresh"></i>&nbsp;刷新</i-button>
  14. </i-col>
  15. </div>
  16. <div class="buttons-group">
  17. #if($shiro.hasPermission("freight:save"))
  18. <i-button type="info" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</i-button>
  19. #end
  20. #if($shiro.hasPermission("freight:update"))
  21. <i-button type="warning" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</i-button>
  22. #end
  23. #if($shiro.hasPermission("freight:delete"))
  24. <i-button type="error" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</i-button>
  25. #end
  26. </div>
  27. </Row>
  28. <table id="jqGrid"></table>
  29. <div id="jqGridPager"></div>
  30. </div>
  31. <Card v-show="!showList">
  32. <p slot="title">{{title}}</p>
  33. <i-form ref="formValidate" :model="freight" :rules="ruleValidate" :label-width="140">
  34. <Form-item label="商户" prop="merchSn">
  35. <i-select v-model="freight.merchSn" filterable placeholder="商户" @on-change="getStoresByMerch" label-in-value>
  36. <i-option v-for="merch in merchList" :value="merch.merchSn" :key="merch.merchSn">{{merch.merchName}}</i-option>
  37. </i-select>
  38. </Form-item>
  39. <Form-item label="门店" prop="storeId">
  40. <i-select v-model="freight.storeId" filterable placeholder="门店" label-in-value>
  41. <i-option v-for="store in storeList" :value="store.id" :key="store.id">{{store.storeName}}</i-option>
  42. </i-select>
  43. </Form-item>
  44. <Form-item label="模版名称" prop="name">
  45. <i-input v-model="freight.name" placeholder="模版名称"/>
  46. </Form-item>
  47. <Form-item label="模版类型" prop="templateType">
  48. <Radio-group v-model="freight.templateType">
  49. <Radio label="0">
  50. <span>买家承担运费</span>
  51. </Radio>
  52. <Radio label="1">
  53. <span>卖家包邮</span>
  54. </Radio>
  55. </Radio-group>
  56. </Form-item>
  57. <Form-item label="计价方式" prop="pricingManner">
  58. <Radio-group v-model="freight.pricingManner" @on-change="changeUnit">
  59. <Radio label="0">
  60. <span>按件数</span>
  61. </Radio>
  62. <Radio label="1">
  63. <span>按重量</span>
  64. </Radio>
  65. <Radio label="2">
  66. <span>按体积</span>
  67. </Radio>
  68. </Radio-group>
  69. </Form-item>
  70. <Form-item label="配送区域及运费" prop="freightItem">
  71. <table class="table table-bordered">
  72. <tr>
  73. <td style="text-align: center; width: 400px">可配送区域</td>
  74. <td id="first" style="text-align: center; width: 100px">首件(个)</td>
  75. <td style="text-align: center; width: 100px">运费</td>
  76. <td id="continue" style="text-align: center; width: 100px">续件(个)</td>
  77. <td style="text-align: center; width: 100px">续费</td>
  78. <!--<td style="text-align: center; width: 90px">操作</td>-->
  79. </tr>
  80. <tr v-for="(item,index) in freightItemEntityList" v-show="item.isDelete==0">
  81. <td>
  82. <Checkbox v-model="item.deliveryArea" disabled />所有地区默认配送
  83. </td>
  84. <td>
  85. <Input-number :min="0" :step="1" v-model="item.firstPiece" style="width: 260px;" />
  86. </td>
  87. <td>
  88. <Input-number :min="0" :step="1" v-model="item.freight" style="width: 260px;" />
  89. </td>
  90. <td>
  91. <Input-number :min="0" :step="1" v-model="item.continuePiece" style="width: 260px;" />
  92. </td>
  93. <td>
  94. <Input-number :min="0" :step="1" v-model="item.renew" style="width: 260px;" />
  95. </td>
  96. <!--<td align="center">
  97. <button v-if="index == 0" class="btn btn-primary btn-sm" type="button"
  98. @click="addItemRow">
  99. <i class="fa fa-plus"></i>
  100. </button>
  101. <button class="btn red btn-sm" type="button" @click="delItemRow(index)">
  102. <i class="fa fa-trash-o"></i>
  103. </button>
  104. </td>-->
  105. </tr>
  106. </table>
  107. </Form-item>
  108. <Form-item label="" prop="isDefault">
  109. <Checkbox v-model="freight.isDefault"/>设为新商品默认模板
  110. </Form-item>
  111. </i-form>
  112. <div style="padding-left: 20px">
  113. <i-button type="primary" @click="handleSubmit('formValidate')">提交</i-button>
  114. <i-button type="warning" @click="reload" style="margin-left: 8px"/>返回</i-button>
  115. </div>
  116. </Card>
  117. <Card v-show="!showCopyList">
  118. <p slot="title">{{title}}</p>
  119. <i-form>
  120. <Form-item label="运费id" prop="id">
  121. <i-input v-model="copyFreightDto.freightId" placeholder="运费id" disabled/>
  122. </Form-item>
  123. <Form-item>
  124. <Upload :show-upload-list="false" :on-success="uploadExcelSuccess" :on-error="uploadExcelError" :on-format-error="uploadExcelFormatError"
  125. :format="['xls','xlsx']"
  126. action="../uploadCommon/storeIdUpload">
  127. <i-button type="ghost" icon="ios-cloud-upload-outline">复制运费(批量上传门店id)</i-button>
  128. </Upload>
  129. &nbsp;&nbsp;&nbsp;<a href="../statics/file/store_id_export_yyyy_mm_dd_v1.0.0.xls">运费门店id模板下载</a>&nbsp;&nbsp;&nbsp;&nbsp;
  130. </Form-item>
  131. <Form-item label="上传成功的门店id" prop="storeList">
  132. <i-input v-model="copyFreightDto.storeList" placeholder="上传成功的门店id" disabled/>
  133. </Form-item>
  134. <Form-item>
  135. <i-button type="primary" @click="handleSubmitCopyFreight()">提交</i-button>
  136. <i-button type="warning" @click="reload" style="margin-left: 8px"/>返回</i-button>
  137. </Form-item>
  138. </i-form>
  139. </Card>
  140. </div>
  141. <!-- 选择类型 -->
  142. <div id="categoryLayer" style="display: none;padding:10px;">
  143. <ul id="categoryTree" class="ztree"></ul>
  144. </div>
  145. <script src="${rc.contextPath}/js/shop/freight.js?_${date.systemTime}"></script>
  146. </body>
  147. </html>