_three.blade.php 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340
  1. <div class="row">
  2. <div class="col-6" id="parent">
  3. <div class="card" id="storage-card">
  4. <div class="card-header bg-light-info">
  5. <span class="pull-left font-weight-bold cursor-pointer" @click="show('storage')"><span class="fa fa-cubes"></span>&nbsp;仓储</span>
  6. </div>
  7. <div class="card-body" id="storage">
  8. <table class="table table-sm">
  9. <tr>
  10. <th>名称</th>
  11. <th>计费类型</th>
  12. <th>用仓类型</th>
  13. <th>起租面积</th>
  14. <th>单价</th>
  15. <th>单位</th>
  16. <th>减免类型</th>
  17. <th>减免值</th>
  18. <th></th>
  19. </tr>
  20. <tr v-for="(item,i) in selectedModel.storage" style="cursor: pointer" @dblclick="editStorage(i)">
  21. <td>@{{ item.name }}</td>
  22. <td>@{{ item.counting_type }}</td>
  23. <td>@{{ item.using_type }}</td>
  24. <td>@{{ item.minimum_area }}</td>
  25. <td>@{{ item.price }}</td>
  26. <td>@{{ item.discount_type }}</td>
  27. <td>@{{ item.discount_value }}</td>
  28. <td>@{{ poolMapping.units ? poolMapping.units[item.unit_id] : '' }}</td>
  29. <td class="cursor-pointer" @click.stop="delStorage(item,i)"><span class="font-weight-bold text-danger">&times;</span></td>
  30. </tr>
  31. </table>
  32. </div>
  33. </div>
  34. <div class="card" id="operation-card">
  35. <div class="card-header bg-light-info">
  36. <span class="pull-left font-weight-bold cursor-pointer" @click="show('operation')"><span class="fa fa-suitcase"></span>&nbsp;作业</span>
  37. </div>
  38. <div class="card-body" id="operation">
  39. <div class="container-fluid">
  40. <div class="row font-weight-bold">
  41. <div class="cursor-pointer" @click="show('operation-list-in')"><span class="fa" :class="upList['operation-list-in'] ? 'fa-caret-right' : 'fa-caret-down'"></span> 入库</div>
  42. </div>
  43. <div id="operation-list-in">
  44. <div class="container-fluid" v-for="(operation,i) in selectedModel.operation"
  45. @dblclick="editOperation(i)" style="cursor: pointer" v-if="operation.operation_type === '入库'">
  46. <div class="row">
  47. <div class="col-9 offset-1">
  48. <label class="font-weight-bold cursor-pointer" @click.stop="show('operation-item-'+i)">
  49. <span class="fa" :class="upList['operation-item-'+i] ? 'fa-caret-right' : 'fa-caret-down'"></span>
  50. &nbsp;@{{ operation.strategy }}:
  51. </label>
  52. <label>@{{ operation.name }}</label>
  53. <label v-if="operation.remark" class="text-secondary">&nbsp;&nbsp;(@{{ operation.remark }})</label>
  54. </div>
  55. <div class="col-1">
  56. <span class="cursor-pointer text-danger font-weight-bold"
  57. v-if="operation.strategy == '特征'" @click.stop="delOperation(operation,i)">&times;</span>
  58. </div>
  59. </div>
  60. <div class="row offset-1 small mt-0" style="background-color: RGB(248,248,248)" v-if="operation.strategy === '特征'">
  61. @{{ operation.featureFormat }}
  62. </div>
  63. <div class="container-fluid offset-2" :id="'operation-item-'+i">
  64. <div v-for="(item,j) in operation.items" class="container-fluid">
  65. <div class="row">
  66. <div class="col-10">
  67. <label>@{{ item.strategy }}</label>:
  68. <b>@{{ item.amount }}</b>&nbsp;@{{ poolMapping.units ? poolMapping.units[item.unit_id] : '' }} / <b>@{{ item.unit_price }}</b>元
  69. </div>
  70. <div class="col-1">
  71. <span class="cursor-pointer text-danger font-weight-bold"
  72. v-if="item.strategy == '特征'" @click.stop="deleteOperationItem(item,j,i)">&times;</span>
  73. </div>
  74. </div>
  75. <div class="row small mt-0 ml-1" style="background-color: RGB(248,248,248)" v-if="item.strategy == '特征'">
  76. @{{ item.featureFormat }}
  77. </div>
  78. </div>
  79. </div>
  80. </div>
  81. </div>
  82. <div class="row font-weight-bold">
  83. <div class="cursor-pointer" @click="show('operation-list-out')"><span class="fa" :class="upList['operation-list-out'] ? 'fa-caret-right' : 'fa-caret-down'"></span> 出库</div>
  84. </div>
  85. <div id="operation-list-out">
  86. <div class="container-fluid" v-for="(operation,i) in selectedModel.operation"
  87. @dblclick="editOperation(i)" style="cursor: pointer" v-if="operation.operation_type === '出库'">
  88. <div class="row">
  89. <div class="col-9 offset-1">
  90. <label class="font-weight-bold cursor-pointer" @click.stop="show('operation-item-'+i)">
  91. <span class="fa" :class="upList['operation-item-'+i] ? 'fa-caret-right' : 'fa-caret-down'"></span>
  92. &nbsp;@{{ operation.strategy }}:
  93. </label>
  94. <label>@{{ operation.name }}</label>
  95. <label v-if="operation.remark" class="text-secondary">&nbsp;&nbsp;(@{{ operation.remark }})</label>
  96. </div>
  97. <div class="col-1">
  98. <span class="cursor-pointer text-danger font-weight-bold"
  99. v-if="operation.strategy == '特征'" @click.stop="delOperation(operation,i)">&times;</span>
  100. </div>
  101. </div>
  102. <div class="row offset-1 small mt-0" style="background-color: RGB(248,248,248)" v-if="operation.strategy === '特征'">
  103. @{{ operation.featureFormat }}
  104. </div>
  105. <div class="container-fluid offset-2" :id="'operation-item-'+i">
  106. <div v-for="(item,j) in operation.items" class="container-fluid">
  107. <div class="row">
  108. <div class="col-10">
  109. <label>@{{ item.strategy }}</label>:
  110. <b>@{{ item.amount }}</b>&nbsp;@{{ poolMapping.units ? poolMapping.units[item.unit_id] : '' }} / <b>@{{ item.unit_price }}</b>元
  111. </div>
  112. <div class="col-1">
  113. <span class="cursor-pointer text-danger font-weight-bold"
  114. v-if="item.strategy == '特征'" @click.stop="deleteOperationItem(item,j,i)">&times;</span>
  115. </div>
  116. </div>
  117. <div class="row small mt-0 ml-1" style="background-color: RGB(248,248,248)" v-if="item.strategy == '特征'">
  118. @{{ item.featureFormat }}
  119. </div>
  120. </div>
  121. </div>
  122. </div>
  123. </div>
  124. </div>
  125. </div>
  126. </div>
  127. <div class="card" id="express-card">
  128. <div class="card-header bg-light-info">
  129. <span class="pull-left font-weight-bold cursor-pointer" @click="show('express')"><span class="fa fa-cube"></span>&nbsp;快递</span>
  130. </div>
  131. <div class="card-body" id="express">
  132. <table class="table table-sm">
  133. <tr>
  134. <th>承运商</th>
  135. <th>名称</th>
  136. <th>首重值(KG)</th>
  137. <th>续重值(KG)</th>
  138. <th>详情</th>
  139. <th></th>
  140. </tr>
  141. <tbody v-for="(express,i) in selectedModel.express" @click="editExpress()">
  142. <tr>
  143. <td>
  144. <div class="text-overflow-warp-100 small">
  145. <label v-for="(logistic,j) in express.logistics" class="m-0">@{{ poolMapping.logistics ? poolMapping.logistics[logistic] : '' }}</label>
  146. </div>
  147. </td>
  148. <td>@{{ express.name }}</td>
  149. <td>@{{ express.initial_weight }}</td>
  150. <td>@{{ express.additional_weight }}</td>
  151. <td @click="show('express-item-'+i)" class="cursor-pointer">
  152. <span class="fa" :class="upList['express-item-'+i] ? 'fa-angle-double-right' : 'fa-angle-double-down'"></span>
  153. &nbsp;@{{ express.items.length }} 省份</td>
  154. <td>
  155. <span class="cursor-pointer text-danger font-weight-bold" @click="delExpress(express,i)">&times;</span>
  156. </td>
  157. </tr>
  158. <tr>
  159. <td colspan="5">
  160. <div :id="'express-item-'+i" class="offset-3">
  161. <table class="table table-sm col-10">
  162. <tr>
  163. <th>省份</th>
  164. <th>首重价格</th>
  165. <th>续重价格</th>
  166. <th></th>
  167. </tr>
  168. <tr v-for="(item,j) in express.items">
  169. <td>@{{ poolMapping.provinces ? poolMapping.provinces[item.province_id] : '' }}</td>
  170. <td>@{{ item.initial_weight_price }}</td>
  171. <td>@{{ item.additional_weight_price }}</td>
  172. <td>
  173. <span class="cursor-pointer text-danger font-weight-bold" @click="deleteExpressItem(item,j,i)">&times;</span>
  174. </td>
  175. </tr>
  176. </table>
  177. </div>
  178. </td>
  179. </tr>
  180. </tbody>
  181. </table>
  182. </div>
  183. </div>
  184. <div class="card" id="logistic-card">
  185. <div class="card-header bg-light-info">
  186. <span class="pull-left font-weight-bold cursor-pointer" @click="show('logistic')"><span class="fa fa-truck"></span>&nbsp;物流</span>
  187. </div>
  188. <div class="card-body" id="logistic">
  189. <table class="table table-sm">
  190. <tr>
  191. <th>承运商</th>
  192. <th>名称</th>
  193. <th>单位一</th>
  194. <th>一区间值</th>
  195. <th>单位二</th>
  196. <th>二区间值</th>
  197. <th>提货费</th>
  198. <th>燃油附加费</th>
  199. <th>信息服务费</th>
  200. <th>详情</th>
  201. <th></th>
  202. </tr>
  203. <tbody v-for="(logistic,i) in selectedModel.logistic">
  204. <tr>
  205. <td>
  206. <div class="text-overflow-warp-100 small">
  207. <label v-for="(logistic,j) in logistic.logistics" class="m-0">@{{ poolMapping.logistics ? poolMapping.logistics[logistic] : '' }}</label>
  208. </div>
  209. </td>
  210. <td>@{{ logistic.name }}</td>
  211. <td>@{{ poolMapping.units ? poolMapping.units[logistic.unit_id] : '' }}</td>
  212. <td>@{{ logistic.unit_range }}</td>
  213. <td>@{{ poolMapping.units ? poolMapping.units[logistic.other_unit_id] : '' }}</td>
  214. <td>@{{ logistic.other_unit_range }}</td>
  215. <td>@{{ logistic.pick_up_price }}</td>
  216. <td>@{{ logistic.fuel_price }}</td>
  217. <td>@{{ logistic.service_price }}</td>
  218. <td @click="show('logistic-item-'+i)" class="cursor-pointer">
  219. <span class="fa" :class="upList['logistic-item-'+i] ? 'fa-angle-double-right' : 'fa-angle-double-down'"></span>
  220. &nbsp;@{{ logistic.items.length }} 地区
  221. </td>
  222. <td>
  223. <span class="cursor-pointer text-danger font-weight-bold" @click="delLogistic(logistic,i)">&times;</span>
  224. </td>
  225. </tr>
  226. <tr>
  227. <td colspan="9">
  228. <div :id="'logistic-item-'+i" class="offset-1">
  229. <table class="table table-sm">
  230. <tr>
  231. <th>省份</th>
  232. <th>市区</th>
  233. <th>单位</th>
  234. <th>区间</th>
  235. <th>单价</th>
  236. <th>送货费</th>
  237. <th>起始计费</th>
  238. <th>起始计数</th>
  239. <th>费率(%)</th>
  240. <th></th>
  241. </tr>
  242. <tr v-for="(item,j) in logistic.items">
  243. <td class="font-weight-bold">@{{ poolMapping.provinces ? poolMapping.provinces[item.province_id] : '' }}</td>
  244. <td class="font-weight-bold">@{{ poolMapping.cities ? poolMapping.cities[item.city_id] : '' }}</td>
  245. <td>@{{ poolMapping.units ? poolMapping.units[item.unit_id] : '' }}</td>
  246. <td>@{{ item.range }}</td>
  247. <td>@{{ item.unit_price }}</td>
  248. <td>@{{ item.delivery_fee }}</td>
  249. <td>@{{ item.initial_fee }}</td>
  250. <td>@{{ item.initial_amount }}</td>
  251. <td>@{{ item.rate }}<span v-if="item.rate" class="font-weight-bold">&nbsp;%</span></td>
  252. <td>
  253. <span class="cursor-pointer text-danger font-weight-bold" @click="deleteLogisticItem(item,j,i)">&times;</span>
  254. </td>
  255. </tr>
  256. </table>
  257. </div>
  258. </td>
  259. </tr>
  260. </tbody>
  261. </table>
  262. </div>
  263. </div>
  264. <div class="card" id="directLogistic-card">
  265. <div class="card-header bg-light-info">
  266. <span class="pull-left font-weight-bold cursor-pointer" @click="show('directLogistic')"><span class="fa fa-rocket"></span>&nbsp;直发</span>
  267. </div>
  268. <div class="card-body" id="directLogistic">
  269. <div class="row">
  270. <label class="col-4">名称:<b>@{{ selectedModel.directLogistic.name }}</b></label>
  271. <label class="col-4">起步数(KM):<b>@{{ selectedModel.directLogistic.base_km }}</b></label>
  272. <label class="col-1 offset-3" v-if="selectedModel.directLogistic.name">
  273. <span class="cursor-pointer text-danger font-weight-bold" @click="delDirectLogistic(selectedModel.directLogistic)">&times;</span>
  274. </label>
  275. </div>
  276. <div class="row">
  277. <div class="cursor-pointer text-primary col-2" @click="show('directLogistic-item')">
  278. <span class="fa" :class="upList['directLogistic-item'] ? 'fa-angle-double-right' : 'fa-angle-double-down'"></span>&nbsp;详情</div>
  279. <div class="col-10" id="directLogistic-item">
  280. <table class="table table-sm">
  281. <tr>
  282. <th>车型</th>
  283. <th>起步费</th>
  284. <th>续费(元/KM)</th>
  285. <th></th>
  286. </tr>
  287. <tr v-for="(item,i) in selectedModel.directLogistic.items">
  288. <td>@{{ poolMapping.cars ? poolMapping.cars[item.car_type_id] : '' }}</td>
  289. <td>@{{ item.base_fee }}</td>
  290. <td>@{{ item.additional_fee }}</td>
  291. <td>
  292. <span class="cursor-pointer text-danger font-weight-bold" @click="deleteDirectLogisticItem(item,i)">&times;</span>
  293. </td>
  294. </tr>
  295. </table>
  296. </div>
  297. </div>
  298. </div>
  299. </div>
  300. </div>
  301. <div class="col-6">
  302. <div class="card">
  303. <div class="card-header bg-light-info">
  304. <button type="button" class="btn mr-1" :class="type == 'storage' ? 'btn-primary text-white' : 'btn-outline-primary'" @click="switchType('storage')">仓储</button>
  305. <button type="button" class="btn mr-1" :class="type == 'operation' ? 'btn-primary text-white' : 'btn-outline-primary'" @click="switchType('operation')">作业</button>
  306. <button type="button" class="btn mr-1" :class="type == 'express' ? 'btn-primary text-white' : 'btn-outline-primary'" @click="switchType('express')">快递</button>
  307. <button type="button" class="btn mr-1" :class="type == 'logistic' ? 'btn-primary text-white' : 'btn-outline-primary'" @click="switchType('logistic')">物流</button>
  308. <button type="button" class="btn mr-1" :class="type == 'directLogistic' ? 'btn-primary text-white' : 'btn-outline-primary'" @click="switchType('directLogistic')">直发</button>
  309. </div>
  310. <div class="card-body">
  311. <div v-if="type == 'storage'">
  312. @include("customer.project.part._storage")
  313. </div>
  314. <div v-show="type == 'operation'">
  315. @include("customer.project.part._operation")
  316. @include("customer.project.part._addFeature")
  317. </div>
  318. <div v-show="type == 'express'">
  319. @include("customer.project.part._express")
  320. </div>
  321. <div v-show="type == 'logistic'">
  322. @include("customer.project.part._logistic")
  323. @include("customer.project.part._logisticDetail")
  324. </div>
  325. <div v-show="type == 'directLogistic'">
  326. @include("customer.project.part._directLogistic")
  327. </div>
  328. @include("customer.project.part._introducePriceModel")
  329. <div class="row mt-3" v-if="base=='three'">
  330. <div class="col-2"></div>
  331. <button type="button" class="btn btn-success ml-1 col-4" @click="saveModel()">保存</button>
  332. <button type="button" class="btn btn-sm btn-info text-white offset-1 col-2"
  333. data-toggle="modal" data-target="#introduce" @click="loadIntroduce()">引入</button>
  334. <h5><span class="ml-0 fa fa-question-circle-o cursor-pointer"
  335. data-toggle="tooltip" data-placement="top" title="引入克隆一份已存在模型"></span></h5>
  336. </div>
  337. </div>
  338. </div>
  339. </div>
  340. </div>