_three.blade.php 25 KB

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