vitareinforce

create.vue bundle

Aug 22nd, 2021
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 261.82 KB | None | 0 0
  1. <template>
  2. <div class="row" v-if="userData.RoleDetails.IsCreateBundle || userData.RoleDetails.IsUpdateBundle || userData.RoleDetails.IsReadBundle ">
  3. <div class="col-lg-12" style="padding-left: 0px; padding-right: 0px;">
  4. <b-tabs pills card>
  5. <b-tab title="Bundle" active>
  6. <div v-if="loading" class="col-lg-12 d-flex justify-content-center mb-3">
  7. <b-spinner label="Loading..."></b-spinner>
  8. </div>
  9. <div class="row">
  10. <div class="col-lg-12 button-back-div">
  11. <router-link :to="{ name: 'BundleManagement.index' }" class="btn btn-primary">Kembali</router-link>
  12. </div>
  13. </div>
  14. <div class="row">
  15. <div class="col-lg-12" style="padding-left: 30px; padding-right: 40px;">
  16. <div class="row" v-if="!$route.name.includes('.create')">
  17. <label style="padding-left: 15px;">Tipe file foto adalah <b>.jpeg/.jpg/.png</b> dan ukuran maksimal foto adalah <b>4 MB</b></label>
  18. </div>
  19. <div class="row" v-if="!$route.name.includes('.create')">
  20. <div class="col-lg-6">
  21. <div class="form-group form-float">
  22. <!-- Foto field -->
  23. <label class="form-label" style="color: black;">Lampiran</label>
  24. <img v-if="$route.name.includes('.detail')" :src="'data:image/jpeg;base64,' + bundle.Picture1" class="img-fluid img-thumbnail" style="width: 50% !important; height: 50% !important" />
  25. <base64-upload v-if="!$route.name.includes('.detail')" class="img-fluid" imageSrc="/img/uploads.png" @change="onChangeImage1" style="width: 50% !important; height: 50% !important" >Upload photo</base64-upload>
  26. </div>
  27. </div>
  28. </div>
  29.  
  30. <div class="row">
  31. <!-- Kode Bundle field -->
  32. <div class="col-lg-6">
  33. <div class="form-group form-float">
  34. <label for="date" class="form-label" style="color: black;">Kode Bundle</label>
  35. <input disabled placeholder="Auto generate..." id="date" type="text" v-model="bundle.Code" required class="validate form-control" style="border: 1px solid black;">
  36. </div>
  37. </div>
  38.  
  39. <!-- Nama Bundle field -->
  40. <div class="col-lg-6">
  41. <div class="form-group form-float">
  42. <label for="date" class="form-label" style="color: black;">Nama Bundle</label>
  43. <input :disabled="$route.name.includes('.detail') || $route.name.includes('.draft')" placeholder="Ketik nama bundle..." id="date" type="text" v-model="bundle.Name" required class="validate form-control" style="border: 1px solid black;">
  44. </div>
  45. </div>
  46.  
  47. <!-- Kategori Barang field -->
  48. <div class="col-lg-6">
  49. <div class="form-group form-float">
  50. <label for="date" class="form-label" style="color: black;">Kategori Barang</label>
  51. <vue-select :disabled="$route.name.includes('.detail') || $route.name.includes('.draft')" v-model="bundle.Category" class="vue-select2" name="role" :options="category" label="Name"></vue-select>
  52. </div>
  53. </div>
  54.  
  55. <!-- Kategori Gudang field -->
  56. <div class="col-lg-6">
  57. <div class="form-group form-float">
  58. <label for="date" class="form-label" style="color: black;">Kategori Gudang</label>
  59. <vue-select :disabled="$route.name.includes('.detail') || $route.name.includes('.draft')" v-model="bundle.WarehouseCategory" class="vue-select2" name="role" :options="warehouseCategory"></vue-select>
  60. </div>
  61. </div>
  62.  
  63. <!-- Maintenance dan Repair field -->
  64. <div class="col-lg-6">
  65. <div class="form-group form-float">
  66. <label for="branchName" class="form-label" style="color: black;">Maintenance dan Repair</label><span style="margin-left: 10px;" v-b-tooltip.hover title="Bagian dari barang yang dapat digunakan untuk perbaikan barang lainnya"><i class="fa fa-question-circle"></i></span>
  67. <vue-select :disabled="$route.name.includes('.detail') || $route.name.includes('.draft')" v-model="selectedMaintenance" class="vue-select2" name="role" :options="maintenanceOptions"></vue-select>
  68. </div>
  69. </div>
  70.  
  71. <!-- Maintenance dan Repair field -->
  72. <div class="col-lg-6">
  73. <div class="form-group form-float">
  74. <label for="branchName" class="form-label" style="color: black;">Barang Titipan</label>
  75. <vue-select :disabled="$route.name.includes('.detail') || $route.name.includes('.draft')" v-model="selectedDeposit" class="vue-select2" name="role" :options="depositOptions"></vue-select>
  76. </div>
  77. </div>
  78.  
  79. <!-- Jenis Pengadaan field -->
  80. <div class="col-lg-6">
  81. <div class="form-group form-float">
  82. <label for="branchName" class="form-label" style="color: black;">Jenis Pengadaan</label>
  83. <vue-select :disabled="$route.name.includes('.detail') || $route.name.includes('.draft')" v-model="bundle.ProcurementType" class="vue-select2" name="role" :options="procurementType"></vue-select>
  84. </div>
  85. </div>
  86. </div>
  87.  
  88. <hr/>
  89.  
  90. <div class="row">
  91. <!-- Nama Barang field -->
  92. <div class="col-lg-6">
  93. <div class="form-group form-float">
  94. <label class="form-label" style="color: black;">Nomor SNI ke-1</label>
  95. <input :disabled="$route.name.includes('.detail')" placeholder="Ketik nomor SNI..." type="text" v-model="bundle.SNI1" name="ProductName" required class="validate form-control" style="border: 1px solid black;">
  96. </div>
  97. </div>
  98.  
  99. <!-- Nama Barang field -->
  100. <div class="col-lg-6">
  101. <div class="form-group form-float">
  102. <label class="form-label" style="color: black;">Nomor SNI ke-2</label>
  103. <input :disabled="$route.name.includes('.detail')" placeholder="Ketik nomor SNI..." type="text" v-model="bundle.SNI2" name="ProductName" required class="validate form-control" style="border: 1px solid black;">
  104. </div>
  105. </div>
  106.  
  107. <!-- Nama Barang field -->
  108. <div class="col-lg-6">
  109. <div class="form-group form-float">
  110. <label class="form-label" style="color: black;">Nomor SNI ke-3</label>
  111. <input :disabled="$route.name.includes('.detail')" placeholder="Ketik nomor SNI..." type="text" v-model="bundle.SNI3" name="ProductName" required class="validate form-control" style="border: 1px solid black;">
  112. </div>
  113. </div>
  114. </div>
  115.  
  116. <hr/>
  117.  
  118. <div class="row">
  119. <div class="col-lg-6">
  120. <!-- Nama Supplier Field -->
  121. <div class="form-group form-float">
  122. <label class="form-label" style="color: black;">Nama Supplier 1 (opsional)</label>
  123. <vue-select :disabled="$route.name.includes('.detail') || $route.name.includes('.draft')" v-model="selectedSupplier1" class="vue-select2" name="role" :options="supplier" label="Name"></vue-select>
  124. </div>
  125. </div>
  126.  
  127. <div class="col-lg-6">
  128. <!-- Nama Supplier Field -->
  129. <div class="form-group form-float">
  130. <label class="form-label" style="color: black;">Nama Supplier 2 (opsional)</label>
  131. <vue-select :disabled="$route.name.includes('.detail') || $route.name.includes('.draft')" v-model="selectedSupplier2" class="vue-select2" name="role" :options="supplier" label="Name"></vue-select>
  132. </div>
  133. </div>
  134.  
  135. <div class="col-lg-6">
  136. <!-- Nama Supplier Field -->
  137. <div class="form-group form-float">
  138. <label class="form-label" style="color: black;">Nama Supplier 3 (opsional)</label>
  139. <vue-select :disabled="$route.name.includes('.detail') || $route.name.includes('.draft')" v-model="selectedSupplier3" class="vue-select2" name="role" :options="supplier" label="Name"></vue-select>
  140. </div>
  141. </div>
  142.  
  143. <!-- Maintenance dan Repair field -->
  144. <!-- <div class="col-lg-6">
  145. <div class="form-group form-float">
  146. <label for="branchName" class="form-label" style="color: black;">Ada Barang yang Dapat Dirakit</label><span style="margin-left: 10px;" v-b-tooltip.hover title="Barang Bundle akan dirakit terlebih dahulu di Item Perakitan Bundle"><i class="fa fa-question-circle"></i></span>
  147. <vue-select :disabled="$route.name.includes('.detail') || $route.name.includes('.draft')" v-model="selectedAssembly" class="vue-select2" name="role" :options="assemblyOptions"></vue-select>
  148. </div>
  149. </div> -->
  150. </div>
  151.  
  152. <hr/>
  153.  
  154. <div class="row">
  155.  
  156. <!-- Lokasi field -->
  157. <div class="col-lg-6">
  158. <div class="form-group form-float">
  159. <label for="safetyStockLimit" class="form-label" style="color: black;">Lokasi</label>
  160. <input :disabled="$route.name.includes('.detail') || $route.name.includes('.draft')" placeholder="Ketik lokasi / blok..." id="safetyStockLimit" type="text" v-model="bundle.Location" name="safetyStockLimit" required class="validate form-control" style="border: 1px solid black;">
  161. </div>
  162. </div>
  163.  
  164. <!-- Jumlah Point field -->
  165. <div class="col-lg-6">
  166. <div class="form-group form-float">
  167. <label for="oneHundredCondition" class="form-label" style="color: black;">Jumlah Point</label>
  168. <vue-numeric separator="." v-bind:precision="2" v-if="!$route.name.includes('.detail')" :disabled="$route.name.includes('.draft')" id="oneHundredCondition" type="text" v-model="bundle.Point" required class="validate form-control" style="border: 1px solid black;"></vue-numeric>
  169. <div v-if="$route.name.includes('.detail')" class="form-control disabled-field">{{ bundle.Point | currency({ symbol: '', thousandsSeparator: '.', fractionCount: '', fractionSeparator: '', symbolPosition: '', symbolSpacing: '' }) }}</div>
  170. </div>
  171. </div>
  172.  
  173. </div>
  174.  
  175. <hr />
  176.  
  177. <div class="row">
  178. <!-- Jumlah Bundle field -->
  179. <div class="col-lg-3">
  180. <div class="form-group form-float">
  181. <label for="flagName" class="form-label" style="color: black;">Jumlah Bundle</label>
  182. <!-- <vue-numeric separator="." v-if="(!$route.name.includes('.detail'))" :disabled="$route.name.includes('.draft')" id="date" type="text" v-model="bundle.TotalQuantity" required class="validate form-control" style="border: 1px solid black;"></vue-numeric> -->
  183. <div class="form-control disabled-field">{{ bundle.TotalQuantity | currency({ symbol: '', thousandsSeparator: '.', fractionCount: '', fractionSeparator: '', symbolPosition: '', symbolSpacing: '' }) }}</div>
  184. </div>
  185. </div>
  186.  
  187. <!-- Batas Safety Stock field -->
  188. <div class="col-lg-3">
  189. <div class="form-group form-float">
  190. <label for="safetyStockLimit" class="form-label" style="color: black;">Safety Stock</label>
  191. <vue-numeric separator="." :disabled="$route.name.includes('.detail') || $route.name.includes('.draft')" placeholder="Ketik safety stock..." id="safetyStockLimit" type="text" v-model="bundle.SafetyStockLimit" name="safetyStockLimit" required class="validate form-control" style="border: 1px solid black;"></vue-numeric>
  192. </div>
  193. </div>
  194. </div>
  195.  
  196. <div class="row">
  197. <div class="col-lg-3">
  198. <div class="form-group form-float">
  199. <label for="flagName" class="form-label" style="color: black;">Jumlah Barang Bundle Kondisi 100%</label>
  200. <vue-numeric separator="." v-if="($route.name.includes('.create') || $route.name.includes('.edit'))" id="date" type="text" v-model="bundle.QuantityBundle100" required class="validate form-control" style="border: 1px solid black;"></vue-numeric>
  201. <div v-if="($route.name.includes('.draft') || $route.name.includes('.detail'))" class="form-control disabled-field">{{ bundle.QuantityBundle100 | currency({ symbol: '', thousandsSeparator: '.', fractionCount: '', fractionSeparator: '', symbolPosition: '', symbolSpacing: '' }) }}</div>
  202. </div>
  203. </div>
  204. <div class="col-lg-3">
  205. <div class="form-group form-float">
  206. <label for="flagName" class="form-label" style="color: black;">Jumlah Barang Bundle Kondisi 90%</label>
  207. <vue-numeric separator="." v-if="($route.name.includes('.create') || $route.name.includes('.edit'))" id="date" type="text" v-model="bundle.QuantityBundle90" required class="validate form-control" style="border: 1px solid black;"></vue-numeric>
  208. <div v-if="($route.name.includes('.draft') || $route.name.includes('.detail'))" class="form-control disabled-field">{{ bundle.QuantityBundle90 | currency({ symbol: '', thousandsSeparator: '.', fractionCount: '', fractionSeparator: '', symbolPosition: '', symbolSpacing: '' }) }}</div>
  209. </div>
  210. </div>
  211. <div class="col-lg-3">
  212. <div class="form-group form-float">
  213. <label for="flagName" class="form-label" style="color: black;">Jumlah Barang Bundle Kondisi 60%</label>
  214. <vue-numeric separator="." v-if="($route.name.includes('.create') || $route.name.includes('.edit'))" id="date" type="text" v-model="bundle.QuantityBundle60" required class="validate form-control" style="border: 1px solid black;"></vue-numeric>
  215. <div v-if="($route.name.includes('.draft') || $route.name.includes('.detail'))" class="form-control disabled-field">{{ bundle.QuantityBundle60 | currency({ symbol: '', thousandsSeparator: '.', fractionCount: '', fractionSeparator: '', symbolPosition: '', symbolSpacing: '' }) }}</div>
  216. </div>
  217. </div>
  218. <div class="col-lg-3">
  219. <div class="form-group form-float">
  220. <label for="flagName" class="form-label" style="color: black;">Jumlah Barang Bundle Kondisi 30%</label>
  221. <vue-numeric separator="." v-if="($route.name.includes('.create') || $route.name.includes('.edit'))" id="date" type="text" v-model="bundle.QuantityBundle30" required class="validate form-control" style="border: 1px solid black;"></vue-numeric>
  222. <div v-if="($route.name.includes('.draft') || $route.name.includes('.detail'))" class="form-control disabled-field">{{ bundle.QuantityBundle30 | currency({ symbol: '', thousandsSeparator: '.', fractionCount: '', fractionSeparator: '', symbolPosition: '', symbolSpacing: '' }) }}</div>
  223. </div>
  224. </div>
  225. </div>
  226.  
  227. <hr />
  228.  
  229. <div class="row" v-if="userData.RoleDetails.IsReadBuyingPriceBundle || userData.RoleDetails.IsUpdateBuyingPriceBundle">
  230. <div class="col-lg-12" style="margin-bottom: 20px;">
  231. <h5>Harga Beli</h5>
  232. </div>
  233. <div class="col-lg-3">
  234. <div class="form-group form-float">
  235. <label for="date" v-if="userData.RoleDetails.IsReadBuyingPriceBundle || userData.RoleDetails.IsUpdateBuyingPriceBundle" class="form-label" style="color: black;">Harga Beli Kondisi 100% </label>
  236. <money v-if="!$route.name.includes('.detail') && userData.RoleDetails.IsUpdateBuyingPriceBundle" placeholder="Ketik harga jual bazaar 100%..." id="date" type="text" v-model="bundle.BuyingPrice100" required class="validate form-control" style="border: 1px solid black;"></money>
  237. <div v-if="$route.name.includes('.detail') && userData.RoleDetails.IsReadBuyingPriceBundle" class="form-control disabled-field">{{ bundle.BuyingPrice100 | currency }}</div>
  238. </div>
  239. </div>
  240. <div class="col-lg-3">
  241. <div class="form-group form-float">
  242. <label for="date" v-if="userData.RoleDetails.IsReadBuyingPriceBundle || userData.RoleDetails.IsUpdateBuyingPriceBundle" class="form-label" style="color: black;">Harga Beli Kondisi 90% </label>
  243. <money v-if="!$route.name.includes('.detail') && userData.RoleDetails.IsUpdateBuyingPriceBundle" placeholder="Ketik harga jual bazaar 90%..." id="date" type="text" v-model="bundle.BuyingPrice90" required class="validate form-control" style="border: 1px solid black;"></money>
  244. <div v-if="$route.name.includes('.detail') && userData.RoleDetails.IsReadBuyingPriceBundle" class="form-control disabled-field">{{ bundle.BuyingPrice90 | currency }}</div>
  245. </div>
  246. </div>
  247. <div class="col-lg-3">
  248. <div class="form-group form-float">
  249. <label for="date" v-if="userData.RoleDetails.IsReadBuyingPriceBundle || userData.RoleDetails.IsUpdateBuyingPriceBundle" class="form-label" style="color: black;">Harga Beli Kondisi 60% </label>
  250. <money v-if="!$route.name.includes('.detail') && userData.RoleDetails.IsUpdateBuyingPriceBundle" placeholder="Ketik harga jual bazaar 60%..." id="date" type="text" v-model="bundle.BuyingPrice60" required class="validate form-control" style="border: 1px solid black;"></money>
  251. <div v-if="$route.name.includes('.detail') && userData.RoleDetails.IsReadBuyingPriceBundle" class="form-control disabled-field">{{ bundle.BuyingPrice60 | currency }}</div>
  252. </div>
  253. </div>
  254. <div class="col-lg-3">
  255. <div class="form-group form-float">
  256. <label for="date" v-if="userData.RoleDetails.IsReadBuyingPriceBundle || userData.RoleDetails.IsUpdateBuyingPriceBundle" class="form-label" style="color: black;">Harga Beli Kondisi 30% </label>
  257. <money v-if="!$route.name.includes('.detail') && userData.RoleDetails.IsUpdateBuyingPriceBundle" placeholder="Ketik harga jual bazaar 30%..." id="date" type="text" v-model="bundle.BuyingPrice30" required class="validate form-control" style="border: 1px solid black;"></money>
  258. <div v-if="$route.name.includes('.detail') && userData.RoleDetails.IsReadBuyingPriceBundle" class="form-control disabled-field">{{ bundle.BuyingPrice30 | currency }}</div>
  259. </div>
  260. </div>
  261. </div>
  262.  
  263. <hr v-if="!$route.name.includes('.create')" />
  264.  
  265. <div class="row" v-if="!$route.name.includes('.create')">
  266.  
  267. <div class="col-lg-6">
  268. <div class="form-group form-float">
  269. <label for="date" class="form-label" style="color: black;">Harga Rekomendasi </label>
  270. <div disabled class="form-control disabled-field">{{ bundle.RecPrice | currency }}</div>
  271. </div>
  272. </div>
  273.  
  274. <div class="col-lg-6">
  275. <div class="form-group form-float">
  276. <label for="date" class="form-label" style="color: black;">Harga Rekomendasi Owner </label>
  277. <div disabled class="form-control disabled-field">{{ bundle.TotalOwnerPrice | currency }}</div>
  278. </div>
  279. </div>
  280. </div>
  281.  
  282. <hr v-if="!$route.name.includes('.create')" />
  283.  
  284. <!-- Harga Bundle Reguler Citra -->
  285. <div class="row" v-if="!$route.name.includes('.create') && (userData.Id == 1 || (userData.LegalEntityId != 4 && userData.LegalEntityId != 5 && userData.LegalEntityId != 6))">
  286. <div class="col-lg-12" style="margin-bottom: 20px;">
  287. <h5 v-if="!$route.name.includes('.create')">Harga Bundle Reguler Citra Pratama</h5>
  288. </div>
  289.  
  290. <div class="col-lg-3">
  291. <div class="form-group form-float">
  292. <label for="date" v-if="!$route.name.includes('.create') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsUpdateSellingPriceBundle)" class="form-label" style="color: black;">Harga Bundle Kondisi 100% </label>
  293. <money v-if="($route.name.includes('.edit') || $route.name.includes('.draft')) && userData.RoleDetails.IsUpdateSellingPriceBundle" placeholder="Ketik harga bundle..." id="date" type="text" v-model="bundle.BundlePrice100" required class="validate form-control" style="border: 1px solid black;"></money>
  294. <div v-if="($route.name.includes('.detail')) && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ bundle.BundlePrice100 | currency }}</div>
  295. </div>
  296. </div>
  297. <div class="col-lg-3">
  298. <div class="form-group form-float">
  299. <label for="date" v-if="!$route.name.includes('.create') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsUpdateSellingPriceBundle)" class="form-label" style="color: black;">Harga Bundle Kondisi 90% </label>
  300. <money v-if="($route.name.includes('.edit') || $route.name.includes('.draft')) && userData.RoleDetails.IsUpdateSellingPriceBundle" placeholder="Ketik harga bundle..." id="date" type="text" v-model="bundle.BundlePrice90" required class="validate form-control" style="border: 1px solid black;"></money>
  301. <div v-if="($route.name.includes('.detail')) && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ bundle.BundlePrice90 | currency }}</div>
  302. </div>
  303. </div>
  304. <div class="col-lg-3">
  305. <div class="form-group form-float">
  306. <label for="date" v-if="!$route.name.includes('.create') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsUpdateSellingPriceBundle)" class="form-label" style="color: black;">Harga Bundle Kondisi 60% </label>
  307. <money v-if="($route.name.includes('.edit') || $route.name.includes('.draft')) && userData.RoleDetails.IsUpdateSellingPriceBundle" placeholder="Ketik harga bundle..." id="date" type="text" v-model="bundle.BundlePrice60" required class="validate form-control" style="border: 1px solid black;"></money>
  308. <div v-if="($route.name.includes('.detail')) && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ bundle.BundlePrice60 | currency }}</div>
  309. </div>
  310. </div>
  311. <div class="col-lg-3">
  312. <div class="form-group form-float">
  313. <label for="date" v-if="!$route.name.includes('.create') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsUpdateSellingPriceBundle)" class="form-label" style="color: black;">Harga Bundle Kondisi 30% </label>
  314. <money v-if="($route.name.includes('.edit') || $route.name.includes('.draft')) && userData.RoleDetails.IsUpdateSellingPriceBundle" placeholder="Ketik harga bundle..." id="date" type="text" v-model="bundle.BundlePrice30" required class="validate form-control" style="border: 1px solid black;"></money>
  315. <div v-if="($route.name.includes('.detail')) && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ bundle.BundlePrice30 | currency }}</div>
  316. </div>
  317. </div>
  318. </div>
  319.  
  320. <!-- Harga Bundle Reguler Cipen -->
  321. <div class="row" v-if="!$route.name.includes('.create') && (userData.Id == 1 || userData.LegalEntityId == 1 || userData.LegalEntityId == 2 || userData.LegalEntityId == 4 || userData.LegalEntityId == 6)">
  322. <div class="col-lg-12" style="margin-bottom: 20px;" v-if="userData.Id == 1 || userData.LegalEntityId == 1|| userData.LegalEntityId == 4">
  323. <h5 v-if="!$route.name.includes('.create')">Harga Bundle Reguler Citra Pesona</h5>
  324. </div>
  325. <div class="col-lg-12" style="margin-bottom: 20px;" v-if="userData.LegalEntityId == 6">
  326. <h5 v-if="!$route.name.includes('.create')">Harga Bundle Reguler Citra Kencana</h5>
  327. </div>
  328.  
  329. <div class="col-lg-3">
  330. <div class="form-group form-float">
  331. <label for="date" v-if="!$route.name.includes('.create') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsUpdateSellingPriceBundle)" class="form-label" style="color: black;">Harga Bundle Kondisi 100% </label>
  332. <money v-if="($route.name.includes('.edit') || $route.name.includes('.draft')) && userData.RoleDetails.IsUpdateSellingPriceBundle" placeholder="Ketik harga bundle..." id="date" type="text" v-model="bundle.CipenRegularPrice100" required class="validate form-control" style="border: 1px solid black;"></money>
  333. <div v-if="($route.name.includes('.detail')) && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ bundle.CipenRegularPrice100 | currency }}</div>
  334. </div>
  335. </div>
  336. <div class="col-lg-3">
  337. <div class="form-group form-float">
  338. <label for="date" v-if="!$route.name.includes('.create') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsUpdateSellingPriceBundle)" class="form-label" style="color: black;">Harga Bundle Kondisi 90% </label>
  339. <money v-if="($route.name.includes('.edit') || $route.name.includes('.draft')) && userData.RoleDetails.IsUpdateSellingPriceBundle" placeholder="Ketik harga bundle..." id="date" type="text" v-model="bundle.CipenRegularPrice90" required class="validate form-control" style="border: 1px solid black;"></money>
  340. <div v-if="($route.name.includes('.detail')) && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ bundle.CipenRegularPrice90 | currency }}</div>
  341. </div>
  342. </div>
  343. <div class="col-lg-3">
  344. <div class="form-group form-float">
  345. <label for="date" v-if="!$route.name.includes('.create') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsUpdateSellingPriceBundle)" class="form-label" style="color: black;">Harga Bundle Kondisi 60% </label>
  346. <money v-if="($route.name.includes('.edit') || $route.name.includes('.draft')) && userData.RoleDetails.IsUpdateSellingPriceBundle" placeholder="Ketik harga bundle..." id="date" type="text" v-model="bundle.CipenRegularPrice60" required class="validate form-control" style="border: 1px solid black;"></money>
  347. <div v-if="($route.name.includes('.detail')) && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ bundle.CipenRegularPrice60 | currency }}</div>
  348. </div>
  349. </div>
  350. <div class="col-lg-3">
  351. <div class="form-group form-float">
  352. <label for="date" v-if="!$route.name.includes('.create') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsUpdateSellingPriceBundle)" class="form-label" style="color: black;">Harga Bundle Kondisi 30% </label>
  353. <money v-if="($route.name.includes('.edit') || $route.name.includes('.draft')) && userData.RoleDetails.IsUpdateSellingPriceBundle" placeholder="Ketik harga bundle..." id="date" type="text" v-model="bundle.CipenRegularPrice30" required class="validate form-control" style="border: 1px solid black;"></money>
  354. <div v-if="($route.name.includes('.detail')) && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ bundle.CipenRegularPrice30 | currency }}</div>
  355. </div>
  356. </div>
  357. </div>
  358.  
  359. <!-- Harga Bundle Reguler Cibag -->
  360. <div class="row" v-if="!$route.name.includes('.create') && (userData.Id == 1 || userData.LegalEntityId == 1 || userData.LegalEntityId == 2 || userData.LegalEntityId == 5)">
  361. <div class="col-lg-12" style="margin-bottom: 20px;">
  362. <h5 v-if="!$route.name.includes('.create')">Harga Bundle Reguler Citra Bahagia</h5>
  363. </div>
  364.  
  365. <div class="col-lg-3">
  366. <div class="form-group form-float">
  367. <label for="date" v-if="!$route.name.includes('.create')&& (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsUpdateSellingPriceBundle)" class="form-label" style="color: black;">Harga Bundle Kondisi 100% </label>
  368. <money v-if="($route.name.includes('.edit') || $route.name.includes('.draft')) && userData.RoleDetails.IsUpdateSellingPriceBundle" placeholder="Ketik harga bundle..." id="date" type="text" v-model="bundle.CikenRegularPrice100" required class="validate form-control" style="border: 1px solid black;"></money>
  369. <div v-if="($route.name.includes('.detail')) && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ bundle.CikenRegularPrice100 | currency }}</div>
  370. </div>
  371. </div>
  372. <div class="col-lg-3">
  373. <div class="form-group form-float">
  374. <label for="date" v-if="!$route.name.includes('.create') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsUpdateSellingPriceBundle)" class="form-label" style="color: black;">Harga Bundle Kondisi 90% </label>
  375. <money v-if="($route.name.includes('.edit') || $route.name.includes('.draft')) && userData.RoleDetails.IsUpdateSellingPriceBundle" placeholder="Ketik harga bundle..." id="date" type="text" v-model="bundle.CikenRegularPrice90" required class="validate form-control" style="border: 1px solid black;"></money>
  376. <div v-if="($route.name.includes('.detail')) && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ bundle.CikenRegularPrice90 | currency }}</div>
  377. </div>
  378. </div>
  379. <div class="col-lg-3">
  380. <div class="form-group form-float">
  381. <label for="date" v-if="!$route.name.includes('.create') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsUpdateSellingPriceBundle)" class="form-label" style="color: black;">Harga Bundle Kondisi 60% </label>
  382. <money v-if="($route.name.includes('.edit') || $route.name.includes('.draft')) && userData.RoleDetails.IsUpdateSellingPriceBundle" placeholder="Ketik harga bundle..." id="date" type="text" v-model="bundle.CikenRegularPrice60" required class="validate form-control" style="border: 1px solid black;"></money>
  383. <div v-if="($route.name.includes('.detail')) && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ bundle.CikenRegularPrice60 | currency }}</div>
  384. </div>
  385. </div>
  386. <div class="col-lg-3">
  387. <div class="form-group form-float">
  388. <label for="date" v-if="!$route.name.includes('.create') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsUpdateSellingPriceBundle)" class="form-label" style="color: black;">Harga Bundle Kondisi 30% </label>
  389. <money v-if="($route.name.includes('.edit') || $route.name.includes('.draft')) && userData.RoleDetails.IsUpdateSellingPriceBundle" placeholder="Ketik harga bundle..." id="date" type="text" v-model="bundle.CikenRegularPrice30" required class="validate form-control" style="border: 1px solid black;"></money>
  390. <div v-if="($route.name.includes('.detail')) && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ bundle.CikenRegularPrice30 | currency }}</div>
  391. </div>
  392. </div>
  393. </div>
  394.  
  395. <!-- Harga Bundle Reguler Cimil -->
  396. <div class="row" v-if="!$route.name.includes('.create') && (userData.Id == 1 || userData.LegalEntityId == 1 || userData.LegalEntityId == 2 || userData.LegalEntityId == 3)">
  397. <div class="col-lg-12" style="margin-bottom: 20px;">
  398. <h5 v-if="!$route.name.includes('.create')">Harga Bundle Reguler Citra Millenial</h5>
  399. </div>
  400.  
  401. <div class="col-lg-3">
  402. <div class="form-group form-float">
  403. <label for="date" v-if="!$route.name.includes('.create') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsUpdateSellingPriceBundle)" class="form-label" style="color: black;">Harga Bundle Kondisi 100% </label>
  404. <money v-if="($route.name.includes('.edit') || $route.name.includes('.draft')) && userData.RoleDetails.IsUpdateSellingPriceBundle" placeholder="Ketik harga bundle..." id="date" type="text" v-model="bundle.CimenRegularPrice100" required class="validate form-control" style="border: 1px solid black;"></money>
  405. <div v-if="($route.name.includes('.detail')) && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ bundle.CimenRegularPrice100 | currency }}</div>
  406. </div>
  407. </div>
  408. <div class="col-lg-3">
  409. <div class="form-group form-float">
  410. <label for="date" v-if="!$route.name.includes('.create') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsUpdateSellingPriceBundle)" class="form-label" style="color: black;">Harga Bundle Kondisi 90% </label>
  411. <money v-if="($route.name.includes('.edit') || $route.name.includes('.draft')) && userData.RoleDetails.IsUpdateSellingPriceBundle" placeholder="Ketik harga bundle..." id="date" type="text" v-model="bundle.CimenRegularPrice90" required class="validate form-control" style="border: 1px solid black;"></money>
  412. <div v-if="($route.name.includes('.detail')) && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ bundle.CimenRegularPrice90 | currency }}</div>
  413. </div>
  414. </div>
  415. <div class="col-lg-3">
  416. <div class="form-group form-float">
  417. <label for="date" v-if="!$route.name.includes('.create') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsUpdateSellingPriceBundle)" class="form-label" style="color: black;">Harga Bundle Kondisi 60% </label>
  418. <money v-if="($route.name.includes('.edit') || $route.name.includes('.draft')) && userData.RoleDetails.IsUpdateSellingPriceBundle" placeholder="Ketik harga bundle..." id="date" type="text" v-model="bundle.CimenRegularPrice60" required class="validate form-control" style="border: 1px solid black;"></money>
  419. <div v-if="($route.name.includes('.detail')) && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ bundle.CimenRegularPrice60 | currency }}</div>
  420. </div>
  421. </div>
  422. <div class="col-lg-3">
  423. <div class="form-group form-float">
  424. <label for="date" v-if="!$route.name.includes('.create') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsUpdateSellingPriceBundle)" class="form-label" style="color: black;">Harga Bundle Kondisi 30% </label>
  425. <money v-if="($route.name.includes('.edit') || $route.name.includes('.draft')) && userData.RoleDetails.IsUpdateSellingPriceBundle" placeholder="Ketik harga bundle..." id="date" type="text" v-model="bundle.CimenRegularPrice30" required class="validate form-control" style="border: 1px solid black;"></money>
  426. <div v-if="($route.name.includes('.detail')) && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ bundle.CimenRegularPrice30 | currency }}</div>
  427. </div>
  428. </div>
  429. </div>
  430.  
  431. <hr v-if="!$route.name.includes('.create')" />
  432.  
  433. <!-- Harga Bundle Komisi Citra -->
  434. <div class="row" v-if="!$route.name.includes('.create') && ((userData.Id == 1 || (userData.LegalEntityId != 4 && userData.LegalEntityId != 5 && userData.LegalEntityId != 6)) && $route.name.includes('.detail')) && userData.RoleDetails.IsReadSellingPriceBundle">
  435. <!-- Harga Reguler -->
  436. <div class="col-lg-12" style="margin-bottom: 20px;">
  437. <h5 v-if="$route.name.includes('.detail')">Harga Bundle Komisi Citra Pratama</h5>
  438. </div>
  439.  
  440. <!-- Harga Barang Kondisi 100% field -->
  441. <div class="col-lg-3" v-if="$route.name.includes('.detail') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsUpdateSellingPriceBundle)">
  442. <div class="form-group form-float">
  443. <label for="oneHundredPrice" class="form-label" style="color: black;">Harga Jual Komisi Kondisi 100% </label>
  444. <!-- <input v-if="!$route.name.includes('.detail')" placeholder="Ketik harga jual kondisi 100%..." id="oneHundredPrice" type="text" v-model="inventory.Price100" name="OneHundredPrice" required class="validate form-control" style="border: 1px solid black;"> -->
  445. <div v-if="$route.name.includes('.detail') && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ (bundle.BundlePrice100 > 20000 ? (bundle.BundlePrice100 - 20000) : bundle.BundlePrice100) | currency }}</div>
  446. </div>
  447. </div>
  448.  
  449. <!-- Harga Barang Kondisi 90% field -->
  450. <div class="col-lg-3" v-if="$route.name.includes('.detail') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsReadSellingPriceBundle)">
  451. <div class="form-group form-float">
  452. <label for="sixtyPrice" class="form-label" style="color: black;">Harga Jual Komisi Kondisi 90% </label>
  453. <div v-if="$route.name.includes('.detail') && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ (bundle.BundlePrice90 > 20000 ? (bundle.BundlePrice90 - 20000) : bundle.BundlePrice90) | currency }}</div>
  454. </div>
  455. </div>
  456.  
  457. <!-- Harga Barang Kondisi 60% field -->
  458. <div class="col-lg-3" v-if="$route.name.includes('.detail') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsReadSellingPriceBundle)">
  459. <div class="form-group form-float">
  460. <label class="form-label" style="color: black;">Harga Jual Komisi Kondisi 60% </label>
  461. <div v-if="$route.name.includes('.detail') && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ (bundle.BundlePrice60 > 20000 ? (bundle.BundlePrice60 - 20000) : bundle.BundlePrice60) | currency }}</div>
  462. </div>
  463. </div>
  464.  
  465. <!-- Harga Barang Kondisi 30% field -->
  466. <div class="col-lg-3" v-if="$route.name.includes('.detail') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsReadSellingPriceBundle)">
  467. <div class="form-group form-float">
  468. <label for="thirtyPrice" class="form-label" style="color: black;">Harga Jual Komisi Kondisi dibawah 30% </label>
  469. <div v-if="$route.name.includes('.detail') && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ (bundle.BundlePrice30 > 20000 ? (bundle.BundlePrice30 - 20000) : bundle.BundlePrice30) | currency }}</div>
  470. </div>
  471. </div>
  472. </div>
  473.  
  474. <!-- Harga Bundle Komisi Cipen -->
  475. <div class="row" v-if="!$route.name.includes('.create') && ((userData.Id == 1 || userData.LegalEntityId == 1 || userData.LegalEntityId == 2 || userData.LegalEntityId == 4 || userData.LegalEntityId == 6) && $route.name.includes('.detail')) && userData.RoleDetails.IsReadSellingPriceBundle">
  476. <!-- Harga Reguler -->
  477. <div class="col-lg-12" style="margin-bottom: 20px;" v-if="userData.Id == 1 || userData.LegalEntityId == 1|| userData.LegalEntityId == 4">
  478. <h5 v-if="$route.name.includes('.detail')">Harga Bundle Komisi Citra Pesona</h5>
  479. </div>
  480. <div class="col-lg-12" style="margin-bottom: 20px;" v-if="userData.LegalEntityId == 6">
  481. <h5 v-if="$route.name.includes('.detail')">Harga Bundle Komisi Citra Kencana</h5>
  482. </div>
  483.  
  484. <!-- Harga Barang Kondisi 100% field -->
  485. <div class="col-lg-3" v-if="$route.name.includes('.detail') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsReadSellingPriceBundle)">
  486. <div class="form-group form-float">
  487. <label for="oneHundredPrice" class="form-label" style="color: black;">Harga Jual Komisi Kondisi 100% </label>
  488. <!-- <input v-if="!$route.name.includes('.detail')" placeholder="Ketik harga jual kondisi 100%..." id="oneHundredPrice" type="text" v-model="inventory.Price100" name="OneHundredPrice" required class="validate form-control" style="border: 1px solid black;"> -->
  489. <div v-if="$route.name.includes('.detail') && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ (bundle.CipenRegularPrice100 > 20000 ? (bundle.CipenRegularPrice100 - 20000) : bundle.CipenRegularPrice100) | currency }}</div>
  490. </div>
  491. </div>
  492.  
  493. <!-- Harga Barang Kondisi 90% field -->
  494. <div class="col-lg-3" v-if="$route.name.includes('.detail') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsReadSellingPriceBundle)">
  495. <div class="form-group form-float">
  496. <label for="sixtyPrice" class="form-label" style="color: black;">Harga Jual Komisi Kondisi 90% </label>
  497. <div v-if="$route.name.includes('.detail') && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ (bundle.CipenRegularPrice90 > 20000 ? (bundle.CipenRegularPrice90 - 20000) : bundle.CipenRegularPrice90) | currency }}</div>
  498. </div>
  499. </div>
  500.  
  501. <!-- Harga Barang Kondisi 60% field -->
  502. <div class="col-lg-3" v-if="$route.name.includes('.detail') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsReadSellingPriceBundle)">
  503. <div class="form-group form-float">
  504. <label class="form-label" style="color: black;">Harga Jual Komisi Kondisi 60% </label>
  505. <div v-if="$route.name.includes('.detail') && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ (bundle.CipenRegularPrice60 > 20000 ? (bundle.CipenRegularPrice60 - 20000) : bundle.CipenRegularPrice60) | currency }}</div>
  506. </div>
  507. </div>
  508.  
  509. <!-- Harga Barang Kondisi 30% field -->
  510. <div class="col-lg-3" v-if="$route.name.includes('.detail') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsReadSellingPriceBundle)">
  511. <div class="form-group form-float">
  512. <label for="thirtyPrice" class="form-label" style="color: black;">Harga Jual Komisi Kondisi dibawah 30% </label>
  513. <div v-if="$route.name.includes('.detail') && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ (bundle.CipenRegularPrice30 > 20000 ? (bundle.CipenRegularPrice30 - 20000) : bundle.CipenRegularPrice30) | currency }}</div>
  514. </div>
  515. </div>
  516. </div>
  517.  
  518. <!-- Harga Bundle Komisi Cibag -->
  519. <div class="row" v-if="!$route.name.includes('.create') && ((userData.Id == 1 || userData.LegalEntityId == 1 || userData.LegalEntityId == 2 || userData.LegalEntityId == 5) && $route.name.includes('.detail')) && userData.RoleDetails.IsReadSellingPriceInventory">
  520. <!-- Harga Reguler -->
  521. <div class="col-lg-12" style="margin-bottom: 20px;">
  522. <h5 v-if="$route.name.includes('.detail')">Harga Bundle Komisi Citra Bahagia</h5>
  523. </div>
  524.  
  525. <!-- Harga Barang Kondisi 100% field -->
  526. <div class="col-lg-3" v-if="$route.name.includes('.detail') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsReadSellingPriceBundle)">
  527. <div class="form-group form-float">
  528. <label for="oneHundredPrice" class="form-label" style="color: black;">Harga Jual Komisi Kondisi 100% </label>
  529. <!-- <input v-if="!$route.name.includes('.detail')" placeholder="Ketik harga jual kondisi 100%..." id="oneHundredPrice" type="text" v-model="inventory.Price100" name="OneHundredPrice" required class="validate form-control" style="border: 1px solid black;"> -->
  530. <div v-if="$route.name.includes('.detail') && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ (bundle.CikenRegularPrice100 > 20000 ? (bundle.CikenRegularPrice100 - 20000) : bundle.CikenRegularPrice100) | currency }}</div>
  531. </div>
  532. </div>
  533.  
  534. <!-- Harga Barang Kondisi 90% field -->
  535. <div class="col-lg-3" v-if="$route.name.includes('.detail') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsReadSellingPriceBundle)">
  536. <div class="form-group form-float">
  537. <label for="sixtyPrice" class="form-label" style="color: black;">Harga Jual Komisi Kondisi 90% </label>
  538. <div v-if="$route.name.includes('.detail') && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ (bundle.CikenRegularPrice90 > 20000 ? (bundle.CikenRegularPrice90 - 20000) : bundle.CikenRegularPrice90) | currency }}</div>
  539. </div>
  540. </div>
  541.  
  542. <!-- Harga Barang Kondisi 60% field -->
  543. <div class="col-lg-3" v-if="$route.name.includes('.detail') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsReadSellingPriceBundle)">
  544. <div class="form-group form-float">
  545. <label class="form-label" style="color: black;">Harga Jual Komisi Kondisi 60% </label>
  546. <div v-if="$route.name.includes('.detail') && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ (bundle.CikenRegularPrice60 > 20000 ? (bundle.CikenRegularPrice60 - 20000) : bundle.CikenRegularPrice60) | currency }}</div>
  547. </div>
  548. </div>
  549.  
  550. <!-- Harga Barang Kondisi 30% field -->
  551. <div class="col-lg-3" v-if="$route.name.includes('.detail') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsReadSellingPriceBundle)">
  552. <div class="form-group form-float">
  553. <label for="thirtyPrice" class="form-label" style="color: black;">Harga Jual Komisi Kondisi dibawah 30% </label>
  554. <div v-if="$route.name.includes('.detail') && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ (bundle.CikenRegularPrice30 > 20000 ? (bundle.CikenRegularPrice30 - 20000) : bundle.CikenRegularPrice30) | currency }}</div>
  555. </div>
  556. </div>
  557. </div>
  558.  
  559. <!-- Harga Bundle Komisi Cimil -->
  560. <div class="row" v-if="!$route.name.includes('.create') && ((userData.Id == 1 || userData.LegalEntityId == 1 || userData.LegalEntityId == 2 || userData.LegalEntityId == 3) && $route.name.includes('.detail')) && userData.RoleDetails.IsReadSellingPriceInventory">
  561. <!-- Harga Reguler -->
  562. <div class="col-lg-12" style="margin-bottom: 20px;">
  563. <h5 v-if="$route.name.includes('.detail')">Harga Bundle Komisi Citra Millenial</h5>
  564. </div>
  565.  
  566. <!-- Harga Barang Kondisi 100% field -->
  567. <div class="col-lg-3" v-if="$route.name.includes('.detail') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsReadSellingPriceBundle)">
  568. <div class="form-group form-float">
  569. <label for="oneHundredPrice" class="form-label" style="color: black;">Harga Jual Komisi Kondisi 100% </label>
  570. <!-- <input v-if="!$route.name.includes('.detail')" placeholder="Ketik harga jual kondisi 100%..." id="oneHundredPrice" type="text" v-model="inventory.Price100" name="OneHundredPrice" required class="validate form-control" style="border: 1px solid black;"> -->
  571. <div v-if="$route.name.includes('.detail') && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ (bundle.CimenRegularPrice100 > 20000 ? (bundle.CimenRegularPrice100 - 20000) : bundle.CimenRegularPrice100) | currency }}</div>
  572. </div>
  573. </div>
  574.  
  575. <!-- Harga Barang Kondisi 90% field -->
  576. <div class="col-lg-3" v-if="$route.name.includes('.detail') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsReadSellingPriceBundle)">
  577. <div class="form-group form-float">
  578. <label for="sixtyPrice" class="form-label" style="color: black;">Harga Jual Komisi Kondisi 90% </label>
  579. <div v-if="$route.name.includes('.detail') && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ (bundle.CimenRegularPrice90 > 20000 ? (bundle.CimenRegularPrice90 - 20000) : bundle.CimenRegularPrice90) | currency }}</div>
  580. </div>
  581. </div>
  582.  
  583. <!-- Harga Barang Kondisi 60% field -->
  584. <div class="col-lg-3" v-if="$route.name.includes('.detail') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsReadSellingPriceBundle)">
  585. <div class="form-group form-float">
  586. <label class="form-label" style="color: black;">Harga Jual Komisi Kondisi 60% </label>
  587. <div v-if="$route.name.includes('.detail') && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ (bundle.CimenRegularPrice60 > 20000 ? (bundle.CimenRegularPrice60 - 20000) : bundle.CimenRegularPrice60) | currency }}</div>
  588. </div>
  589. </div>
  590.  
  591. <!-- Harga Barang Kondisi 30% field -->
  592. <div class="col-lg-3" v-if="$route.name.includes('.detail') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsReadSellingPriceBundle)">
  593. <div class="form-group form-float">
  594. <label for="thirtyPrice" class="form-label" style="color: black;">Harga Jual Komisi Kondisi dibawah 30% </label>
  595. <div v-if="$route.name.includes('.detail') && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ (bundle.CimenRegularPrice30 > 20000 ? (bundle.CimenRegularPrice30 - 20000) : bundle.CimenRegularPrice30) | currency }}</div>
  596. </div>
  597. </div>
  598. </div>
  599.  
  600. <hr v-if="$route.name.includes('.detail') && userData.RoleDetails.IsReadSellingPriceBundle" />
  601.  
  602. <!-- Harga Bundle Special Ciprat -->
  603. <div class="row" v-if="!$route.name.includes('.create') && (userData.Id == 1 || (userData.LegalEntityId != 4 && userData.LegalEntityId != 5 && userData.LegalEntityId != 6))">
  604. <div class="col-lg-12" style="margin-bottom: 20px;">
  605. <h5 v-if="!$route.name.includes('.create')">Harga Bundle Special Citra Pratama</h5>
  606. </div>
  607.  
  608. <div class="col-lg-3">
  609. <div class="form-group form-float">
  610. <label for="date" v-if="!$route.name.includes('.create') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsUpdateSellingPriceBundle)" class="form-label" style="color: black;">Harga Special Bundle Kondisi 100% </label>
  611. <money v-if="($route.name.includes('.edit') || $route.name.includes('.draft')) && userData.RoleDetails.IsUpdateSellingPriceBundle" placeholder="Ketik harga bundle..." id="date" type="text" v-model="bundle.SpecialPrice100" required class="validate form-control" style="border: 1px solid black;"></money>
  612. <div v-if="($route.name.includes('.detail')) && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ bundle.SpecialPrice100 | currency }}</div>
  613. </div>
  614. </div>
  615. <div class="col-lg-3">
  616. <div class="form-group form-float">
  617. <label for="date" v-if="!$route.name.includes('.create') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsUpdateSellingPriceBundle)" class="form-label" style="color: black;">Harga Special Bundle Kondisi 90% </label>
  618. <money v-if="($route.name.includes('.edit') || $route.name.includes('.draft')) && userData.RoleDetails.IsUpdateSellingPriceBundle" placeholder="Ketik harga bundle..." id="date" type="text" v-model="bundle.SpecialPrice90" required class="validate form-control" style="border: 1px solid black;"></money>
  619. <div v-if="($route.name.includes('.detail')) && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ bundle.SpecialPrice90 | currency }}</div>
  620. </div>
  621. </div>
  622. <div class="col-lg-3">
  623. <div class="form-group form-float">
  624. <label for="date" v-if="!$route.name.includes('.create') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsUpdateSellingPriceBundle)" class="form-label" style="color: black;">Harga Special Bundle Kondisi 60% </label>
  625. <money v-if="($route.name.includes('.edit') || $route.name.includes('.draft')) && userData.RoleDetails.IsUpdateSellingPriceBundle" placeholder="Ketik harga bundle..." id="date" type="text" v-model="bundle.SpecialPrice60" required class="validate form-control" style="border: 1px solid black;"></money>
  626. <div v-if="($route.name.includes('.detail')) && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ bundle.SpecialPrice60 | currency }}</div>
  627. </div>
  628. </div>
  629. <div class="col-lg-3">
  630. <div class="form-group form-float">
  631. <label for="date" v-if="!$route.name.includes('.create') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsUpdateSellingPriceBundle)" class="form-label" style="color: black;">Harga Special Bundle Kondisi 30% </label>
  632. <money v-if="($route.name.includes('.edit') || $route.name.includes('.draft')) && userData.RoleDetails.IsUpdateSellingPriceBundle" placeholder="Ketik harga bundle..." id="date" type="text" v-model="bundle.SpecialPrice30" required class="validate form-control" style="border: 1px solid black;"></money>
  633. <div v-if="($route.name.includes('.detail')) && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ bundle.SpecialPrice30 | currency }}</div>
  634. </div>
  635. </div>
  636. </div>
  637.  
  638. <!-- Harga Bundle Special Cipen -->
  639. <div class="row" v-if="!$route.name.includes('.create') && (userData.Id == 1 || userData.LegalEntityId == 1 || userData.LegalEntityId == 2 || userData.LegalEntityId == 4 || userData.LegalEntityId == 6)">
  640. <div class="col-lg-12" style="margin-bottom: 20px;" v-if="userData.Id == 1 || userData.LegalEntityId == 1|| userData.LegalEntityId == 4">
  641. <h5 v-if="!$route.name.includes('.create')">Harga Bundle Special Citra Pesona</h5>
  642. </div>
  643. <div class="col-lg-12" style="margin-bottom: 20px;" v-if="userData.LegalEntityId == 6">
  644. <h5 v-if="!$route.name.includes('.create')">Harga Bundle Special Citra Kencana</h5>
  645. </div>
  646.  
  647. <div class="col-lg-3">
  648. <div class="form-group form-float">
  649. <label for="date" v-if="!$route.name.includes('.create') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsUpdateSellingPriceBundle)" class="form-label" style="color: black;">Harga Special Bundle Kondisi 100% </label>
  650. <money v-if="($route.name.includes('.edit') || $route.name.includes('.draft')) && userData.RoleDetails.IsUpdateSellingPriceBundle" placeholder="Ketik harga bundle..." id="date" type="text" v-model="bundle.CipenSpecialPrice100" required class="validate form-control" style="border: 1px solid black;"></money>
  651. <div v-if="($route.name.includes('.detail')) && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ bundle.CipenSpecialPrice100 | currency }}</div>
  652. </div>
  653. </div>
  654. <div class="col-lg-3">
  655. <div class="form-group form-float">
  656. <label for="date" v-if="!$route.name.includes('.create') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsUpdateSellingPriceBundle)" class="form-label" style="color: black;">Harga Special Bundle Kondisi 90% </label>
  657. <money v-if="($route.name.includes('.edit') || $route.name.includes('.draft')) && userData.RoleDetails.IsUpdateSellingPriceBundle" placeholder="Ketik harga bundle..." id="date" type="text" v-model="bundle.CipenSpecialPrice90" required class="validate form-control" style="border: 1px solid black;"></money>
  658. <div v-if="($route.name.includes('.detail')) && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ bundle.CipenSpecialPrice90 | currency }}</div>
  659. </div>
  660. </div>
  661. <div class="col-lg-3">
  662. <div class="form-group form-float">
  663. <label for="date" v-if="!$route.name.includes('.create') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsUpdateSellingPriceBundle)" class="form-label" style="color: black;">Harga Special Bundle Kondisi 60% </label>
  664. <money v-if="($route.name.includes('.edit') || $route.name.includes('.draft')) && userData.RoleDetails.IsUpdateSellingPriceBundle" placeholder="Ketik harga bundle..." id="date" type="text" v-model="bundle.CipenSpecialPrice60" required class="validate form-control" style="border: 1px solid black;"></money>
  665. <div v-if="($route.name.includes('.detail')) && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ bundle.CipenSpecialPrice60 | currency }}</div>
  666. </div>
  667. </div>
  668. <div class="col-lg-3">
  669. <div class="form-group form-float">
  670. <label for="date" v-if="!$route.name.includes('.create') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsUpdateSellingPriceBundle)" class="form-label" style="color: black;">Harga Special Bundle Kondisi 30% </label>
  671. <money v-if="($route.name.includes('.edit') || $route.name.includes('.draft')) && userData.RoleDetails.IsUpdateSellingPriceBundle" placeholder="Ketik harga bundle..." id="date" type="text" v-model="bundle.CipenSpecialPrice30" required class="validate form-control" style="border: 1px solid black;"></money>
  672. <div v-if="($route.name.includes('.detail')) && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ bundle.CipenSpecialPrice30 | currency }}</div>
  673. </div>
  674. </div>
  675. </div>
  676.  
  677. <!-- Harga Bundle Special Cibag -->
  678. <div class="row" v-if="!$route.name.includes('.create') && (userData.Id == 1 || userData.LegalEntityId == 1 || userData.LegalEntityId == 2 || userData.LegalEntityId == 5)">
  679. <div class="col-lg-12" style="margin-bottom: 20px;">
  680. <h5 v-if="!$route.name.includes('.create')">Harga Bundle Special Citra Bahagia</h5>
  681. </div>
  682.  
  683. <div class="col-lg-3">
  684. <div class="form-group form-float">
  685. <label for="date" v-if="!$route.name.includes('.create') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsUpdateSellingPriceBundle)" class="form-label" style="color: black;">Harga Special Bundle Kondisi 100% </label>
  686. <money v-if="($route.name.includes('.edit') || $route.name.includes('.draft')) && userData.RoleDetails.IsUpdateSellingPriceBundle" placeholder="Ketik harga bundle..." id="date" type="text" v-model="bundle.CikenSpecialPrice100" required class="validate form-control" style="border: 1px solid black;"></money>
  687. <div v-if="($route.name.includes('.detail')) && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ bundle.CikenSpecialPrice100 | currency }}</div>
  688. </div>
  689. </div>
  690. <div class="col-lg-3">
  691. <div class="form-group form-float">
  692. <label for="date" v-if="!$route.name.includes('.create') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsUpdateSellingPriceBundle)" class="form-label" style="color: black;">Harga Special Bundle Kondisi 90% </label>
  693. <money v-if="($route.name.includes('.edit') || $route.name.includes('.draft')) && userData.RoleDetails.IsUpdateSellingPriceBundle" placeholder="Ketik harga bundle..." id="date" type="text" v-model="bundle.CikenSpecialPrice90" required class="validate form-control" style="border: 1px solid black;"></money>
  694. <div v-if="($route.name.includes('.detail')) && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ bundle.CikenSpecialPrice90 | currency }}</div>
  695. </div>
  696. </div>
  697. <div class="col-lg-3">
  698. <div class="form-group form-float">
  699. <label for="date" v-if="!$route.name.includes('.create') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsUpdateSellingPriceBundle)" class="form-label" style="color: black;">Harga Special Bundle Kondisi 60% </label>
  700. <money v-if="($route.name.includes('.edit') || $route.name.includes('.draft')) && userData.RoleDetails.IsUpdateSellingPriceBundle" placeholder="Ketik harga bundle..." id="date" type="text" v-model="bundle.CikenSpecialPrice60" required class="validate form-control" style="border: 1px solid black;"></money>
  701. <div v-if="($route.name.includes('.detail')) && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ bundle.CikenSpecialPrice60 | currency }}</div>
  702. </div>
  703. </div>
  704. <div class="col-lg-3">
  705. <div class="form-group form-float">
  706. <label for="date" v-if="!$route.name.includes('.create') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsUpdateSellingPriceBundle)" class="form-label" style="color: black;">Harga Special Bundle Kondisi 30% </label>
  707. <money v-if="($route.name.includes('.edit') || $route.name.includes('.draft')) && userData.RoleDetails.IsUpdateSellingPriceBundle" placeholder="Ketik harga bundle..." id="date" type="text" v-model="bundle.CikenSpecialPrice30" required class="validate form-control" style="border: 1px solid black;"></money>
  708. <div v-if="($route.name.includes('.detail')) && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ bundle.CikenSpecialPrice30 | currency }}</div>
  709. </div>
  710. </div>
  711. </div>
  712.  
  713. <!-- Harga Bundle Special Cimil -->
  714. <div class="row" v-if="!$route.name.includes('.create') && (userData.Id == 1 || userData.LegalEntityId == 1 || userData.LegalEntityId == 2 || userData.LegalEntityId == 3)">
  715. <div class="col-lg-12" style="margin-bottom: 20px;">
  716. <h5 v-if="!$route.name.includes('.create')">Harga Bundle Special Citra Millenial</h5>
  717. </div>
  718.  
  719. <div class="col-lg-3">
  720. <div class="form-group form-float">
  721. <label for="date" v-if="!$route.name.includes('.create') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsUpdateSellingPriceBundle)" class="form-label" style="color: black;">Harga Special Bundle Kondisi 100% </label>
  722. <money v-if="($route.name.includes('.edit') || $route.name.includes('.draft')) && userData.RoleDetails.IsUpdateSellingPriceBundle" placeholder="Ketik harga bundle..." id="date" type="text" v-model="bundle.CimenSpecialPrice100" required class="validate form-control" style="border: 1px solid black;"></money>
  723. <div v-if="($route.name.includes('.detail')) && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ bundle.CimenSpecialPrice100 | currency }}</div>
  724. </div>
  725. </div>
  726. <div class="col-lg-3">
  727. <div class="form-group form-float">
  728. <label for="date" v-if="!$route.name.includes('.create') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsUpdateSellingPriceBundle)" class="form-label" style="color: black;">Harga Special Bundle Kondisi 90% </label>
  729. <money v-if="($route.name.includes('.edit') || $route.name.includes('.draft')) && userData.RoleDetails.IsUpdateSellingPriceBundle" placeholder="Ketik harga bundle..." id="date" type="text" v-model="bundle.CimenSpecialPrice90" required class="validate form-control" style="border: 1px solid black;"></money>
  730. <div v-if="($route.name.includes('.detail')) && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ bundle.CimenSpecialPrice90 | currency }}</div>
  731. </div>
  732. </div>
  733. <div class="col-lg-3">
  734. <div class="form-group form-float">
  735. <label for="date" v-if="!$route.name.includes('.create') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsUpdateSellingPriceBundle)" class="form-label" style="color: black;">Harga Special Bundle Kondisi 60% </label>
  736. <money v-if="($route.name.includes('.edit') || $route.name.includes('.draft')) && userData.RoleDetails.IsUpdateSellingPriceBundle" placeholder="Ketik harga bundle..." id="date" type="text" v-model="bundle.CimenSpecialPrice60" required class="validate form-control" style="border: 1px solid black;"></money>
  737. <div v-if="($route.name.includes('.detail')) && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ bundle.CimenSpecialPrice60 | currency }}</div>
  738. </div>
  739. </div>
  740. <div class="col-lg-3">
  741. <div class="form-group form-float">
  742. <label for="date" v-if="!$route.name.includes('.create') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsUpdateSellingPriceBundle)" class="form-label" style="color: black;">Harga Special Bundle Kondisi 30% </label>
  743. <money v-if="($route.name.includes('.edit') || $route.name.includes('.draft')) && userData.RoleDetails.IsUpdateSellingPriceBundle" placeholder="Ketik harga bundle..." id="date" type="text" v-model="bundle.CimenSpecialPrice30" required class="validate form-control" style="border: 1px solid black;"></money>
  744. <div v-if="($route.name.includes('.detail')) && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ bundle.CimenSpecialPrice30 | currency }}</div>
  745. </div>
  746. </div>
  747. </div>
  748.  
  749. <!-- Harga Bundle Special Komisi Ciprat -->
  750. <div class="row" v-if="!$route.name.includes('.create') && ((userData.Id == 1 || (userData.LegalEntityId != 4 && userData.LegalEntityId != 5 && userData.LegalEntityId != 6)) && $route.name.includes('.detail')) && userData.RoleDetails.IsReadSellingPriceBundle">
  751. <!-- Harga Reguler -->
  752. <div class="col-lg-12" style="margin-bottom: 20px;">
  753. <h5 v-if="$route.name.includes('.detail')">Harga Bundle Special Komisi Citra Pratama</h5>
  754. </div>
  755.  
  756. <!-- Harga Barang Kondisi 100% field -->
  757. <div class="col-lg-3" v-if="$route.name.includes('.detail') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsUpdateSellingPriceBundle)">
  758. <div class="form-group form-float">
  759. <label for="oneHundredPrice" class="form-label" style="color: black;">Harga Jual Komisi Kondisi 100% </label>
  760. <!-- <input v-if="!$route.name.includes('.detail')" placeholder="Ketik harga jual kondisi 100%..." id="oneHundredPrice" type="text" v-model="inventory.Price100" name="OneHundredPrice" required class="validate form-control" style="border: 1px solid black;"> -->
  761. <div v-if="$route.name.includes('.detail') && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ (bundle.SpecialPrice100 > 20000 ? (bundle.SpecialPrice100 - 20000) : bundle.SpecialPrice100) | currency }}</div>
  762. </div>
  763. </div>
  764.  
  765. <!-- Harga Barang Kondisi 90% field -->
  766. <div class="col-lg-3" v-if="$route.name.includes('.detail') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsReadSellingPriceBundle)">
  767. <div class="form-group form-float">
  768. <label for="sixtyPrice" class="form-label" style="color: black;">Harga Jual Komisi Kondisi 90% </label>
  769. <div v-if="$route.name.includes('.detail') && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ (bundle.SpecialPrice90 > 20000 ? (bundle.SpecialPrice90 - 20000) : bundle.SpecialPrice90) | currency }}</div>
  770. </div>
  771. </div>
  772.  
  773. <!-- Harga Barang Kondisi 60% field -->
  774. <div class="col-lg-3" v-if="$route.name.includes('.detail') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsReadSellingPriceBundle)">
  775. <div class="form-group form-float">
  776. <label class="form-label" style="color: black;">Harga Jual Komisi Kondisi 60% </label>
  777. <div v-if="$route.name.includes('.detail') && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ (bundle.SpecialPrice60 > 20000 ? (bundle.SpecialPrice60 - 20000) : bundle.SpecialPrice60) | currency }}</div>
  778. </div>
  779. </div>
  780.  
  781. <!-- Harga Barang Kondisi 30% field -->
  782. <div class="col-lg-3" v-if="$route.name.includes('.detail') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsReadSellingPriceBundle)">
  783. <div class="form-group form-float">
  784. <label for="thirtyPrice" class="form-label" style="color: black;">Harga Jual Komisi Kondisi dibawah 30% </label>
  785. <div v-if="$route.name.includes('.detail') && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ (bundle.SpecialPrice30 > 20000 ? (bundle.SpecialPrice30 - 20000) : bundle.SpecialPrice30) | currency }}</div>
  786. </div>
  787. </div>
  788. </div>
  789.  
  790. <!-- Harga Bundle Special Komisi Cipen -->
  791. <div class="row" v-if="!$route.name.includes('.create') && ((userData.Id == 1 || userData.LegalEntityId == 1 || userData.LegalEntityId == 2 || userData.LegalEntityId == 4 || userData.LegalEntityId == 6) && $route.name.includes('.detail')) && userData.RoleDetails.IsReadSellingPriceBundle">
  792. <!-- Harga Reguler -->
  793. <div class="col-lg-12" style="margin-bottom: 20px;" v-if="userData.Id == 1 || userData.LegalEntityId == 1|| userData.LegalEntityId == 4">
  794. <h5 v-if="$route.name.includes('.detail')">Harga Bundle Special Komisi Citra Pesona</h5>
  795. </div>
  796. <div class="col-lg-12" style="margin-bottom: 20px;" v-if="userData.LegalEntityId == 6">
  797. <h5 v-if="$route.name.includes('.detail')">Harga Bundle Special Komisi Citra Kencana</h5>
  798. </div>
  799.  
  800. <!-- Harga Barang Kondisi 100% field -->
  801. <div class="col-lg-3" v-if="$route.name.includes('.detail') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsReadSellingPriceBundle)">
  802. <div class="form-group form-float">
  803. <label for="oneHundredPrice" class="form-label" style="color: black;">Harga Jual Komisi Kondisi 100% </label>
  804. <!-- <input v-if="!$route.name.includes('.detail')" placeholder="Ketik harga jual kondisi 100%..." id="oneHundredPrice" type="text" v-model="inventory.Price100" name="OneHundredPrice" required class="validate form-control" style="border: 1px solid black;"> -->
  805. <div v-if="$route.name.includes('.detail') && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ (bundle.CipenSpecialPrice100 > 20000 ? (bundle.CipenSpecialPrice100 - 20000) : bundle.CipenSpecialPrice100) | currency }}</div>
  806. </div>
  807. </div>
  808.  
  809. <!-- Harga Barang Kondisi 90% field -->
  810. <div class="col-lg-3" v-if="$route.name.includes('.detail') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsReadSellingPriceBundle)">
  811. <div class="form-group form-float">
  812. <label for="sixtyPrice" class="form-label" style="color: black;">Harga Jual Komisi Kondisi 90% </label>
  813. <div v-if="$route.name.includes('.detail') && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ (bundle.CipenSpecialPrice90 > 20000 ? (bundle.CipenSpecialPrice90 - 20000) : bundle.CipenSpecialPrice90) | currency }}</div>
  814. </div>
  815. </div>
  816.  
  817. <!-- Harga Barang Kondisi 60% field -->
  818. <div class="col-lg-3" v-if="$route.name.includes('.detail') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsReadSellingPriceBundle)">
  819. <div class="form-group form-float">
  820. <label class="form-label" style="color: black;">Harga Jual Komisi Kondisi 60% </label>
  821. <div v-if="$route.name.includes('.detail') && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ (bundle.CipenSpecialPrice60 > 20000 ? (bundle.CipenSpecialPrice60 - 20000) : bundle.CipenSpecialPrice60) | currency }}</div>
  822. </div>
  823. </div>
  824.  
  825. <!-- Harga Barang Kondisi 30% field -->
  826. <div class="col-lg-3" v-if="$route.name.includes('.detail') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsReadSellingPriceBundle)">
  827. <div class="form-group form-float">
  828. <label for="thirtyPrice" class="form-label" style="color: black;">Harga Jual Komisi Kondisi dibawah 30% </label>
  829. <div v-if="$route.name.includes('.detail') && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ (bundle.CipenSpecialPrice30 > 20000 ? (bundle.CipenSpecialPrice30 - 20000) : bundle.CipenSpecialPrice30) | currency }}</div>
  830. </div>
  831. </div>
  832. </div>
  833.  
  834. <!-- Harga Bundle Special Komisi Cibag -->
  835. <div class="row" v-if="!$route.name.includes('.create') && ((userData.Id == 1 || userData.LegalEntityId == 1 || userData.LegalEntityId == 2 || userData.LegalEntityId == 5) && $route.name.includes('.detail') ) && userData.RoleDetails.IsReadSellingPriceInventory">
  836. <!-- Harga Reguler -->
  837. <div class="col-lg-12" style="margin-bottom: 20px;">
  838. <h5 v-if="$route.name.includes('.detail')">Harga Bundle Special Komisi Citra Bahagia</h5>
  839. </div>
  840.  
  841. <!-- Harga Barang Kondisi 100% field -->
  842. <div class="col-lg-3" v-if="$route.name.includes('.detail') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsReadSellingPriceBundle)">
  843. <div class="form-group form-float">
  844. <label for="oneHundredPrice" class="form-label" style="color: black;">Harga Jual Komisi Kondisi 100% </label>
  845. <!-- <input v-if="!$route.name.includes('.detail')" placeholder="Ketik harga jual kondisi 100%..." id="oneHundredPrice" type="text" v-model="inventory.Price100" name="OneHundredPrice" required class="validate form-control" style="border: 1px solid black;"> -->
  846. <div v-if="$route.name.includes('.detail') && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ (bundle.CikenSpecialPrice100 > 20000 ? (bundle.CikenSpecialPrice100 - 20000) : bundle.CikenSpecialPrice100) | currency }}</div>
  847. </div>
  848. </div>
  849.  
  850. <!-- Harga Barang Kondisi 90% field -->
  851. <div class="col-lg-3" v-if="$route.name.includes('.detail') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsReadSellingPriceBundle)">
  852. <div class="form-group form-float">
  853. <label for="sixtyPrice" class="form-label" style="color: black;">Harga Jual Komisi Kondisi 90% </label>
  854. <div v-if="$route.name.includes('.detail') && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ (bundle.CikenSpecialPrice90 > 20000 ? (bundle.CikenSpecialPrice90 - 20000) : bundle.CikenSpecialPrice90) | currency }}</div>
  855. </div>
  856. </div>
  857.  
  858. <!-- Harga Barang Kondisi 60% field -->
  859. <div class="col-lg-3" v-if="$route.name.includes('.detail') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsReadSellingPriceBundle)">
  860. <div class="form-group form-float">
  861. <label class="form-label" style="color: black;">Harga Jual Komisi Kondisi 60% </label>
  862. <div v-if="$route.name.includes('.detail') && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ (bundle.CikenSpecialPrice60 > 20000 ? (bundle.CikenSpecialPrice60 - 20000) : bundle.CikenSpecialPrice60) | currency }}</div>
  863. </div>
  864. </div>
  865.  
  866. <!-- Harga Barang Kondisi 30% field -->
  867. <div class="col-lg-3" v-if="$route.name.includes('.detail') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsReadSellingPriceBundle)">
  868. <div class="form-group form-float">
  869. <label for="thirtyPrice" class="form-label" style="color: black;">Harga Jual Komisi Kondisi dibawah 30% </label>
  870. <div v-if="$route.name.includes('.detail') && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ (bundle.CikenSpecialPrice30 > 20000 ? (bundle.CikenSpecialPrice30 - 20000) : bundle.CikenSpecialPrice30) | currency }}</div>
  871. </div>
  872. </div>
  873. </div>
  874.  
  875. <!-- Harga Bundle Special Komisi Cimil -->
  876. <div class="row" v-if="!$route.name.includes('.create') && ((userData.Id == 1 || userData.LegalEntityId == 1 || userData.LegalEntityId == 2 || userData.LegalEntityId == 3) && $route.name.includes('.detail') ) && userData.RoleDetails.IsReadSellingPriceInventory">
  877. <!-- Harga Reguler -->
  878. <div class="col-lg-12" style="margin-bottom: 20px;">
  879. <h5 v-if="$route.name.includes('.detail')">Harga Bundle Special Komisi Citra Millenial</h5>
  880. </div>
  881.  
  882. <!-- Harga Barang Kondisi 100% field -->
  883. <div class="col-lg-3" v-if="$route.name.includes('.detail') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsReadSellingPriceBundle)">
  884. <div class="form-group form-float">
  885. <label for="oneHundredPrice" class="form-label" style="color: black;">Harga Jual Komisi Kondisi 100% </label>
  886. <!-- <input v-if="!$route.name.includes('.detail')" placeholder="Ketik harga jual kondisi 100%..." id="oneHundredPrice" type="text" v-model="inventory.Price100" name="OneHundredPrice" required class="validate form-control" style="border: 1px solid black;"> -->
  887. <div v-if="$route.name.includes('.detail') && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ (bundle.CimenSpecialPrice100 > 20000 ? (bundle.CimenSpecialPrice100 - 20000) : bundle.CimenSpecialPrice100) | currency }}</div>
  888. </div>
  889. </div>
  890.  
  891. <!-- Harga Barang Kondisi 90% field -->
  892. <div class="col-lg-3" v-if="$route.name.includes('.detail') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsReadSellingPriceBundle)">
  893. <div class="form-group form-float">
  894. <label for="sixtyPrice" class="form-label" style="color: black;">Harga Jual Komisi Kondisi 90% </label>
  895. <div v-if="$route.name.includes('.detail') && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ (bundle.CimenSpecialPrice90 > 20000 ? (bundle.CimenSpecialPrice90 - 20000) : bundle.CimenSpecialPrice90) | currency }}</div>
  896. </div>
  897. </div>
  898.  
  899. <!-- Harga Barang Kondisi 60% field -->
  900. <div class="col-lg-3" v-if="$route.name.includes('.detail') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsReadSellingPriceBundle)">
  901. <div class="form-group form-float">
  902. <label class="form-label" style="color: black;">Harga Jual Komisi Kondisi 60% </label>
  903. <div v-if="$route.name.includes('.detail') && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ (bundle.CimenSpecialPrice60 > 20000 ? (bundle.CimenSpecialPrice60 - 20000) : bundle.CimenSpecialPrice60) | currency }}</div>
  904. </div>
  905. </div>
  906.  
  907. <!-- Harga Barang Kondisi 30% field -->
  908. <div class="col-lg-3" v-if="$route.name.includes('.detail') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsReadSellingPriceBundle)">
  909. <div class="form-group form-float">
  910. <label for="thirtyPrice" class="form-label" style="color: black;">Harga Jual Komisi Kondisi dibawah 30% </label>
  911. <div v-if="$route.name.includes('.detail') && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ (bundle.CimenSpecialPrice30 > 20000 ? (bundle.CimenSpecialPrice30 - 20000) : bundle.CimenSpecialPrice30) | currency }}</div>
  912. </div>
  913. </div>
  914. </div>
  915.  
  916. <hr v-if="!$route.name.includes('.create')" />
  917.  
  918. <!-- Harga Bundle Promo Ciprat -->
  919. <div class="row" v-if="!$route.name.includes('.create') && (userData.Id == 1 || (userData.LegalEntityId != 4 && userData.LegalEntityId != 5 && userData.LegalEntityId != 6))">
  920. <div class="col-lg-12" style="margin-bottom: 20px;">
  921. <h5 v-if="!$route.name.includes('.create')">Harga Bundle Promo Citra Pratama</h5>
  922. </div>
  923.  
  924. <div class="col-lg-3">
  925. <div class="form-group form-float">
  926. <label for="date" v-if="!$route.name.includes('.create') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsUpdateSellingPriceBundle)" class="form-label" style="color: black;">Harga Promo Bundle Kondisi 100% </label>
  927. <money v-if="($route.name.includes('.edit') || $route.name.includes('.draft')) && userData.RoleDetails.IsUpdateSellingPriceBundle" placeholder="Ketik harga bundle..." id="date" type="text" v-model="bundle.PromoPrice100" required class="validate form-control" style="border: 1px solid black;"></money>
  928. <div v-if="($route.name.includes('.detail')) && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ bundle.PromoPrice100 | currency }}</div>
  929. </div>
  930. </div>
  931. <div class="col-lg-3">
  932. <div class="form-group form-float">
  933. <label for="date" v-if="!$route.name.includes('.create') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsUpdateSellingPriceBundle)" class="form-label" style="color: black;">Harga Promo Bundle Kondisi 90% </label>
  934. <money v-if="($route.name.includes('.edit') || $route.name.includes('.draft')) && userData.RoleDetails.IsUpdateSellingPriceBundle" placeholder="Ketik harga bundle..." id="date" type="text" v-model="bundle.PromoPrice90" required class="validate form-control" style="border: 1px solid black;"></money>
  935. <div v-if="($route.name.includes('.detail')) && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ bundle.PromoPrice90 | currency }}</div>
  936. </div>
  937. </div>
  938. <div class="col-lg-3">
  939. <div class="form-group form-float">
  940. <label for="date" v-if="!$route.name.includes('.create') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsUpdateSellingPriceBundle)" class="form-label" style="color: black;">Harga Promo Bundle Kondisi 60% </label>
  941. <money v-if="($route.name.includes('.edit') || $route.name.includes('.draft')) && userData.RoleDetails.IsUpdateSellingPriceBundle" placeholder="Ketik harga bundle..." id="date" type="text" v-model="bundle.PromoPrice60" required class="validate form-control" style="border: 1px solid black;"></money>
  942. <div v-if="($route.name.includes('.detail')) && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ bundle.PromoPrice60 | currency }}</div>
  943. </div>
  944. </div>
  945. <div class="col-lg-3">
  946. <div class="form-group form-float">
  947. <label for="date" v-if="!$route.name.includes('.create') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsUpdateSellingPriceBundle)" class="form-label" style="color: black;">Harga Promo Bundle Kondisi 30% </label>
  948. <money v-if="($route.name.includes('.edit') || $route.name.includes('.draft')) && userData.RoleDetails.IsUpdateSellingPriceBundle" placeholder="Ketik harga bundle..." id="date" type="text" v-model="bundle.PromoPrice30" required class="validate form-control" style="border: 1px solid black;"></money>
  949. <div v-if="($route.name.includes('.detail')) && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ bundle.PromoPrice30 | currency }}</div>
  950. </div>
  951. </div>
  952. </div>
  953.  
  954. <!-- Harga Bundle Promo Cipen -->
  955. <div class="row" v-if="!$route.name.includes('.create') && (userData.Id == 1 || userData.LegalEntityId == 1 || userData.LegalEntityId == 2 || userData.LegalEntityId == 4 || userData.LegalEntityId == 6)">
  956. <div class="col-lg-12" style="margin-bottom: 20px;" v-if="userData.Id == 1 || userData.LegalEntityId == 1|| userData.LegalEntityId == 4">
  957. <h5 v-if="!$route.name.includes('.create')">Harga Bundle Promo Citra Pesona</h5>
  958. </div>
  959. <div class="col-lg-12" style="margin-bottom: 20px;" v-if="userData.LegalEntityId == 6">
  960. <h5 v-if="!$route.name.includes('.create')">Harga Bundle Promo Citra Kencana</h5>
  961. </div>
  962.  
  963. <div class="col-lg-3">
  964. <div class="form-group form-float">
  965. <label for="date" v-if="!$route.name.includes('.create') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsUpdateSellingPriceBundle)" class="form-label" style="color: black;">Harga Promo Bundle Kondisi 100% </label>
  966. <money v-if="($route.name.includes('.edit') || $route.name.includes('.draft')) && userData.RoleDetails.IsUpdateSellingPriceBundle" placeholder="Ketik harga bundle..." id="date" type="text" v-model="bundle.CipenPromoPrice100" required class="validate form-control" style="border: 1px solid black;"></money>
  967. <div v-if="($route.name.includes('.detail')) && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ bundle.CipenPromoPrice100 | currency }}</div>
  968. </div>
  969. </div>
  970. <div class="col-lg-3">
  971. <div class="form-group form-float">
  972. <label for="date" v-if="!$route.name.includes('.create') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsUpdateSellingPriceBundle)" class="form-label" style="color: black;">Harga Promo Bundle Kondisi 90% </label>
  973. <money v-if="($route.name.includes('.edit') || $route.name.includes('.draft')) && userData.RoleDetails.IsUpdateSellingPriceBundle" placeholder="Ketik harga bundle..." id="date" type="text" v-model="bundle.CipenPromoPrice90" required class="validate form-control" style="border: 1px solid black;"></money>
  974. <div v-if="($route.name.includes('.detail')) && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ bundle.CipenPromoPrice90 | currency }}</div>
  975. </div>
  976. </div>
  977. <div class="col-lg-3">
  978. <div class="form-group form-float">
  979. <label for="date" v-if="!$route.name.includes('.create') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsUpdateSellingPriceBundle)" class="form-label" style="color: black;">Harga Promo Bundle Kondisi 60% </label>
  980. <money v-if="($route.name.includes('.edit') || $route.name.includes('.draft')) && userData.RoleDetails.IsUpdateSellingPriceBundle" placeholder="Ketik harga bundle..." id="date" type="text" v-model="bundle.CipenPromoPrice60" required class="validate form-control" style="border: 1px solid black;"></money>
  981. <div v-if="($route.name.includes('.detail')) && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ bundle.CipenPromoPrice60 | currency }}</div>
  982. </div>
  983. </div>
  984. <div class="col-lg-3">
  985. <div class="form-group form-float">
  986. <label for="date" v-if="!$route.name.includes('.create') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsUpdateSellingPriceBundle)" class="form-label" style="color: black;">Harga Promo Bundle Kondisi 30% </label>
  987. <money v-if="($route.name.includes('.edit') || $route.name.includes('.draft')) && userData.RoleDetails.IsUpdateSellingPriceBundle" placeholder="Ketik harga bundle..." id="date" type="text" v-model="bundle.CipenPromoPrice30" required class="validate form-control" style="border: 1px solid black;"></money>
  988. <div v-if="($route.name.includes('.detail')) && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ bundle.CipenPromoPrice30 | currency }}</div>
  989. </div>
  990. </div>
  991. </div>
  992.  
  993. <!-- Harga Bundle Promo Cibag -->
  994. <div class="row" v-if="!$route.name.includes('.create') && (userData.Id == 1 || userData.LegalEntityId == 1 || userData.LegalEntityId == 2 || userData.LegalEntityId == 5)">
  995. <div class="col-lg-12" style="margin-bottom: 20px;">
  996. <h5 v-if="!$route.name.includes('.create')">Harga Bundle Promo Citra Bahagia</h5>
  997. </div>
  998.  
  999. <div class="col-lg-3">
  1000. <div class="form-group form-float">
  1001. <label for="date" v-if="!$route.name.includes('.create') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsUpdateSellingPriceBundle)" class="form-label" style="color: black;">Harga Promo Bundle Kondisi 100% </label>
  1002. <money v-if="($route.name.includes('.edit') || $route.name.includes('.draft')) && userData.RoleDetails.IsUpdateSellingPriceBundle" placeholder="Ketik harga bundle..." id="date" type="text" v-model="bundle.CikenPromoPrice100" required class="validate form-control" style="border: 1px solid black;"></money>
  1003. <div v-if="($route.name.includes('.detail')) && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ bundle.CikenPromoPrice100 | currency }}</div>
  1004. </div>
  1005. </div>
  1006. <div class="col-lg-3">
  1007. <div class="form-group form-float">
  1008. <label for="date" v-if="!$route.name.includes('.create') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsUpdateSellingPriceBundle)" class="form-label" style="color: black;">Harga Promo Bundle Kondisi 90% </label>
  1009. <money v-if="($route.name.includes('.edit') || $route.name.includes('.draft')) && userData.RoleDetails.IsUpdateSellingPriceBundle" placeholder="Ketik harga bundle..." id="date" type="text" v-model="bundle.CikenPromoPrice90" required class="validate form-control" style="border: 1px solid black;"></money>
  1010. <div v-if="($route.name.includes('.detail')) && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ bundle.CikenPromoPrice90 | currency }}</div>
  1011. </div>
  1012. </div>
  1013. <div class="col-lg-3">
  1014. <div class="form-group form-float">
  1015. <label for="date" v-if="!$route.name.includes('.create') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsUpdateSellingPriceBundle)" class="form-label" style="color: black;">Harga Promo Bundle Kondisi 60% </label>
  1016. <money v-if="($route.name.includes('.edit') || $route.name.includes('.draft')) && userData.RoleDetails.IsUpdateSellingPriceBundle" placeholder="Ketik harga bundle..." id="date" type="text" v-model="bundle.CikenPromoPrice60" required class="validate form-control" style="border: 1px solid black;"></money>
  1017. <div v-if="($route.name.includes('.detail')) && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ bundle.CikenPromoPrice60 | currency }}</div>
  1018. </div>
  1019. </div>
  1020. <div class="col-lg-3">
  1021. <div class="form-group form-float">
  1022. <label for="date" v-if="!$route.name.includes('.create') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsUpdateSellingPriceBundle)" class="form-label" style="color: black;">Harga Promo Bundle Kondisi 30% </label>
  1023. <money v-if="($route.name.includes('.edit') || $route.name.includes('.draft')) && userData.RoleDetails.IsUpdateSellingPriceBundle" placeholder="Ketik harga bundle..." id="date" type="text" v-model="bundle.CikenPromoPrice30" required class="validate form-control" style="border: 1px solid black;"></money>
  1024. <div v-if="($route.name.includes('.detail')) && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ bundle.CikenPromoPrice30 | currency }}</div>
  1025. </div>
  1026. </div>
  1027. </div>
  1028.  
  1029. <!-- Harga Bundle Promo Cimil -->
  1030. <div class="row" v-if="!$route.name.includes('.create') && (userData.Id == 1 || userData.LegalEntityId == 1 || userData.LegalEntityId == 2 || userData.LegalEntityId == 3)">
  1031. <div class="col-lg-12" style="margin-bottom: 20px;">
  1032. <h5 v-if="!$route.name.includes('.create')">Harga Bundle Promo Citra Millenial</h5>
  1033. </div>
  1034.  
  1035. <div class="col-lg-3">
  1036. <div class="form-group form-float">
  1037. <label for="date" v-if="!$route.name.includes('.create') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsUpdateSellingPriceBundle)" class="form-label" style="color: black;">Harga Promo Bundle Kondisi 100% </label>
  1038. <money v-if="($route.name.includes('.edit') || $route.name.includes('.draft')) && userData.RoleDetails.IsUpdateSellingPriceBundle" placeholder="Ketik harga bundle..." id="date" type="text" v-model="bundle.CimenPromoPrice100" required class="validate form-control" style="border: 1px solid black;"></money>
  1039. <div v-if="($route.name.includes('.detail')) && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ bundle.CimenPromoPrice100 | currency }}</div>
  1040. </div>
  1041. </div>
  1042. <div class="col-lg-3">
  1043. <div class="form-group form-float">
  1044. <label for="date" v-if="!$route.name.includes('.create') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsUpdateSellingPriceBundle)" class="form-label" style="color: black;">Harga Promo Bundle Kondisi 90% </label>
  1045. <money v-if="($route.name.includes('.edit') || $route.name.includes('.draft')) && userData.RoleDetails.IsUpdateSellingPriceBundle" placeholder="Ketik harga bundle..." id="date" type="text" v-model="bundle.CimenPromoPrice90" required class="validate form-control" style="border: 1px solid black;"></money>
  1046. <div v-if="($route.name.includes('.detail')) && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ bundle.CimenPromoPrice90 | currency }}</div>
  1047. </div>
  1048. </div>
  1049. <div class="col-lg-3">
  1050. <div class="form-group form-float">
  1051. <label for="date" v-if="!$route.name.includes('.create') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsUpdateSellingPriceBundle)" class="form-label" style="color: black;">Harga Promo Bundle Kondisi 60% </label>
  1052. <money v-if="($route.name.includes('.edit') || $route.name.includes('.draft')) && userData.RoleDetails.IsUpdateSellingPriceBundle" placeholder="Ketik harga bundle..." id="date" type="text" v-model="bundle.CimenPromoPrice60" required class="validate form-control" style="border: 1px solid black;"></money>
  1053. <div v-if="($route.name.includes('.detail')) && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ bundle.CimenPromoPrice60 | currency }}</div>
  1054. </div>
  1055. </div>
  1056. <div class="col-lg-3">
  1057. <div class="form-group form-float">
  1058. <label for="date" v-if="!$route.name.includes('.create') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsUpdateSellingPriceBundle)" class="form-label" style="color: black;">Harga Promo Bundle Kondisi 30% </label>
  1059. <money v-if="($route.name.includes('.edit') || $route.name.includes('.draft')) && userData.RoleDetails.IsUpdateSellingPriceBundle" placeholder="Ketik harga bundle..." id="date" type="text" v-model="bundle.CimenPromoPrice30" required class="validate form-control" style="border: 1px solid black;"></money>
  1060. <div v-if="($route.name.includes('.detail')) && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ bundle.CimenPromoPrice30 | currency }}</div>
  1061. </div>
  1062. </div>
  1063. </div>
  1064.  
  1065. <!-- Harga Bundle Special Komisi Ciprat -->
  1066. <div class="row" v-if="!$route.name.includes('.create') && ((userData.Id == 1 || (userData.LegalEntityId != 4 && userData.LegalEntityId != 5 && userData.LegalEntityId != 6)) && $route.name.includes('.detail') ) && userData.RoleDetails.IsReadSellingPriceInventory">
  1067. <!-- Harga Reguler -->
  1068. <div class="col-lg-12" style="margin-bottom: 20px;">
  1069. <h5 v-if="$route.name.includes('.detail')">Harga Bundle Special Komisi Citra Pratama</h5>
  1070. </div>
  1071.  
  1072. <!-- Harga Barang Kondisi 100% field -->
  1073. <div class="col-lg-3" v-if="$route.name.includes('.detail') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsUpdateSellingPriceBundle)">
  1074. <div class="form-group form-float">
  1075. <label for="oneHundredPrice" class="form-label" style="color: black;">Harga Jual Komisi Kondisi 100% </label>
  1076. <!-- <input v-if="!$route.name.includes('.detail')" placeholder="Ketik harga jual kondisi 100%..." id="oneHundredPrice" type="text" v-model="inventory.Price100" name="OneHundredPrice" required class="validate form-control" style="border: 1px solid black;"> -->
  1077. <div v-if="$route.name.includes('.detail') && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ (bundle.PromoPrice100 > 20000 ? (bundle.PromoPrice100 - 20000) : bundle.PromoPrice100) | currency }}</div>
  1078. </div>
  1079. </div>
  1080.  
  1081. <!-- Harga Barang Kondisi 90% field -->
  1082. <div class="col-lg-3" v-if="$route.name.includes('.detail') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsReadSellingPriceBundle)">
  1083. <div class="form-group form-float">
  1084. <label for="sixtyPrice" class="form-label" style="color: black;">Harga Jual Komisi Kondisi 90% </label>
  1085. <div v-if="$route.name.includes('.detail') && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ (bundle.PromoPrice90 > 20000 ? (bundle.PromoPrice90 - 20000) : bundle.PromoPrice90) | currency }}</div>
  1086. </div>
  1087. </div>
  1088.  
  1089. <!-- Harga Barang Kondisi 60% field -->
  1090. <div class="col-lg-3" v-if="$route.name.includes('.detail') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsReadSellingPriceBundle)">
  1091. <div class="form-group form-float">
  1092. <label class="form-label" style="color: black;">Harga Jual Komisi Kondisi 60% </label>
  1093. <div v-if="$route.name.includes('.detail') && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ (bundle.PromoPrice60 > 20000 ? (bundle.PromoPrice60 - 20000) : bundle.PromoPrice60) | currency }}</div>
  1094. </div>
  1095. </div>
  1096.  
  1097. <!-- Harga Barang Kondisi 30% field -->
  1098. <div class="col-lg-3" v-if="$route.name.includes('.detail') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsReadSellingPriceBundle)">
  1099. <div class="form-group form-float">
  1100. <label for="thirtyPrice" class="form-label" style="color: black;">Harga Jual Komisi Kondisi dibawah 30% </label>
  1101. <div v-if="$route.name.includes('.detail') && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ (bundle.PromoPrice30 > 20000 ? (bundle.PromoPrice30 - 20000) : bundle.PromoPrice30) | currency }}</div>
  1102. </div>
  1103. </div>
  1104. </div>
  1105.  
  1106. <!-- Harga Bundle Special Komisi Cipen -->
  1107. <div class="row" v-if="!$route.name.includes('.create') && ((userData.Id == 1 || userData.LegalEntityId == 1 || userData.LegalEntityId == 2 || userData.LegalEntityId == 4 || userData.LegalEntityId == 6) && $route.name.includes('.detail') ) && userData.RoleDetails.IsReadSellingPriceInventory">
  1108. <!-- Harga Reguler -->
  1109. <div class="col-lg-12" style="margin-bottom: 20px;" v-if="userData.Id == 1 || userData.LegalEntityId == 1|| userData.LegalEntityId == 4">
  1110. <h5 v-if="$route.name.includes('.detail')">Harga Bundle Special Komisi Citra Pesona</h5>
  1111. </div>
  1112. <div class="col-lg-12" style="margin-bottom: 20px;" v-if="userData.LegalEntityId == 6">
  1113. <h5 v-if="$route.name.includes('.detail')">Harga Bundle Special Komisi Citra Kencana</h5>
  1114. </div>
  1115.  
  1116. <!-- Harga Barang Kondisi 100% field -->
  1117. <div class="col-lg-3" v-if="$route.name.includes('.detail') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsReadSellingPriceBundle)">
  1118. <div class="form-group form-float">
  1119. <label for="oneHundredPrice" class="form-label" style="color: black;">Harga Jual Komisi Kondisi 100% </label>
  1120. <!-- <input v-if="!$route.name.includes('.detail')" placeholder="Ketik harga jual kondisi 100%..." id="oneHundredPrice" type="text" v-model="inventory.Price100" name="OneHundredPrice" required class="validate form-control" style="border: 1px solid black;"> -->
  1121. <div v-if="$route.name.includes('.detail') && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ (bundle.CipenPromoPrice100 > 20000 ? (bundle.CipenPromoPrice100 - 20000) : bundle.CipenPromoPrice100) | currency }}</div>
  1122. </div>
  1123. </div>
  1124.  
  1125. <!-- Harga Barang Kondisi 90% field -->
  1126. <div class="col-lg-3" v-if="$route.name.includes('.detail') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsReadSellingPriceBundle)">
  1127. <div class="form-group form-float">
  1128. <label for="sixtyPrice" class="form-label" style="color: black;">Harga Jual Komisi Kondisi 90% </label>
  1129. <div v-if="$route.name.includes('.detail') && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ (bundle.CipenPromoPrice90 > 20000 ? (bundle.CipenPromoPrice90 - 20000) : bundle.CipenPromoPrice90) | currency }}</div>
  1130. </div>
  1131. </div>
  1132.  
  1133. <!-- Harga Barang Kondisi 60% field -->
  1134. <div class="col-lg-3" v-if="$route.name.includes('.detail') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsReadSellingPriceBundle)">
  1135. <div class="form-group form-float">
  1136. <label class="form-label" style="color: black;">Harga Jual Komisi Kondisi 60% </label>
  1137. <div v-if="$route.name.includes('.detail') && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ (bundle.CipenPromoPrice60 > 20000 ? (bundle.CipenPromoPrice60 - 20000) : bundle.CipenPromoPrice60) | currency }}</div>
  1138. </div>
  1139. </div>
  1140.  
  1141. <!-- Harga Barang Kondisi 30% field -->
  1142. <div class="col-lg-3" v-if="$route.name.includes('.detail') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsReadSellingPriceBundle)">
  1143. <div class="form-group form-float">
  1144. <label for="thirtyPrice" class="form-label" style="color: black;">Harga Jual Komisi Kondisi dibawah 30% </label>
  1145. <div v-if="$route.name.includes('.detail') && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ (bundle.CipenPromoPrice30 > 20000 ? (bundle.CipenPromoPrice30 - 20000) : bundle.CipenPromoPrice30) | currency }}</div>
  1146. </div>
  1147. </div>
  1148. </div>
  1149.  
  1150. <!-- Harga Bundle Special Komisi Cibag -->
  1151. <div class="row" v-if="!$route.name.includes('.create') && ((userData.Id == 1 || userData.LegalEntityId == 1 || userData.LegalEntityId == 2 || userData.LegalEntityId == 5) && $route.name.includes('.detail') ) && userData.RoleDetails.IsReadSellingPriceInventory">
  1152. <!-- Harga Reguler -->
  1153. <div class="col-lg-12" style="margin-bottom: 20px;">
  1154. <h5 v-if="$route.name.includes('.detail')">Harga Bundle Special Komisi Citra Bahagia</h5>
  1155. </div>
  1156.  
  1157. <!-- Harga Barang Kondisi 100% field -->
  1158. <div class="col-lg-3" v-if="$route.name.includes('.detail') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsReadSellingPriceBundle)">
  1159. <div class="form-group form-float">
  1160. <label for="oneHundredPrice" class="form-label" style="color: black;">Harga Jual Komisi Kondisi 100% </label>
  1161. <!-- <input v-if="!$route.name.includes('.detail')" placeholder="Ketik harga jual kondisi 100%..." id="oneHundredPrice" type="text" v-model="inventory.Price100" name="OneHundredPrice" required class="validate form-control" style="border: 1px solid black;"> -->
  1162. <div v-if="$route.name.includes('.detail') && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ (bundle.CikenPromoPrice100 > 20000 ? (bundle.CikenPromoPrice100 - 20000) : bundle.CikenPromoPrice100) | currency }}</div>
  1163. </div>
  1164. </div>
  1165.  
  1166. <!-- Harga Barang Kondisi 90% field -->
  1167. <div class="col-lg-3" v-if="$route.name.includes('.detail') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsReadSellingPriceBundle)">
  1168. <div class="form-group form-float">
  1169. <label for="sixtyPrice" class="form-label" style="color: black;">Harga Jual Komisi Kondisi 90% </label>
  1170. <div v-if="$route.name.includes('.detail') && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ (bundle.CikenPromoPrice90 > 20000 ? (bundle.CikenPromoPrice90 - 20000) : bundle.CikenPromoPrice90) | currency }}</div>
  1171. </div>
  1172. </div>
  1173.  
  1174. <!-- Harga Barang Kondisi 60% field -->
  1175. <div class="col-lg-3" v-if="$route.name.includes('.detail') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsReadSellingPriceBundle)">
  1176. <div class="form-group form-float">
  1177. <label class="form-label" style="color: black;">Harga Jual Komisi Kondisi 60% </label>
  1178. <div v-if="$route.name.includes('.detail') && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ (bundle.CikenPromoPrice60 > 20000 ? (bundle.CikenPromoPrice60 - 20000) : bundle.CikenPromoPrice60) | currency }}</div>
  1179. </div>
  1180. </div>
  1181.  
  1182. <!-- Harga Barang Kondisi 30% field -->
  1183. <div class="col-lg-3" v-if="$route.name.includes('.detail') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsReadSellingPriceBundle)">
  1184. <div class="form-group form-float">
  1185. <label for="thirtyPrice" class="form-label" style="color: black;">Harga Jual Komisi Kondisi dibawah 30% </label>
  1186. <div v-if="$route.name.includes('.detail') && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ (bundle.CikenPromoPrice30 > 20000 ? (bundle.CikenPromoPrice30 - 20000) : bundle.CikenPromoPrice30) | currency }}</div>
  1187. </div>
  1188. </div>
  1189. </div>
  1190.  
  1191. <!-- Harga Bundle Special Komisi Cimil -->
  1192. <div class="row" v-if="!$route.name.includes('.create') && ((userData.Id == 1 || userData.LegalEntityId == 1 || userData.LegalEntityId == 2 || userData.LegalEntityId == 3) && $route.name.includes('.detail') ) && userData.RoleDetails.IsReadSellingPriceInventory">
  1193. <!-- Harga Reguler -->
  1194. <div class="col-lg-12" style="margin-bottom: 20px;">
  1195. <h5 v-if="$route.name.includes('.detail')">Harga Bundle Special Komisi Citra Millenial</h5>
  1196. </div>
  1197.  
  1198. <!-- Harga Barang Kondisi 100% field -->
  1199. <div class="col-lg-3" v-if="$route.name.includes('.detail') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsReadSellingPriceBundle)">
  1200. <div class="form-group form-float">
  1201. <label for="oneHundredPrice" class="form-label" style="color: black;">Harga Jual Komisi Kondisi 100% </label>
  1202. <!-- <input v-if="!$route.name.includes('.detail')" placeholder="Ketik harga jual kondisi 100%..." id="oneHundredPrice" type="text" v-model="inventory.Price100" name="OneHundredPrice" required class="validate form-control" style="border: 1px solid black;"> -->
  1203. <div v-if="$route.name.includes('.detail') && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ (bundle.CimenPromoPrice100 > 20000 ? (bundle.CimenPromoPrice100 - 20000) : bundle.CimenPromoPrice100) | currency }}</div>
  1204. </div>
  1205. </div>
  1206.  
  1207. <!-- Harga Barang Kondisi 90% field -->
  1208. <div class="col-lg-3" v-if="$route.name.includes('.detail') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsReadSellingPriceBundle)">
  1209. <div class="form-group form-float">
  1210. <label for="sixtyPrice" class="form-label" style="color: black;">Harga Jual Komisi Kondisi 90% </label>
  1211. <div v-if="$route.name.includes('.detail') && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ (bundle.CimenPromoPrice90 > 20000 ? (bundle.CimenPromoPrice90 - 20000) : bundle.CimenPromoPrice90) | currency }}</div>
  1212. </div>
  1213. </div>
  1214.  
  1215. <!-- Harga Barang Kondisi 60% field -->
  1216. <div class="col-lg-3" v-if="$route.name.includes('.detail') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsReadSellingPriceBundle)">
  1217. <div class="form-group form-float">
  1218. <label class="form-label" style="color: black;">Harga Jual Komisi Kondisi 60% </label>
  1219. <div v-if="$route.name.includes('.detail') && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ (bundle.CimenPromoPrice60 > 20000 ? (bundle.CimenPromoPrice60 - 20000) : bundle.CimenPromoPrice60) | currency }}</div>
  1220. </div>
  1221. </div>
  1222.  
  1223. <!-- Harga Barang Kondisi 30% field -->
  1224. <div class="col-lg-3" v-if="$route.name.includes('.detail') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsReadSellingPriceBundle)">
  1225. <div class="form-group form-float">
  1226. <label for="thirtyPrice" class="form-label" style="color: black;">Harga Jual Komisi Kondisi dibawah 30% </label>
  1227. <div v-if="$route.name.includes('.detail') && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ (bundle.CimenPromoPrice30 > 20000 ? (bundle.CimenPromoPrice30 - 20000) : bundle.CimenPromoPrice30) | currency }}</div>
  1228. </div>
  1229. </div>
  1230. </div>
  1231.  
  1232. <hr v-if="!$route.name.includes('.create')" />
  1233.  
  1234. <!-- Harga Bundle Promo Combo Ciprat -->
  1235. <div class="row" v-if="!$route.name.includes('.create') && (userData.Id == 1 || (userData.LegalEntityId != 4 && userData.LegalEntityId != 5 && userData.LegalEntityId != 6))">
  1236. <div class="col-lg-12" style="margin-bottom: 20px;">
  1237. <h5 v-if="!$route.name.includes('.create')">Harga Bundle Promo Combo Citra Pratama</h5>
  1238. </div>
  1239.  
  1240. <div class="col-lg-3">
  1241. <div class="form-group form-float">
  1242. <label for="date" v-if="!$route.name.includes('.create') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsUpdateSellingPriceBundle)" class="form-label" style="color: black;">Harga Promo Combo Bundle Kondisi 100% </label>
  1243. <money v-if="($route.name.includes('.edit') || $route.name.includes('.draft')) && userData.RoleDetails.IsUpdateSellingPriceBundle" placeholder="Ketik harga bundle..." id="date" type="text" v-model="bundle.ComboPrice100" required class="validate form-control" style="border: 1px solid black;"></money>
  1244. <div v-if="($route.name.includes('.detail')) && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ bundle.ComboPrice100 | currency }}</div>
  1245. </div>
  1246. </div>
  1247. <div class="col-lg-3">
  1248. <div class="form-group form-float">
  1249. <label for="date" v-if="!$route.name.includes('.create') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsUpdateSellingPriceBundle)" class="form-label" style="color: black;">Harga Promo Combo Bundle Kondisi 90% </label>
  1250. <money v-if="($route.name.includes('.edit') || $route.name.includes('.draft')) && userData.RoleDetails.IsUpdateSellingPriceBundle" placeholder="Ketik harga bundle..." id="date" type="text" v-model="bundle.ComboPrice90" required class="validate form-control" style="border: 1px solid black;"></money>
  1251. <div v-if="($route.name.includes('.detail')) && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ bundle.ComboPrice90 | currency }}</div>
  1252. </div>
  1253. </div>
  1254. <div class="col-lg-3">
  1255. <div class="form-group form-float">
  1256. <label for="date" v-if="!$route.name.includes('.create') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsUpdateSellingPriceBundle)" class="form-label" style="color: black;">Harga Promo Combo Bundle Kondisi 60% </label>
  1257. <money v-if="($route.name.includes('.edit') || $route.name.includes('.draft')) && userData.RoleDetails.IsUpdateSellingPriceBundle" placeholder="Ketik harga bundle..." id="date" type="text" v-model="bundle.ComboPrice60" required class="validate form-control" style="border: 1px solid black;"></money>
  1258. <div v-if="($route.name.includes('.detail')) && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ bundle.ComboPrice60 | currency }}</div>
  1259. </div>
  1260. </div>
  1261. <div class="col-lg-3">
  1262. <div class="form-group form-float">
  1263. <label for="date" v-if="!$route.name.includes('.create') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsUpdateSellingPriceBundle)" class="form-label" style="color: black;">Harga Promo Combo Bundle Kondisi 30% </label>
  1264. <money v-if="($route.name.includes('.edit') || $route.name.includes('.draft')) && userData.RoleDetails.IsUpdateSellingPriceBundle" placeholder="Ketik harga bundle..." id="date" type="text" v-model="bundle.ComboPrice30" required class="validate form-control" style="border: 1px solid black;"></money>
  1265. <div v-if="($route.name.includes('.detail')) && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ bundle.ComboPrice30 | currency }}</div>
  1266. </div>
  1267. </div>
  1268. </div>
  1269.  
  1270. <!-- Harga Bundle Promo Combo Cipen -->
  1271. <div class="row" v-if="!$route.name.includes('.create') && (userData.Id == 1 || userData.LegalEntityId == 1 || userData.LegalEntityId == 2 || userData.LegalEntityId == 4 || userData.LegalEntityId == 6)">
  1272. <div class="col-lg-12" style="margin-bottom: 20px;" v-if="userData.Id == 1 || userData.LegalEntityId == 1|| userData.LegalEntityId == 4">
  1273. <h5 v-if="!$route.name.includes('.create')">Harga Bundle Promo Combo Citra Pesona</h5>
  1274. </div>
  1275. <div class="col-lg-12" style="margin-bottom: 20px;" v-if="userData.LegalEntityId == 6">
  1276. <h5 v-if="!$route.name.includes('.create')">Harga Bundle Promo Combo Citra Kencana</h5>
  1277. </div>
  1278.  
  1279. <div class="col-lg-3">
  1280. <div class="form-group form-float">
  1281. <label for="date" v-if="!$route.name.includes('.create') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsUpdateSellingPriceBundle)" class="form-label" style="color: black;">Harga Promo Combo Bundle Kondisi 100% </label>
  1282. <money v-if="($route.name.includes('.edit') || $route.name.includes('.draft')) && userData.RoleDetails.IsUpdateSellingPriceBundle" placeholder="Ketik harga bundle..." id="date" type="text" v-model="bundle.CipenComboPrice100" required class="validate form-control" style="border: 1px solid black;"></money>
  1283. <div v-if="($route.name.includes('.detail')) && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ bundle.CipenComboPrice100 | currency }}</div>
  1284. </div>
  1285. </div>
  1286. <div class="col-lg-3">
  1287. <div class="form-group form-float">
  1288. <label for="date" v-if="!$route.name.includes('.create') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsUpdateSellingPriceBundle)" class="form-label" style="color: black;">Harga Promo Combo Bundle Kondisi 90% </label>
  1289. <money v-if="($route.name.includes('.edit') || $route.name.includes('.draft')) && userData.RoleDetails.IsUpdateSellingPriceBundle" placeholder="Ketik harga bundle..." id="date" type="text" v-model="bundle.CipenComboPrice90" required class="validate form-control" style="border: 1px solid black;"></money>
  1290. <div v-if="($route.name.includes('.detail')) && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ bundle.CipenComboPrice90 | currency }}</div>
  1291. </div>
  1292. </div>
  1293. <div class="col-lg-3">
  1294. <div class="form-group form-float">
  1295. <label for="date" v-if="!$route.name.includes('.create') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsUpdateSellingPriceBundle)" class="form-label" style="color: black;">Harga Promo Combo Bundle Kondisi 60% </label>
  1296. <money v-if="($route.name.includes('.edit') || $route.name.includes('.draft')) && userData.RoleDetails.IsUpdateSellingPriceBundle" placeholder="Ketik harga bundle..." id="date" type="text" v-model="bundle.CipenComboPrice60" required class="validate form-control" style="border: 1px solid black;"></money>
  1297. <div v-if="($route.name.includes('.detail')) && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ bundle.CipenComboPrice60 | currency }}</div>
  1298. </div>
  1299. </div>
  1300. <div class="col-lg-3">
  1301. <div class="form-group form-float">
  1302. <label for="date" v-if="!$route.name.includes('.create') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsUpdateSellingPriceBundle)" class="form-label" style="color: black;">Harga Promo Combo Bundle Kondisi 30% </label>
  1303. <money v-if="($route.name.includes('.edit') || $route.name.includes('.draft')) && userData.RoleDetails.IsUpdateSellingPriceBundle" placeholder="Ketik harga bundle..." id="date" type="text" v-model="bundle.CipenComboPrice30" required class="validate form-control" style="border: 1px solid black;"></money>
  1304. <div v-if="($route.name.includes('.detail')) && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ bundle.CipenComboPrice30 | currency }}</div>
  1305. </div>
  1306. </div>
  1307. </div>
  1308.  
  1309. <!-- Harga Bundle Promo Combo Cibag -->
  1310. <div class="row" v-if="!$route.name.includes('.create') && (userData.Id == 1 || userData.LegalEntityId == 1 || userData.LegalEntityId == 2 || userData.LegalEntityId == 5)">
  1311. <div class="col-lg-12" style="margin-bottom: 20px;">
  1312. <h5 v-if="!$route.name.includes('.create')">Harga Bundle Promo Combo Citra Bahagia</h5>
  1313. </div>
  1314.  
  1315. <div class="col-lg-3">
  1316. <div class="form-group form-float">
  1317. <label for="date" v-if="!$route.name.includes('.create') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsUpdateSellingPriceBundle)" class="form-label" style="color: black;">Harga Promo Combo Bundle Kondisi 100% </label>
  1318. <money v-if="($route.name.includes('.edit') || $route.name.includes('.draft')) && userData.RoleDetails.IsUpdateSellingPriceBundle" placeholder="Ketik harga bundle..." id="date" type="text" v-model="bundle.CikenComboPrice100" required class="validate form-control" style="border: 1px solid black;"></money>
  1319. <div v-if="($route.name.includes('.detail')) && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ bundle.CikenComboPrice100 | currency }}</div>
  1320. </div>
  1321. </div>
  1322. <div class="col-lg-3">
  1323. <div class="form-group form-float">
  1324. <label for="date" v-if="!$route.name.includes('.create') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsUpdateSellingPriceBundle)" class="form-label" style="color: black;">Harga Promo Combo Bundle Kondisi 90% </label>
  1325. <money v-if="($route.name.includes('.edit') || $route.name.includes('.draft')) && userData.RoleDetails.IsUpdateSellingPriceBundle" placeholder="Ketik harga bundle..." id="date" type="text" v-model="bundle.CikenComboPrice90" required class="validate form-control" style="border: 1px solid black;"></money>
  1326. <div v-if="($route.name.includes('.detail')) && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ bundle.CikenComboPrice90 | currency }}</div>
  1327. </div>
  1328. </div>
  1329. <div class="col-lg-3">
  1330. <div class="form-group form-float">
  1331. <label for="date" v-if="!$route.name.includes('.create') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsUpdateSellingPriceBundle)" class="form-label" style="color: black;">Harga Promo Combo Bundle Kondisi 60% </label>
  1332. <money v-if="($route.name.includes('.edit') || $route.name.includes('.draft')) && userData.RoleDetails.IsUpdateSellingPriceBundle" placeholder="Ketik harga bundle..." id="date" type="text" v-model="bundle.CikenComboPrice60" required class="validate form-control" style="border: 1px solid black;"></money>
  1333. <div v-if="($route.name.includes('.detail')) && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ bundle.CikenComboPrice60 | currency }}</div>
  1334. </div>
  1335. </div>
  1336. <div class="col-lg-3">
  1337. <div class="form-group form-float">
  1338. <label for="date" v-if="!$route.name.includes('.create') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsUpdateSellingPriceBundle)" class="form-label" style="color: black;">Harga Promo Combo Bundle Kondisi 30% </label>
  1339. <money v-if="($route.name.includes('.edit') || $route.name.includes('.draft')) && userData.RoleDetails.IsUpdateSellingPriceBundle" placeholder="Ketik harga bundle..." id="date" type="text" v-model="bundle.CikenComboPrice30" required class="validate form-control" style="border: 1px solid black;"></money>
  1340. <div v-if="($route.name.includes('.detail')) && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ bundle.CikenComboPrice30 | currency }}</div>
  1341. </div>
  1342. </div>
  1343. </div>
  1344.  
  1345. <!-- Harga Bundle Promo Combo Cimil -->
  1346. <div class="row" v-if="!$route.name.includes('.create') && (userData.Id == 1 || userData.LegalEntityId == 1 || userData.LegalEntityId == 2 || userData.LegalEntityId == 3)">
  1347. <div class="col-lg-12" style="margin-bottom: 20px;">
  1348. <h5 v-if="!$route.name.includes('.create')">Harga Bundle Promo Combo Citra Millenial</h5>
  1349. </div>
  1350.  
  1351. <div class="col-lg-3">
  1352. <div class="form-group form-float">
  1353. <label for="date" v-if="!$route.name.includes('.create') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsUpdateSellingPriceBundle)" class="form-label" style="color: black;">Harga Promo Combo Bundle Kondisi 100% </label>
  1354. <money v-if="($route.name.includes('.edit') || $route.name.includes('.draft')) && userData.RoleDetails.IsUpdateSellingPriceBundle" placeholder="Ketik harga bundle..." id="date" type="text" v-model="bundle.CimenComboPrice100" required class="validate form-control" style="border: 1px solid black;"></money>
  1355. <div v-if="($route.name.includes('.detail')) && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ bundle.CimenComboPrice100 | currency }}</div>
  1356. </div>
  1357. </div>
  1358. <div class="col-lg-3">
  1359. <div class="form-group form-float">
  1360. <label for="date" v-if="!$route.name.includes('.create') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsUpdateSellingPriceBundle)" class="form-label" style="color: black;">Harga Promo Combo Bundle Kondisi 90% </label>
  1361. <money v-if="($route.name.includes('.edit') || $route.name.includes('.draft')) && userData.RoleDetails.IsUpdateSellingPriceBundle" placeholder="Ketik harga bundle..." id="date" type="text" v-model="bundle.CimenComboPrice90" required class="validate form-control" style="border: 1px solid black;"></money>
  1362. <div v-if="($route.name.includes('.detail')) && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ bundle.CimenComboPrice90 | currency }}</div>
  1363. </div>
  1364. </div>
  1365. <div class="col-lg-3">
  1366. <div class="form-group form-float">
  1367. <label for="date" v-if="!$route.name.includes('.create') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsUpdateSellingPriceBundle)" class="form-label" style="color: black;">Harga Promo Combo Bundle Kondisi 60% </label>
  1368. <money v-if="($route.name.includes('.edit') || $route.name.includes('.draft')) && userData.RoleDetails.IsUpdateSellingPriceBundle" placeholder="Ketik harga bundle..." id="date" type="text" v-model="bundle.CimenComboPrice60" required class="validate form-control" style="border: 1px solid black;"></money>
  1369. <div v-if="($route.name.includes('.detail')) && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ bundle.CimenComboPrice60 | currency }}</div>
  1370. </div>
  1371. </div>
  1372. <div class="col-lg-3">
  1373. <div class="form-group form-float">
  1374. <label for="date" v-if="!$route.name.includes('.create') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsUpdateSellingPriceBundle)" class="form-label" style="color: black;">Harga Promo Combo Bundle Kondisi 30% </label>
  1375. <money v-if="($route.name.includes('.edit') || $route.name.includes('.draft')) && userData.RoleDetails.IsUpdateSellingPriceBundle" placeholder="Ketik harga bundle..." id="date" type="text" v-model="bundle.CimenComboPrice30" required class="validate form-control" style="border: 1px solid black;"></money>
  1376. <div v-if="($route.name.includes('.detail')) && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ bundle.CimenComboPrice30 | currency }}</div>
  1377. </div>
  1378. </div>
  1379. </div>
  1380.  
  1381. <hr v-if="!$route.name.includes('.create')" />
  1382.  
  1383. <!-- Harga Jual Bazaar -->
  1384. <div class="row" v-if="!$route.name.includes('.create') && (userData.Id == 1 || userData.LegalEntityId == 1 || userData.LegalEntityId == 2)">
  1385. <div class="col-lg-12" style="margin-bottom: 20px;">
  1386. <h5 v-if="!$route.name.includes('.create')">Harga Bundle Bazaar</h5>
  1387. </div>
  1388. <div class="col-lg-3">
  1389. <div class="form-group form-float">
  1390. <label for="date" v-if="!$route.name.includes('.create') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsUpdateSellingPriceBundle)" class="form-label" style="color: black;">Harga Jual Bazaar Kondisi 100% </label>
  1391. <money v-if="$route.name.includes('.edit') || $route.name.includes('.draft') && userData.RoleDetails.IsUpdateSellingPriceBundle" placeholder="Ketik harga jual bazaar 100%..." id="date" type="text" v-model="bundle.Bazaar100" required class="validate form-control" style="border: 1px solid black;"></money>
  1392. <div v-if="$route.name.includes('.detail') && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ bundle.Bazaar100 | currency }}</div>
  1393. </div>
  1394. </div>
  1395. <div class="col-lg-3">
  1396. <div class="form-group form-float">
  1397. <label for="date" v-if="!$route.name.includes('.create') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsUpdateSellingPriceBundle)" class="form-label" style="color: black;">Harga Jual Bazaar Kondisi 90% </label>
  1398. <money v-if="$route.name.includes('.edit') || $route.name.includes('.draft') && userData.RoleDetails.IsUpdateSellingPriceBundle" placeholder="Ketik harga jual bazaar 90%..." id="date" type="text" v-model="bundle.Bazaar90" required class="validate form-control" style="border: 1px solid black;"></money>
  1399. <div v-if="$route.name.includes('.detail') && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ bundle.Bazaar90 | currency }}</div>
  1400. </div>
  1401. </div>
  1402. <div class="col-lg-3">
  1403. <div class="form-group form-float">
  1404. <label for="date" v-if="!$route.name.includes('.create') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsUpdateSellingPriceBundle)" class="form-label" style="color: black;">Harga Jual Bazaar Kondisi 60% </label>
  1405. <money v-if="$route.name.includes('.edit') || $route.name.includes('.draft') && userData.RoleDetails.IsUpdateSellingPriceBundle" placeholder="Ketik harga jual bazaar 60%..." id="date" type="text" v-model="bundle.Bazaar60" required class="validate form-control" style="border: 1px solid black;"></money>
  1406. <div v-if="$route.name.includes('.detail') && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ bundle.Bazaar60 | currency }}</div>
  1407. </div>
  1408. </div>
  1409. <div class="col-lg-3">
  1410. <div class="form-group form-float">
  1411. <label for="date" v-if="!$route.name.includes('.create') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsUpdateSellingPriceBundle)" class="form-label" style="color: black;">Harga Jual Bazaar Kondisi 30% </label>
  1412. <money v-if="$route.name.includes('.edit') || $route.name.includes('.draft') && userData.RoleDetails.IsUpdateSellingPriceBundle" placeholder="Ketik harga jual bazaar 30%..." id="date" type="text" v-model="bundle.Bazaar30" required class="validate form-control" style="border: 1px solid black;"></money>
  1413. <div v-if="$route.name.includes('.detail') && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ bundle.Bazaar30 | currency }}</div>
  1414. </div>
  1415. </div>
  1416. </div>
  1417.  
  1418. <hr v-if="!$route.name.includes('.create')" />
  1419.  
  1420. <!-- Harga Jual Owner -->
  1421. <div class="row" v-if="!$route.name.includes('.create') && (userData.Id == 1 || userData.LegalEntityId == 1 || userData.LegalEntityId == 2)">
  1422. <div class="col-lg-12" style="margin-bottom: 20px;">
  1423. <h5 v-if="!$route.name.includes('.create')">Harga Bundle Owner</h5>
  1424. </div>
  1425. <div class="col-lg-3">
  1426. <div class="form-group form-float">
  1427. <label for="date" v-if="!$route.name.includes('.create') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsUpdateSellingPriceBundle)" class="form-label" style="color: black;">Harga Jual Owner Kondisi 100% </label>
  1428. <money v-if="$route.name.includes('.edit') || $route.name.includes('.draft') && userData.RoleDetails.IsUpdateSellingPriceBundle" placeholder="Ketik harga jual owner 100%..." id="date" type="text" v-model="bundle.OwnerPrice100" required class="validate form-control" style="border: 1px solid black;"></money>
  1429. <div v-if="$route.name.includes('.detail') && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ bundle.OwnerPrice100 | currency }}</div>
  1430. </div>
  1431. </div>
  1432. <div class="col-lg-3">
  1433. <div class="form-group form-float">
  1434. <label for="date" v-if="!$route.name.includes('.create') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsUpdateSellingPriceBundle)" class="form-label" style="color: black;">Harga Jual Owner Kondisi 90% </label>
  1435. <money v-if="$route.name.includes('.edit') || $route.name.includes('.draft') && userData.RoleDetails.IsUpdateSellingPriceBundle" placeholder="Ketik harga jual owner 90%..." id="date" type="text" v-model="bundle.OwnerPrice90" required class="validate form-control" style="border: 1px solid black;"></money>
  1436. <div v-if="$route.name.includes('.detail') && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ bundle.OwnerPrice90 | currency }}</div>
  1437. </div>
  1438. </div>
  1439. <div class="col-lg-3">
  1440. <div class="form-group form-float">
  1441. <label for="date" v-if="!$route.name.includes('.create') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsUpdateSellingPriceBundle)" class="form-label" style="color: black;">Harga Jual Owner Kondisi 60% </label>
  1442. <money v-if="$route.name.includes('.edit') || $route.name.includes('.draft') && userData.RoleDetails.IsUpdateSellingPriceBundle" placeholder="Ketik harga jual owner 60%..." id="date" type="text" v-model="bundle.OwnerPrice60" required class="validate form-control" style="border: 1px solid black;"></money>
  1443. <div v-if="$route.name.includes('.detail') && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ bundle.OwnerPrice60 | currency }}</div>
  1444. </div>
  1445. </div>
  1446. <div class="col-lg-3">
  1447. <div class="form-group form-float">
  1448. <label for="date" v-if="!$route.name.includes('.create') && (userData.RoleDetails.IsReadSellingPriceBundle || userData.RoleDetails.IsUpdateSellingPriceBundle)" class="form-label" style="color: black;">Harga Jual Owner Kondisi 30% </label>
  1449. <money v-if="$route.name.includes('.edit') || $route.name.includes('.draft') && userData.RoleDetails.IsUpdateSellingPriceBundle" placeholder="Ketik harga jual owner 30%..." id="date" type="text" v-model="bundle.OwnerPrice30" required class="validate form-control" style="border: 1px solid black;"></money>
  1450. <div v-if="$route.name.includes('.detail') && userData.RoleDetails.IsReadSellingPriceBundle" class="form-control disabled-field">{{ bundle.OwnerPrice30 | currency }}</div>
  1451. </div>
  1452. </div>
  1453. </div>
  1454.  
  1455. <button v-if="$route.name.includes('.create')" class="btn btn-primary" @click="tambahBarang()" style="margin-top: 30px;">Tambah Barang</button>
  1456.  
  1457. <hr v-if="!$route.name.includes('.create')" />
  1458.  
  1459. <!-- Appendable Form -->
  1460. <div class="row" v-if="$route.name.includes('.draft') || $route.name.includes('.edit')">
  1461.  
  1462. <div class="col-lg-12" style="margin-top: 15px;">
  1463. <div class="row">
  1464. <!-- Nama Barang field -->
  1465. <div class="col-lg-12">
  1466. <div class="form-group form-float">
  1467. <label for="flagName" class="form-label" style="color: black;">Kode Barang</label>
  1468. <div class="form-group form-float">
  1469. <vue-select :disabled="$route.name.includes('.detail')" v-model="selectedInventory" class="vue-select2" name="role" :options="inventory" label="Code">
  1470. <template v-slot:option="option">
  1471. <span v-if="option.IsDeposit != 1">{{ option.Code }} - {{ option.Name }}</span>
  1472. <span v-if="option.IsDeposit == 1">{{ option.Code }} - {{ option.Name }} - Titipan</span>
  1473. </template>
  1474. </vue-select>
  1475. </div>
  1476. </div>
  1477. </div>
  1478.  
  1479. <!-- Nama Barang field -->
  1480. <div class="col-lg-6">
  1481. <div class="form-group form-float">
  1482. <label for="productNumber" class="form-label" style="color: black;">Nama Barang</label>
  1483. <input disabled placeholder="Auto generate..." id="productNumber" type="text" v-model="selectedInventory.Name" required class="validate form-control" style="border: 1px solid black;">
  1484. </div>
  1485. </div>
  1486.  
  1487. <!-- Kode Barang field -->
  1488. <div class="col-lg-6">
  1489. <div class="form-group form-float">
  1490. <label for="productNumber" class="form-label" style="color: black;">Kode Barang</label>
  1491. <input disabled placeholder="Auto generate..." id="productNumber" type="text" v-model="selectedInventory.Code" required class="validate form-control" style="border: 1px solid black;">
  1492. </div>
  1493. </div>
  1494.  
  1495. <!-- Kategori Barang field -->
  1496. <div class="col-lg-6">
  1497. <div class="form-group form-float">
  1498. <label for="productNumber" class="form-label" style="color: black;">Kategori Barang</label>
  1499. <input disabled placeholder="Auto generate..." id="productNumber" type="text" v-model="selectedInventory.Category" required class="validate form-control" style="border: 1px solid black;">
  1500. </div>
  1501. </div>
  1502.  
  1503. <!-- Kategori Gudang field -->
  1504. <div class="col-lg-6">
  1505. <div class="form-group form-float">
  1506. <label for="productNumber" class="form-label" style="color: black;">Kategori Gudang</label>
  1507. <input disabled placeholder="Auto generate..." id="productNumber" type="text" v-model="selectedInventory.WarehouseCategory" required class="validate form-control" style="border: 1px solid black;">
  1508. </div>
  1509. </div>
  1510.  
  1511. <!-- Kategori Gudang field -->
  1512. <div class="col-lg-6">
  1513. <div class="form-group form-float" v-if="selectedInventory.IsDeposit == 1">
  1514. <label for="productNumber" class="form-label" style="color: black;">Barang Titipan</label>
  1515. <div class="form-control disabled-field">Ya</div>
  1516. </div>
  1517. <div class="form-group form-float" v-if="selectedInventory.IsDeposit == 0">
  1518. <label for="productNumber" class="form-label" style="color: black;">Barang Titipan</label>
  1519. <div class="form-control disabled-field">Tidak</div>
  1520. </div>
  1521. <div class="form-group form-float" v-if="selectedInventory.IsDeposit == null">
  1522. <label for="productNumber" class="form-label" style="color: black;">Barang Titipan</label>
  1523. <div class="form-control disabled-field">Auto generate...</div>
  1524. </div>
  1525. </div>
  1526.  
  1527. <!-- Jumlah Barang field -->
  1528. <!-- <div class="col-lg-6">
  1529. <div class="form-group form-float">
  1530. <label for="productNumber" class="form-label" style="color: black;">Jumlah Barang</label>
  1531. <div class="form-control disabled-field">{{ item.TotalQuantity | currency({ symbol: '', thousandsSeparator: '.', fractionCount: '', fractionSeparator: '', symbolPosition: '', symbolSpacing: '' }) }}</div>
  1532. </div>
  1533. </div> -->
  1534.  
  1535. <!-- Jumlah Bundle field -->
  1536. <!-- <div class="col-lg-6">
  1537. <div class="form-group form-float">
  1538. <label for="productNumber" class="form-label" style="color: black;">Jumlah Bundle x Jumlah Barang Bundle</label> -->
  1539. <!-- <input placeholder="Auto generate..." id="productNumber" type="text" v-model="item.TotalBundleQuantity" required class="validate form-control" style="border: 1px solid black;"> -->
  1540. <!-- <div class="form-control disabled-field">{{ item.TotalBundleQuantity | currency({ symbol: '', thousandsSeparator: '.', fractionCount: '', fractionSeparator: '', symbolPosition: '', symbolSpacing: '' }) }}</div>
  1541. </div>
  1542. </div> -->
  1543. </div>
  1544.  
  1545. <hr v-if="userData.RoleDetails.IsReadSellingPriceBundle" />
  1546.  
  1547. <div class="row" v-if="userData.RoleDetails.IsReadSellingPriceBundle">
  1548. <div class="col-lg-4">
  1549. <div class="row">
  1550. <!-- Harga Barang Kondisi 100% field -->
  1551. <div class="col-lg-12">
  1552. <div class="form-group form-float">
  1553. <label for="productNumber" class="form-label" style="color: black;">Harga Jual Kondisi 100%</label>
  1554. <!-- <div v-if="selectedInventory.itembranch !== undefined" class="form-control disabled-field">{{ selectedInventory.itembranch[0].Price100 | currency }}</div>
  1555. <div v-if="selectedInventory.itembranch === undefined" class="form-control disabled-field"></div> -->
  1556. <div class="form-control disabled-field">{{ selectedInventory.Price100 | currency }}</div>
  1557. </div>
  1558. </div>
  1559.  
  1560. <!-- Harga Barang Kondisi 90% field -->
  1561. <div class="col-lg-12">
  1562. <div class="form-group form-float">
  1563. <label for="productNumber" class="form-label" style="color: black;">Harga Jual Kondisi 90%</label>
  1564. <div class="form-control disabled-field">{{ selectedInventory.Price90 | currency }}</div>
  1565. </div>
  1566. </div>
  1567.  
  1568. <!-- Harga Barang Kondisi 60% field -->
  1569. <div class="col-lg-12">
  1570. <div class="form-group form-float">
  1571. <label for="productNumber" class="form-label" style="color: black;">Harga Jual Kondisi 60%</label>
  1572. <div class="form-control disabled-field">{{ selectedInventory.Price60 | currency }}</div>
  1573. </div>
  1574. </div>
  1575.  
  1576. <!-- Harga Barang Kondisi 30% field -->
  1577. <div class="col-lg-12">
  1578. <div class="form-group form-float">
  1579. <label for="productNumber" class="form-label" style="color: black;">Harga Jual Kondisi 30%</label>
  1580. <div class="form-control disabled-field">{{ selectedInventory.Price30 | currency }}</div>
  1581. </div>
  1582. </div>
  1583.  
  1584. </div>
  1585. </div>
  1586.  
  1587. <div class="col-lg-4">
  1588. <div class="row">
  1589. <!-- Harga Barang Kondisi 100% field -->
  1590. <div class="col-lg-12">
  1591. <div class="form-group form-float">
  1592. <label for="productNumber" class="form-label" style="color: black;">Harga Jual Owner Kondisi 100%</label>
  1593. <!-- <div v-if="selectedInventory.itembranch !== undefined" class="form-control disabled-field">{{ selectedInventory.itembranch[0].Price100 | currency }}</div>
  1594. <div v-if="selectedInventory.itembranch === undefined" class="form-control disabled-field"></div> -->
  1595. <div class="form-control disabled-field">{{ selectedInventory.ExtraPrice100 | currency }}</div>
  1596. </div>
  1597. </div>
  1598.  
  1599. <!-- Harga Barang Kondisi 90% field -->
  1600. <div class="col-lg-12">
  1601. <div class="form-group form-float">
  1602. <label for="productNumber" class="form-label" style="color: black;">Harga Jual Owner Kondisi 90%</label>
  1603. <div class="form-control disabled-field">{{ selectedInventory.ExtraPrice90 | currency }}</div>
  1604. </div>
  1605. </div>
  1606.  
  1607. <!-- Harga Barang Kondisi 60% field -->
  1608. <div class="col-lg-12">
  1609. <div class="form-group form-float">
  1610. <label for="productNumber" class="form-label" style="color: black;">Harga Jual Owner Kondisi 60%</label>
  1611. <div class="form-control disabled-field">{{ selectedInventory.ExtraPrice60 | currency }}</div>
  1612. </div>
  1613. </div>
  1614.  
  1615. <!-- Harga Barang Kondisi 30% field -->
  1616. <div class="col-lg-12">
  1617. <div class="form-group form-float">
  1618. <label for="productNumber" class="form-label" style="color: black;">Harga Jual Owner Kondisi 30%</label>
  1619. <div class="form-control disabled-field">{{ selectedInventory.ExtraPrice30 | currency }}</div>
  1620. </div>
  1621. </div>
  1622. </div>
  1623. </div>
  1624.  
  1625. <div class="col-lg-4">
  1626. <div class="row">
  1627. <!-- Harga Barang Kondisi 100% field -->
  1628. <div class="col-lg-12">
  1629. <div class="form-group form-float">
  1630. <label for="productNumber" class="form-label" style="color: black;">Harga Jual Bazaar Kondisi 100%</label>
  1631. <!-- <div v-if="selectedInventory.itembranch !== undefined" class="form-control disabled-field">{{ selectedInventory.itembranch[0].Price100 | currency }}</div>
  1632. <div v-if="selectedInventory.itembranch === undefined" class="form-control disabled-field"></div> -->
  1633. <div class="form-control disabled-field">{{ selectedInventory.BazaarPrice100 | currency }}</div>
  1634. </div>
  1635. </div>
  1636.  
  1637. <!-- Harga Barang Kondisi 90% field -->
  1638. <div class="col-lg-12">
  1639. <div class="form-group form-float">
  1640. <label for="productNumber" class="form-label" style="color: black;">Harga Jual Bazaar Kondisi 90%</label>
  1641. <div class="form-control disabled-field">{{ selectedInventory.BazaarPrice90 | currency }}</div>
  1642. </div>
  1643. </div>
  1644.  
  1645. <!-- Harga Barang Kondisi 60% field -->
  1646. <div class="col-lg-12">
  1647. <div class="form-group form-float">
  1648. <label for="productNumber" class="form-label" style="color: black;">Harga Jual Bazaar Kondisi 60%</label>
  1649. <div class="form-control disabled-field">{{ selectedInventory.BazaarPrice60 | currency }}</div>
  1650. </div>
  1651. </div>
  1652.  
  1653. <!-- Harga Barang Kondisi 30% field -->
  1654. <div class="col-lg-12">
  1655. <div class="form-group form-float">
  1656. <label for="productNumber" class="form-label" style="color: black;">Harga Jual Bazaar Kondisi 30%</label>
  1657. <div class="form-control disabled-field">{{ selectedInventory.BazaarPrice30 | currency }}</div>
  1658. </div>
  1659. </div>
  1660. </div>
  1661.  
  1662. </div>
  1663.  
  1664. </div>
  1665.  
  1666. <hr />
  1667.  
  1668. <!-- Bagian harga barang -->
  1669. <div class="row">
  1670. <div class="col-lg-6">
  1671. <div class="row">
  1672. <!-- Jumlah Barang Kondisi 100% field -->
  1673. <div class="col-lg-12">
  1674. <div class="form-group form-float">
  1675. <label for="productNumber" class="form-label" style="color: black;">Jumlah Barang Kondisi 100%</label>
  1676. <div v-if="selectedInventory.itembranch !== undefined" class="form-control disabled-field">{{ selectedInventory.itembranch[0].Quantity100 | currency({ symbol: '', thousandsSeparator: '.', fractionCount: '', fractionSeparator: '', symbolPosition: '', symbolSpacing: '' }) }}</div>
  1677. <div v-if="selectedInventory.itembranch === undefined" class="form-control disabled-field"></div>
  1678. </div>
  1679. </div>
  1680.  
  1681. <!-- Jumlah Barang Kondisi 90% field -->
  1682. <div class="col-lg-12">
  1683. <div class="form-group form-float">
  1684. <label for="productNumber" class="form-label" style="color: black;">Jumlah Barang Kondisi 90%</label>
  1685. <div v-if="selectedInventory.itembranch !== undefined" class="form-control disabled-field">{{ selectedInventory.itembranch[0].Quantity90 | currency({ symbol: '', thousandsSeparator: '.', fractionCount: '', fractionSeparator: '', symbolPosition: '', symbolSpacing: '' }) }}</div>
  1686. <div v-if="selectedInventory.itembranch === undefined" class="form-control disabled-field"></div>
  1687. </div>
  1688. </div>
  1689.  
  1690. <!-- Jumlah Barang Kondisi 60% field -->
  1691. <div class="col-lg-12">
  1692. <div class="form-group form-float">
  1693. <label for="productNumber" class="form-label" style="color: black;">Jumlah Barang Kondisi 60%</label>
  1694. <div v-if="selectedInventory.itembranch !== undefined" class="form-control disabled-field">{{ selectedInventory.itembranch[0].Quantity60 | currency({ symbol: '', thousandsSeparator: '.', fractionCount: '', fractionSeparator: '', symbolPosition: '', symbolSpacing: '' }) }}</div>
  1695. <div v-if="selectedInventory.itembranch === undefined" class="form-control disabled-field"></div>
  1696. </div>
  1697. </div>
  1698.  
  1699. <!-- Jumlah Barang Kondisi 30% field -->
  1700. <div class="col-lg-12">
  1701. <div class="form-group form-float">
  1702. <label for="productNumber" class="form-label" style="color: black;">Jumlah Barang Kondisi 30%</label>
  1703. <div v-if="selectedInventory.itembranch !== undefined" class="form-control disabled-field">{{ selectedInventory.itembranch[0].Quantity30 | currency({ symbol: '', thousandsSeparator: '.', fractionCount: '', fractionSeparator: '', symbolPosition: '', symbolSpacing: '' }) }}</div>
  1704. <div v-if="selectedInventory.itembranch === undefined" class="form-control disabled-field"></div>
  1705. </div>
  1706. </div>
  1707. </div>
  1708. </div>
  1709. <div class="col-lg-6">
  1710. <div class="row">
  1711. <!-- Barang Bundle Kondisi 100% field -->
  1712. <div class="col-lg-12">
  1713. <div class="form-group form-float">
  1714. <label for="productNumber" class="form-label" style="color: black;">Barang Bundle Kondisi 100%</label>
  1715. <vue-numeric separator="." v-if="!$route.name.includes('.detail')" id="productNumber" type="text" placeholder="Ketik Jumlah Barang Bundle Kondisi 100%" v-model="item.BundleQuantity100" required class="validate form-control" style="border: 1px solid black;"></vue-numeric>
  1716. <div v-if="$route.name.includes('.detail')" class="form-control disabled-field">{{ selectedInventory.BundleQuantity100 | currency({ symbol: '', thousandsSeparator: '.', fractionCount: '', fractionSeparator: '', symbolPosition: '', symbolSpacing: '' }) }}</div>
  1717. </div>
  1718. </div>
  1719.  
  1720. <!-- Barang Bundle Kondisi 90% field -->
  1721. <div class="col-lg-12">
  1722. <div class="form-group form-float">
  1723. <label for="productNumber" class="form-label" style="color: black;">Barang Bundle Kondisi 90%</label>
  1724. <vue-numeric separator="." v-if="!$route.name.includes('.detail')" id="productNumber" type="text" placeholder="Ketik Jumlah Barang Bundle Kondisi 90%" v-model="item.BundleQuantity90" required class="validate form-control" style="border: 1px solid black;"></vue-numeric>
  1725. <div v-if="$route.name.includes('.detail')" class="form-control disabled-field">{{ selectedInventory.BundleQuantity90 | currency({ symbol: '', thousandsSeparator: '.', fractionCount: '', fractionSeparator: '', symbolPosition: '', symbolSpacing: '' }) }}</div>
  1726. </div>
  1727. </div>
  1728.  
  1729. <!-- Barang Bundle Kondisi 60% field -->
  1730. <div class="col-lg-12">
  1731. <div class="form-group form-float">
  1732. <label for="productNumber" class="form-label" style="color: black;">Barang Bundle Kondisi 60%</label>
  1733. <vue-numeric separator="." v-if="!$route.name.includes('.detail')" id="productNumber" type="text" placeholder="Ketik Jumlah Barang Bundle Kondisi 60%" v-model="item.BundleQuantity60" required class="validate form-control" style="border: 1px solid black;"></vue-numeric>
  1734. <div v-if="$route.name.includes('.detail')" class="form-control disabled-field">{{ selectedInventory.BundleQuantity60 | currency({ symbol: '', thousandsSeparator: '.', fractionCount: '', fractionSeparator: '', symbolPosition: '', symbolSpacing: '' }) }}</div>
  1735. </div>
  1736. </div>
  1737.  
  1738. <!-- Barang Bundle Kondisi 30% field -->
  1739. <div class="col-lg-12">
  1740. <div class="form-group form-float">
  1741. <label for="productNumber" class="form-label" style="color: black;">Barang Bundle Kondisi 30%</label>
  1742. <vue-numeric separator="." v-if="!$route.name.includes('.detail')" id="productNumber" type="text" placeholder="Ketik Jumlah Barang Bundle Kondisi 30%" v-model="item.BundleQuantity30" required class="validate form-control" style="border: 1px solid black;"></vue-numeric>
  1743. <div v-if="$route.name.includes('.detail')" class="form-control disabled-field">{{ selectedInventory.BundleQuantity30 | currency({ symbol: '', thousandsSeparator: '.', fractionCount: '', fractionSeparator: '', symbolPosition: '', symbolSpacing: '' }) }}</div>
  1744. </div>
  1745. </div>
  1746. </div>
  1747. </div>
  1748. </div>
  1749. </div>
  1750. </div>
  1751.  
  1752.  
  1753. <div v-if="$route.name.includes('.draft') || $route.name.includes('.edit')" class="row" style="padding-left: 0px;">
  1754. <div class="col-lg-2">
  1755. <button @click="tambah()" type="submit" class="btn waves-effect add-btn" style="width: 100%; background-color: #20c197; color: white; margin-top: 30px; margin-bottom: 30px;">
  1756. Tambah
  1757. </button>
  1758. </div>
  1759. </div>
  1760.  
  1761. <hr v-if="$route.name.includes('.edit') || $route.name.includes('.draft')" />
  1762.  
  1763. <div class="row" v-if="!$route.name.includes('.create')">
  1764. <div class="col-lg-12" style="padding-left: 30px;">
  1765. <h5>Data Barang</h5>
  1766. </div>
  1767. <div class="col-lg-12" style="padding-left: 15px;">
  1768. <!-- List Appendable Item -->
  1769. <div class="table-div-append">
  1770. <b-table striped hover
  1771. id="bundleItemCollection"
  1772. :items="itemdetails"
  1773. :fields="fieldLookup()"
  1774. class="table table-hover table-striped"
  1775. style="margin-top: 10px;">
  1776. <template v-slot:cell(Delete)="data">
  1777. <button v-if="!$route.name.includes('.detail')" class="btn btn-danger" @click="hapus(data.item.Id, data.item)"><span><i class="fa fa-times"></i></span></button>
  1778. </template>
  1779. <template v-slot:cell(Price100)="data">
  1780. {{ data.item.Price100 | currency }}
  1781. </template>
  1782. <template v-slot:cell(Price90)="data">
  1783. {{ data.item.Price90 | currency }}
  1784. </template>
  1785. <template v-slot:cell(Price60)="data">
  1786. {{ data.item.Price60 | currency }}
  1787. </template>
  1788. <template v-slot:cell(Price30)="data">
  1789. {{ data.item.Price30 | currency }}
  1790. </template>
  1791. <template v-slot:cell(TotalQuantity)="data">
  1792. {{ data.item.TotalQuantity | currency({ symbol: '', thousandsSeparator: '.', fractionCount: '', fractionSeparator: '', symbolPosition: '', symbolSpacing: '' }) }}
  1793. </template>
  1794. <template v-slot:cell(Quantity100)="data">
  1795. {{ data.item.Quantity100 | currency({ symbol: '', thousandsSeparator: '.', fractionCount: '', fractionSeparator: '', symbolPosition: '', symbolSpacing: '' }) }}
  1796. </template>
  1797. <template v-slot:cell(Quantity90)="data">
  1798. {{ data.item.Quantity90 | currency({ symbol: '', thousandsSeparator: '.', fractionCount: '', fractionSeparator: '', symbolPosition: '', symbolSpacing: '' }) }}
  1799. </template>
  1800. <template v-slot:cell(Quantity60)="data">
  1801. {{ data.item.Quantity60 | currency({ symbol: '', thousandsSeparator: '.', fractionCount: '', fractionSeparator: '', symbolPosition: '', symbolSpacing: '' }) }}
  1802. </template>
  1803. <template v-slot:cell(Quantity30)="data">
  1804. {{ data.item.Quantity30 | currency({ symbol: '', thousandsSeparator: '.', fractionCount: '', fractionSeparator: '', symbolPosition: '', symbolSpacing: '' }) }}
  1805. </template>
  1806. </b-table>
  1807. </div>
  1808. </div>
  1809. </div>
  1810. </div>
  1811. </div>
  1812. <div v-if="$route.name.includes('.edit')" class="row">
  1813. <div class="col-lg-12 button-div">
  1814. <button v-on:click="save()" class="btn btn-success">Simpan</button>
  1815. <router-link :to="{ name: 'BundleManagement.index' }" class="btn btn-default">Batal</router-link>
  1816. </div>
  1817. </div>
  1818.  
  1819. <div v-if="$route.name.includes('.draft')" class="row">
  1820. <div class="col-lg-12 button-div">
  1821. <button :disabled="itemdetails.length <= 0" v-on:click="saveDraft()" class="btn btn-success">Simpan</button>
  1822. <router-link :to="{ name: 'BundleManagement.index' }" class="btn btn-default">Batal</router-link>
  1823. </div>
  1824. </div>
  1825.  
  1826. </b-tab>
  1827. </b-tabs>
  1828. </div>
  1829. </div>
  1830. </template>
  1831.  
  1832. <style>
  1833. .card-header {
  1834. width: 1620px;
  1835. background-color: #20c197;
  1836. border-radius: 0px !important;
  1837. padding-left: 10px;
  1838. padding-top: 0px;
  1839. padding-right: 0px;
  1840. padding-bottom: 0px;
  1841. }
  1842.  
  1843. .nav-pills .nav-link.active, .nav-pills .show>.nav-link {
  1844. color: black;
  1845. background-color: #f8f8ff;
  1846. border-radius: 0px;
  1847. border-bottom: 3px solid #0059aa;
  1848. }
  1849.  
  1850. .button-div {
  1851. text-align: right;
  1852. margin-top: 30px;
  1853. }
  1854.  
  1855. .btn-success {
  1856. width: 132px;
  1857. background-color: #20c197;
  1858. border: none;
  1859. }
  1860.  
  1861. .btn-danger {
  1862. width: 132px;
  1863. margin-left: 15px;
  1864. border: none;
  1865. }
  1866.  
  1867. .disabled-field {
  1868. background-color: #E9ECEF;
  1869. border: 1px solid black;
  1870. }
  1871. </style>
  1872.  
  1873.  
  1874. <script>
  1875. // Plugins
  1876. import moment from 'moment'
  1877. import $ from 'jquery'
  1878. import VueSelect from 'vue-select'
  1879. import VueNumeric from 'vue-numeric'
  1880. import 'vue-select/dist/vue-select.css'
  1881. import Base64Upload from 'vue-base64-upload'
  1882.  
  1883. // API
  1884. import Bundle from '@/services/Inventories/Bundle'
  1885. import Inventories from '@/services/Inventories/Inventory'
  1886. import Suppliers from '@/services/Inventories/Supplier'
  1887. import ItemDetails from '@/services/Inventories/ItemDetails'
  1888.  
  1889. export default {
  1890. name: 'BundleManagement.create',
  1891. components: {
  1892. VueSelect,
  1893. VueNumeric,
  1894. Base64Upload
  1895. },
  1896. data () {
  1897. return {
  1898. //Loading
  1899. loading: true,
  1900. // Scope, Sama kyk vm.users , vm.employee dkk
  1901. userData: {},
  1902. itemdetails: {},
  1903. bundle: {
  1904. TotalQuantity: 0,
  1905. Price: 0,
  1906. BundlePrice100: 0,
  1907. BundlePrice90: 0,
  1908. BundlePrice60: 0,
  1909. BundlePrice30: 0,
  1910. QuantityBundle100: 0,
  1911. QuantityBundle90: 0,
  1912. QuantityBundle60: 0,
  1913. QuantityBundle30: 0,
  1914. OwnerPrice100: 0,
  1915. OwnerPrice90: 0,
  1916. OwnerPrice60: 0,
  1917. OwnerPrice30: 0,
  1918. Bazaar100: 0,
  1919. Bazaar90: 0,
  1920. Bazaar60: 0,
  1921. Bazaar30: 0,
  1922. RecPrice: 0,
  1923. TotalOwnerPrice: 0,
  1924. item: {
  1925. "Id": null,
  1926. "Name": null,
  1927. "Code": null,
  1928. "Category": null,
  1929. "WarehouseCategory": null,
  1930. "TotalQuantity": 0,
  1931. "BundleQuantity100": 0,
  1932. "BundleQuantity90": 0,
  1933. "BundleQuantity60": 0,
  1934. "BundleQuantity30": 0,
  1935. "SellingPrice": null,
  1936. "Price90": null,
  1937. "Price60": null,
  1938. "TotalBundleQuantity": 0
  1939. },
  1940. ItemCollection: []
  1941. },
  1942. inventory: [],
  1943. supplier: [],
  1944. selectedInventory: {},
  1945. selectedMaintenance: {},
  1946. selectedDeposit: {},
  1947. selectedAssembly: {},
  1948. selectedSupplier1: {},
  1949. selectedSupplier2: {},
  1950. selectedSupplier3: {},
  1951. category: ['-','Barang Inti','Barang Hadiah','Paket', 'Barang Siap Jual'],
  1952. warehouseCategory: ['Alat Tulis','Barang Siap Jual','Kit'],
  1953. maintenanceOptions: ['Ya','Tidak'],
  1954. depositOptions: ['Ya','Tidak'],
  1955. procurementType: ['Reguler','Import'],
  1956. assemblyOptions: ['Ya'],
  1957. itemCollectionField: [
  1958. { key: 'Id', label: 'Id', sortable: true },
  1959. { key: 'ItemId', label: 'Item Id', sortable: true },
  1960. { key: 'Code', label: 'Kode', sortable: true },
  1961. { key: 'Name', label: 'Nama', sortable: true },
  1962. { key: 'Category', label: 'Kategori', sortable: true },
  1963. { key: 'TotalQuantity', label: 'Jumlah Keseluruhan', sortable: true },
  1964. { key: 'Quantity100', label: 'Jumlah Barang Kondisi 100%', sortable: true },
  1965. { key: 'Price100', label: 'Harga Barang Kondisi 100%', sortable: true },
  1966. { key: 'Quantity90', label: 'Jumlah Barang Kondisi 90%', sortable: true },
  1967. { key: 'Price90', label: 'Harga Barang Kondisi 90%', sortable: true },
  1968. { key: 'Quantity60', label: 'Jumlah Barang Kondisi 60%', sortable: true },
  1969. { key: 'Price60', label: 'Harga Barang Kondisi 60%', sortable: true },
  1970. { key: 'Quantity30', label: 'Jumlah Barang Kondisi 30%', sortable: true },
  1971. { key: 'Price30', label: 'Harga Barang Kondisi 30%', sortable: true },
  1972. { key: 'Delete', label: ''},
  1973. ],
  1974. editor: null,
  1975. }
  1976. },
  1977. beforeUpdate: function () {
  1978.  
  1979. // Ngeassign variable pada saat proses update, misal kyk dropdown
  1980. this.item = this.selectedInventory
  1981.  
  1982. this.bundle.Price = parseInt(this.bundle.BundlePrice100) + parseInt(this.bundle.BundlePrice90) + parseInt(this.bundle.BundlePrice60) + parseInt(this.bundle.BundlePrice30)
  1983. this.bundle.TotalQuantity = parseInt(this.bundle.QuantityBundle100) + parseInt(this.bundle.QuantityBundle90) + parseInt(this.bundle.QuantityBundle60) + parseInt(this.bundle.QuantityBundle30)
  1984. // this.bundle.TotalOwnerPrice = parseInt(this.bundle.OwnerPrice100) + parseInt(this.bundle.OwnerPrice90) + parseInt(this.bundle.OwnerPrice60) + parseInt(this.bundle.OwnerPrice30)
  1985. this.bundle.TotalBundleQuantity = this.bundle.TotalQuantity
  1986. this.bundle.BundleQuantity = this.bundle.TotalQuantity
  1987. this.editor = this.userData.EmployeeId
  1988.  
  1989. // if (this.selectedSupplier1 == null) {
  1990. // this.selectedSupplier1 = "-"
  1991. // }
  1992.  
  1993. console.log(this.selectedSupplier1)
  1994.  
  1995. console.log(this.bundle.BundlePrice100)
  1996. console.log(this.bundle.BundlePrice90)
  1997. console.log(this.bundle.BundlePrice60)
  1998. console.log(this.bundle.BundlePrice30)
  1999. console.log(this.bundle.Price)
  2000.  
  2001. },
  2002. mounted: function () {
  2003. // Sama dengan document.ready
  2004. window.$ = $
  2005. this.init()
  2006. if(localStorage.userData !== undefined) {
  2007. this.userData = JSON.parse(localStorage.userData)
  2008.  
  2009. } else {
  2010. this.$router.push({ name: 'home' })
  2011. location.reload()
  2012. }
  2013. },
  2014. methods: {
  2015. // Kumpulan Fungsi disini
  2016. init: async function() {
  2017. // Ngeload Data Dari API
  2018. let inventory = await Inventories.index()
  2019. let supplier = await Suppliers.index()
  2020.  
  2021. // Assign data ke Scope
  2022. this.inventory = inventory.data
  2023. this.checkInventory = this.inventoryCheckNull(this.inventory)
  2024. this.getInventory = this.getInventory(this.inventory)
  2025. this.supplier = supplier.data
  2026. for(var i = 0; i < inventory.data.length; i ++) {
  2027. this.inventory[i].items = {
  2028. Quantity100: 0,
  2029. Quantity90: 0,
  2030. Quantity60: 0,
  2031. Quantity30: 0
  2032. }
  2033. this.inventory[i].itembranch = this.filterBarangCabang(inventory.data[i].inventory_branches, this.userData.LegalEntityId, this.userData.BranchId)
  2034. this.inventory[i].items = this.filterBarangCabang(inventory.data[i].inventory_branches, this.userData.LegalEntityId, this.userData.BranchId)[0]
  2035. }
  2036.  
  2037. //for edit mode
  2038. if(this.$route.params.id) {
  2039. let edit = await Bundle.detail(this.$route.params.id)
  2040. this.bundle = edit.data
  2041.  
  2042. let itemdetails = await ItemDetails.findbymodule('Bundle', this.$route.params.id)
  2043. this.itemdetails = itemdetails.data
  2044.  
  2045. if(this.bundle.SupplierId) {
  2046. this.selectedSupplier1 = this.lookupData(supplier.data, edit.data.SupplierId)
  2047. }
  2048. if(this.bundle.SupplierId2) {
  2049. this.selectedSupplier2 = this.lookupData(supplier.data, edit.data.SupplierId2)
  2050. }
  2051. if(this.bundle.SupplierId3) {
  2052. this.selectedSupplier3 = this.lookupData(supplier.data, edit.data.SupplierId3)
  2053. }
  2054.  
  2055. if(this.bundle.IsMaintenance == 1) {
  2056. this.selectedMaintenance = 'Ya'
  2057. }
  2058. if(this.bundle.IsMaintenance == 0) {
  2059. this.selectedMaintenance ='Tidak'
  2060. }
  2061.  
  2062. if(this.bundle.IsDeposit == 1) {
  2063. this.selectedDeposit = 'Ya'
  2064. }
  2065. if(this.bundle.IsDeposit == 0) {
  2066. this.selectedDeposit ='Tidak'
  2067. }
  2068.  
  2069. if(this.bundle.IsAssembly == 1) {
  2070. this.selectedAssembly ='Ya'
  2071. }
  2072.  
  2073. console.log(this.itemdetails)
  2074. console.log(JSON.parse(JSON.stringify(this.itemdetails)))
  2075. this.bundle.RecPrice = this.totalPriceItemDetails(this.itemdetails)
  2076. this.bundle.TotalOwnerPrice = this.totalPriceItemDetailsOwner(this.itemdetails)
  2077.  
  2078. }
  2079.  
  2080. // if(!this.$route.params.id) {
  2081. // this.bundle.Point = 0
  2082. // this.bundle.TotalQuantity = 0
  2083. // this.item.BundleQuantity100 = 0
  2084. // this.item.BundleQuantity90 = 0
  2085. // this.item.BundleQuantity60 = 0
  2086. // this.item.BundleQuantity30 = 0
  2087. // }
  2088.  
  2089. this.loading = false
  2090. },
  2091. fieldLookup() {
  2092. let field = [
  2093. { key: 'Id', label: 'Id', sortable: true },
  2094. { key: 'ItemId', label: 'Item Id', sortable: true },
  2095. { key: 'Code', label: 'Kode', sortable: true },
  2096. { key: 'Name', label: 'Nama', sortable: true },
  2097. { key: 'Category', label: 'Kategori', sortable: true },
  2098. { key: 'TotalQuantity', label: 'Jumlah Keseluruhan', sortable: true },
  2099. { key: 'Quantity100', label: 'Jumlah Barang Kondisi 100%', sortable: true },
  2100. { key: 'Quantity90', label: 'Jumlah Barang Kondisi 90%', sortable: true },
  2101. { key: 'Quantity60', label: 'Jumlah Barang Kondisi 60%', sortable: true },
  2102. { key: 'Quantity30', label: 'Jumlah Barang Kondisi 30%', sortable: true },
  2103. { key: 'Delete', label: ''},
  2104. ]
  2105. if(this.userData.RoleDetails.IsReadSellingPriceBundle == 1) {
  2106. field.splice(10, 0,
  2107. { key: 'Price100', label: 'Harga Barang Kondisi 100%', sortable: true },
  2108. { key: 'Price90', label: 'Harga Barang Kondisi 90%', sortable: true },
  2109. { key: 'Price60', label: 'Harga Barang Kondisi 60%', sortable: true },
  2110. { key: 'Price30', label: 'Harga Barang Kondisi 30%', sortable: true },
  2111. )
  2112. }
  2113. return field
  2114. },
  2115. inventoryCheckNull(json) {
  2116. let result = false
  2117. for(var i = 0; i < json.length; i++) {
  2118. if(json[i].BundleId == this.$route.params.id) {
  2119. result = true
  2120. }
  2121. }
  2122. return result
  2123. },
  2124. getInventory(json) {
  2125. let data = []
  2126. for(var i = 0; i < json.length; i++) {
  2127. if(json[i].BundleId == this.$route.params.id) {
  2128. data.push(json[i])
  2129. }
  2130. }
  2131. return data
  2132. },
  2133. filterBarangCabang: function(json, legalEntityId, branchId) {
  2134. let data = []
  2135. console.log(json)
  2136. console.log(legalEntityId)
  2137. console.log(branchId)
  2138. for(var i = 0; i < json.length; i++) {
  2139. if((json[i].LegalEntityId == legalEntityId) && (json[i].BranchId == branchId)) {
  2140. data.push(json[i])
  2141. }
  2142. }
  2143. return data
  2144. },
  2145. totalPriceItemDetails: function(json) {
  2146. let total = 0;
  2147. for(var i = 0; i < json.length; i++) {
  2148. total = parseInt(total) + (parseInt(json[i].Quantity100) * parseInt(json[i].Price100)) + (parseInt(json[i].Quantity90) * parseInt(json[i].Price90)) + (parseInt(json[i].Quantity60) * parseInt(json[i].Price60)) + (parseInt(json[i].Quantity30) * parseInt(json[i].Price30))
  2149. }
  2150. console.log(total)
  2151. return total
  2152. },
  2153. totalPriceItemDetailsOwner: function(json) {
  2154. let total = 0;
  2155. for(var i = 0; i < json.length; i++) {
  2156. total = parseInt(total) + (parseInt(json[i].Quantity100) * parseInt(json[i].OwnerPrice100)) + (parseInt(json[i].Quantity90) * parseInt(json[i].OwnerPrice90)) + (parseInt(json[i].Quantity60) * parseInt(json[i].OwnerPrice60)) + (parseInt(json[i].Quantity30) * parseInt(json[i].OwnerPrice30))
  2157. }
  2158. console.log(total)
  2159. return total
  2160. },
  2161. tambahBarang: async function() {
  2162. this.bundle.ItemCollection = "[]"
  2163. this.bundle.LegalEntityId = this.userData.LegalEntityId
  2164. this.bundle.BranchId = this.userData.BranchId
  2165. this.bundle.DeliveryStatus = "Draft"
  2166. this.bundle.Code = 'BDL/' + moment().format('DD') + moment().format('MM') + moment().format('YY') + "/" + moment().format('HH') + moment().format('mm') + moment().format('ss')
  2167. if(this.bundle.Category == 'Barang Inti') {
  2168. this.bundle.Code = 'BDL/I/' + moment().format('DD') + moment().format('MM') + moment().format('YY') + "/" + moment().format('HH') + moment().format('mm') + moment().format('ss')
  2169. } else if(this.bundle.Category == 'Barang Hadiah') {
  2170. this.bundle.Code = 'BDL/H/' + moment().format('DD') + moment().format('MM') + moment().format('YY') + "/" + moment().format('HH') + moment().format('mm') + moment().format('ss')
  2171. } else if(this.bundle.Category == 'Paket') {
  2172. this.bundle.Code = 'BDL/P/' + moment().format('DD') + moment().format('MM') + moment().format('YY') + "/" + moment().format('HH') + moment().format('mm') + moment().format('ss')
  2173. } else if(this.bundle.Category == '-') {
  2174. this.bundle.Code = 'BDL/L/' + moment().format('DD') + moment().format('MM') + moment().format('YY') + "/" + moment().format('HH') + moment().format('mm') + moment().format('ss')
  2175. } else {
  2176. this.bundle.Code = 'BDL/L/' + moment().format('DD') + moment().format('MM') + moment().format('YY') + "/" + moment().format('HH') + moment().format('mm') + moment().format('ss')
  2177. }
  2178.  
  2179. console.log(this.bundle)
  2180. try {
  2181.  
  2182. if(this.selectedMaintenance == 'Ya') {
  2183. this.bundle.IsMaintenance = 1
  2184. }
  2185. if(this.selectedMaintenance == 'Tidak') {
  2186. this.bundle.IsMaintenance = 0
  2187. }
  2188.  
  2189. if(this.selectedDeposit == 'Ya') {
  2190. this.bundle.IsDeposit = 1
  2191. }
  2192. if(this.selectedDeposit == 'Tidak') {
  2193. this.bundle.IsDeposit = 0
  2194. }
  2195. if(this.selectedAssembly == 'Ya') {
  2196. this.bundle.IsAssembly = 1
  2197. }
  2198.  
  2199. this.bundle.SupplierId = this.selectedSupplier1.Id
  2200. this.bundle.SupplierId2 = this.selectedSupplier2.Id
  2201. this.bundle.SupplierId3 = this.selectedSupplier3.Id
  2202.  
  2203. //Add Bundle to Inventory
  2204. /**
  2205. * @obsolete
  2206. * Pindahkan ke tombol simpan
  2207. */
  2208. // let bundleAsInventory = {
  2209. // inventory: {
  2210. // LegalEntityId: this.userData.LegalEntityId,
  2211. // BranchId: this.userData.BranchId,
  2212. // Name: this.bundle.Name,
  2213. // Code: 'BDL/' + moment().format('DD') + moment().format('MM') + moment().format('YY') + "/" + moment().format('HH') + moment().format('mm') + moment().format('ss'),
  2214. // Category: "Bundle - " + this.bundle.Category,
  2215. // Identifier: "Bundle",
  2216. // Point: this.bundle.Point,
  2217. // BuyingPrice: 0,
  2218. // IsBundle: true,
  2219. // WarehouseCategory: this.bundle.WarehouseCategory,
  2220. // IsRefurbish: 1,
  2221. // IsMaintenance: this.bundle.IsMaintenance,
  2222. // IsDeposit: this.bundle.IsDeposit,
  2223. // ItemMasterId: null,
  2224. // SupplierId: this.selectedSupplier1.Id,
  2225. // SupplierId2: this.selectedSupplier2.Id,
  2226. // SupplierId3: this.selectedSupplier3.Id,
  2227. // HistoryQuantity: this.bundle.TotalQuantity,
  2228. // EmployeeId: this.userData.EmployeeId,
  2229. // Position: 'Tambah - Barang Bundle',
  2230. // Price100: this.bundle.BundlePrice100 || 0,
  2231. // Price90: this.bundle.BundlePrice90 || 0,
  2232. // Price60: this.bundle.BundlePrice60 || 0,
  2233. // Price30: this.bundle.BundlePrice30 || 0,
  2234. // ExtraPrice100: this.bundle.OwnerPrice100 || 0,
  2235. // ExtraPrice90: this.bundle.OwnerPrice90 || 0,
  2236. // ExtraPrice60: this.bundle.OwnerPrice60 || 0,
  2237. // ExtraPrice30: this.bundle.OwnerPrice30 || 0,
  2238. // BazaarPrice100: this.bundle.Bazaar100 || 0,
  2239. // BazaarPrice90: this.bundle.Bazaar90 || 0,
  2240. // BazaarPrice60: this.bundle.Bazaar60 || 0,
  2241. // BazaarPrice30: this.bundle.Bazaar30 || 0,
  2242. // BuyingPrice100: this.bundle.BuyingPrice100 || 0,
  2243. // BuyingPrice90: this.bundle.BuyingPrice90 || 0,
  2244. // BuyingPrice60: this.bundle.BuyingPrice60 || 0,
  2245. // BuyingPrice30: this.bundle.BuyingPrice30 || 0,
  2246. // SpecialPrice100: this.bundle.SpecialPrice100 || 0,
  2247. // SpecialPrice90: this.bundle.SpecialPrice90 || 0,
  2248. // SpecialPrice60: this.bundle.SpecialPrice60 || 0,
  2249. // SpecialPrice30: this.bundle.SpecialPrice30 || 0,
  2250. // PromoPrice100: this.bundle.PromoPrice100 || 0,
  2251. // PromoPrice90: this.bundle.PromoPrice90 || 0,
  2252. // PromoPrice60: this.bundle.PromoPrice60 || 0,
  2253. // PromoPrice30: this.bundle.PromoPrice30 || 0,
  2254. // ComboPrice100: this.bundle.ComboPrice100 || 0,
  2255. // ComboPrice90: this.bundle.ComboPrice90 || 0,
  2256. // ComboPrice60: this.bundle.ComboPrice60 || 0,
  2257. // ComboPrice30: this.bundle.ComboPrice30 || 0,
  2258. // CipenRegularPrice100: this.bundle.CipenRegularPrice100 || 0,
  2259. // CipenRegularPrice90: this.bundle.CipenRegularPrice90 || 0,
  2260. // CipenRegularPrice60: this.bundle.CipenRegularPrice60 || 0,
  2261. // CipenRegularPrice30: this.bundle.CipenRegularPrice30 || 0,
  2262. // CipenSpecialPrice100: this.bundle.CipenSpecialPrice100 || 0,
  2263. // CipenSpecialPrice90: this.bundle.CipenSpecialPrice90 || 0,
  2264. // CipenSpecialPrice60: this.bundle.CipenSpecialPrice60 || 0,
  2265. // CipenSpecialPrice30: this.bundle.CipenSpecialPrice30 || 0,
  2266. // CipenPromoPrice100: this.bundle.CipenPromoPrice100 || 0,
  2267. // CipenPromoPrice90: this.bundle.CipenPromoPrice90 || 0,
  2268. // CipenPromoPrice60: this.bundle.CipenPromoPrice60 || 0,
  2269. // CipenPromoPrice30: this.bundle.CipenPromoPrice30 || 0,
  2270. // CipenComboPrice100: this.bundle.CipenComboPrice100 || 0,
  2271. // CipenComboPrice90: this.bundle.CipenComboPrice90 || 0,
  2272. // CipenComboPrice60: this.bundle.CipenComboPrice60 || 0,
  2273. // CipenComboPrice30: this.bundle.CipenComboPrice30 || 0,
  2274. // CikenRegularPrice100: this.bundle.CikenRegularPrice100 || 0,
  2275. // CikenRegularPrice90: this.bundle.CikenRegularPrice90 || 0,
  2276. // CikenRegularPrice60: this.bundle.CikenRegularPrice60 || 0,
  2277. // CikenRegularPrice30: this.bundle.CikenRegularPrice30 || 0,
  2278. // CikenSpecialPrice100: this.bundle.CikenSpecialPrice100 || 0,
  2279. // CikenSpecialPrice90: this.bundle.CikenSpecialPrice90 || 0,
  2280. // CikenSpecialPrice60: this.bundle.CikenSpecialPrice60 || 0,
  2281. // CikenSpecialPrice30: this.bundle.CikenSpecialPrice30 || 0,
  2282. // CikenPromoPrice100: this.bundle.CikenPromoPrice100 || 0,
  2283. // CikenPromoPrice90: this.bundle.CikenPromoPrice90 || 0,
  2284. // CikenPromoPrice60: this.bundle.CikenPromoPrice60 || 0,
  2285. // CikenPromoPrice30: this.bundle.CikenPromoPrice30 || 0,
  2286. // CikenComboPrice100: this.bundle.CikenComboPrice100 || 0,
  2287. // CikenComboPrice90: this.bundle.CikenComboPrice90 || 0,
  2288. // CikenComboPrice60: this.bundle.CikenComboPrice60 || 0,
  2289. // CikenComboPrice30: this.bundle.CikenComboPrice30 || 0,
  2290. // CimenRegularPrice100: this.bundle.CimenRegularPrice100 || 0,
  2291. // CimenRegularPrice90: this.bundle.CimenRegularPrice90 || 0,
  2292. // CimenRegularPrice60: this.bundle.CimenRegularPrice60 || 0,
  2293. // CimenRegularPrice30: this.bundle.CimenRegularPrice30 || 0,
  2294. // CimenSpecialPrice100: this.bundle.CimenSpecialPrice100 || 0,
  2295. // CimenSpecialPrice90: this.bundle.CimenSpecialPrice90 || 0,
  2296. // CimenSpecialPrice60: this.bundle.CimenSpecialPrice60 || 0,
  2297. // CimenSpecialPrice30: this.bundle.CimenSpecialPrice30 || 0,
  2298. // CimenPromoPrice100: this.bundle.CimenPromoPrice100 || 0,
  2299. // CimenPromoPrice90: this.bundle.CimenPromoPrice90 || 0,
  2300. // CimenPromoPrice60: this.bundle.CimenPromoPrice60 || 0,
  2301. // CimenPromoPrice30: this.bundle.CimenPromoPrice30 || 0,
  2302. // CimenComboPrice100: this.bundle.CimenComboPrice100 || 0,
  2303. // CimenComboPrice90: this.bundle.CimenComboPrice90 || 0,
  2304. // CimenComboPrice60: this.bundle.CimenComboPrice60 || 0,
  2305. // CimenComboPrice30: this.bundle.CimenComboPrice30 || 0,
  2306. // Quantity100: this.bundle.QuantityBundle100 || 0,
  2307. // Quantity90: this.bundle.QuantityBundle90 || 0,
  2308. // Quantity60: this.bundle.QuantityBundle60 || 0,
  2309. // Quantity30: this.bundle.QuantityBundle30 || 0,
  2310. // ProcurementType: this.bundle.ProcurementType,
  2311. // SNI1: this.bundle.SNI1,
  2312. // SNI2: this.bundle.SNI2,
  2313. // SNI3: this.bundle.SNI3,
  2314. // },
  2315. // LegalEntityId: this.userData.LegalEntityId,
  2316. // BranchId: this.userData.BranchId,
  2317. // TotalQuantity: this.bundle.TotalQuantity,
  2318. // Quantity100: this.bundle.QuantityBundle100 || 0,
  2319. // Quantity90: this.bundle.QuantityBundle90 || 0,
  2320. // Quantity60: this.bundle.QuantityBundle60 || 0,
  2321. // Quantity30: this.bundle.QuantityBundle30 || 0,
  2322. // Price100: this.bundle.BundlePrice100 || 0,
  2323. // Price90: this.bundle.BundlePrice90 || 0,
  2324. // Price60: this.bundle.BundlePrice60 || 0,
  2325. // Price30: this.bundle.BundlePrice30 || 0,
  2326. // ExtraPrice100: this.bundle.OwnerPrice100 || 0,
  2327. // ExtraPrice90: this.bundle.OwnerPrice90 || 0,
  2328. // ExtraPrice60: this.bundle.OwnerPrice60 || 0,
  2329. // ExtraPrice30: this.bundle.OwnerPrice30 || 0,
  2330. // BazaarPrice100: this.bundle.Bazaar100 || 0,
  2331. // BazaarPrice90: this.bundle.Bazaar90 || 0,
  2332. // BazaarPrice60: this.bundle.Bazaar60 || 0,
  2333. // BazaarPrice30: this.bundle.Bazaar30 || 0,
  2334. // Picture1: this.bundle.Picture1 || null,
  2335. // BuyingPrice100: this.bundle.BuyingPrice100 || 0,
  2336. // BuyingPrice90: this.bundle.BuyingPrice90 || 0,
  2337. // BuyingPrice60: this.bundle.BuyingPrice60 || 0,
  2338. // BuyingPrice30: this.bundle.BuyingPrice30 || 0,
  2339. // SpecialPrice100: this.bundle.SpecialPrice100 || 0,
  2340. // SpecialPrice90: this.bundle.SpecialPrice90 || 0,
  2341. // SpecialPrice60: this.bundle.SpecialPrice60 || 0,
  2342. // SpecialPrice30: this.bundle.SpecialPrice30 || 0,
  2343. // PromoPrice100: this.bundle.PromoPrice100 || 0,
  2344. // PromoPrice90: this.bundle.PromoPrice90 || 0,
  2345. // PromoPrice60: this.bundle.PromoPrice60 || 0,
  2346. // PromoPrice30: this.bundle.PromoPrice30 || 0,
  2347. // ComboPrice100: this.bundle.ComboPrice100 || 0,
  2348. // ComboPrice90: this.bundle.ComboPrice90 || 0,
  2349. // ComboPrice60: this.bundle.ComboPrice60 || 0,
  2350. // ComboPrice30: this.bundle.ComboPrice30 || 0,
  2351. // CipenRegularPrice100: this.bundle.CipenRegularPrice100 || 0,
  2352. // CipenRegularPrice90: this.bundle.CipenRegularPrice90 || 0,
  2353. // CipenRegularPrice60: this.bundle.CipenRegularPrice60 || 0,
  2354. // CipenRegularPrice30: this.bundle.CipenRegularPrice30 || 0,
  2355. // CipenSpecialPrice100: this.bundle.CipenSpecialPrice100 || 0,
  2356. // CipenSpecialPrice90: this.bundle.CipenSpecialPrice90 || 0,
  2357. // CipenSpecialPrice60: this.bundle.CipenSpecialPrice60 || 0,
  2358. // CipenSpecialPrice30: this.bundle.CipenSpecialPrice30 || 0,
  2359. // CipenPromoPrice100: this.bundle.CipenPromoPrice100 || 0,
  2360. // CipenPromoPrice90: this.bundle.CipenPromoPrice90 || 0,
  2361. // CipenPromoPrice60: this.bundle.CipenPromoPrice60 || 0,
  2362. // CipenPromoPrice30: this.bundle.CipenPromoPrice30 || 0,
  2363. // CipenComboPrice100: this.bundle.CipenComboPrice100 || 0,
  2364. // CipenComboPrice90: this.bundle.CipenComboPrice90 || 0,
  2365. // CipenComboPrice60: this.bundle.CipenComboPrice60 || 0,
  2366. // CipenComboPrice30: this.bundle.CipenComboPrice30 || 0,
  2367. // CikenRegularPrice100: this.bundle.CikenRegularPrice100 || 0,
  2368. // CikenRegularPrice90: this.bundle.CikenRegularPrice90 || 0,
  2369. // CikenRegularPrice60: this.bundle.CikenRegularPrice60 || 0,
  2370. // CikenRegularPrice30: this.bundle.CikenRegularPrice30 || 0,
  2371. // CikenSpecialPrice100: this.bundle.CikenSpecialPrice100 || 0,
  2372. // CikenSpecialPrice90: this.bundle.CikenSpecialPrice90 || 0,
  2373. // CikenSpecialPrice60: this.bundle.CikenSpecialPrice60 || 0,
  2374. // CikenSpecialPrice30: this.bundle.CikenSpecialPrice30 || 0,
  2375. // CikenPromoPrice100: this.bundle.CikenPromoPrice100 || 0,
  2376. // CikenPromoPrice90: this.bundle.CikenPromoPrice90 || 0,
  2377. // CikenPromoPrice60: this.bundle.CikenPromoPrice60 || 0,
  2378. // CikenPromoPrice30: this.bundle.CikenPromoPrice30 || 0,
  2379. // CikenComboPrice100: this.bundle.CikenComboPrice100 || 0,
  2380. // CikenComboPrice90: this.bundle.CikenComboPrice90 || 0,
  2381. // CikenComboPrice60: this.bundle.CikenComboPrice60 || 0,
  2382. // CikenComboPrice30: this.bundle.CikenComboPrice30 || 0,
  2383. // CimenRegularPrice100: this.bundle.CimenRegularPrice100 || 0,
  2384. // CimenRegularPrice90: this.bundle.CimenRegularPrice90 || 0,
  2385. // CimenRegularPrice60: this.bundle.CimenRegularPrice60 || 0,
  2386. // CimenRegularPrice30: this.bundle.CimenRegularPrice30 || 0,
  2387. // CimenSpecialPrice100: this.bundle.CimenSpecialPrice100 || 0,
  2388. // CimenSpecialPrice90: this.bundle.CimenSpecialPrice90 || 0,
  2389. // CimenSpecialPrice60: this.bundle.CimenSpecialPrice60 || 0,
  2390. // CimenSpecialPrice30: this.bundle.CimenSpecialPrice30 || 0,
  2391. // CimenPromoPrice100: this.bundle.CimenPromoPrice100 || 0,
  2392. // CimenPromoPrice90: this.bundle.CimenPromoPrice90 || 0,
  2393. // CimenPromoPrice60: this.bundle.CimenPromoPrice60 || 0,
  2394. // CimenPromoPrice30: this.bundle.CimenPromoPrice30 || 0,
  2395. // CimenComboPrice100: this.bundle.CimenComboPrice100 || 0,
  2396. // CimenComboPrice90: this.bundle.CimenComboPrice90 || 0,
  2397. // CimenComboPrice60: this.bundle.CimenComboPrice60 || 0,
  2398. // CimenComboPrice30: this.bundle.CimenComboPrice30 || 0,
  2399. // ProcurementType: this.bundle.ProcurementType,
  2400. // SNI1: this.bundle.SNI1,
  2401. // SNI2: this.bundle.SNI2,
  2402. // SNI3: this.bundle.SNI3,
  2403. // SafetyStockLimit: this.bundle.SafetyStockLimit,
  2404. // Location: this.bundle.Location,
  2405. // SellingPrice: this.bundle.Price,
  2406. // RefurbishQuantity: 0,
  2407. // SupplierId: null,
  2408. // HistoryQuantity: this.bundle.TotalQuantity,
  2409. // EmployeeId: this.userData.EmployeeId,
  2410. // IsRefurbish: 1,
  2411. // Position: 'Bundle - Tambah Bundle'
  2412. // }
  2413.  
  2414. /**
  2415. * @obsolete
  2416. * Pindahkan ke tombol simpan
  2417. */
  2418. // if(this.bundle.Category == 'Barang Inti') {
  2419. // bundleAsInventory.inventory.Code = 'BDL/I/' + moment().format('DD') + moment().format('MM') + moment().format('YY') + "/" + moment().format('HH') + moment().format('mm') + moment().format('ss')
  2420. // } else if(this.bundle.Category == 'Barang Hadiah') {
  2421. // bundleAsInventory.inventory.Code = 'BDL/H/' + moment().format('DD') + moment().format('MM') + moment().format('YY') + "/" + moment().format('HH') + moment().format('mm') + moment().format('ss')
  2422. // } else if(this.bundle.Category == 'Paket') {
  2423. // bundleAsInventory.inventory.Code = 'BDL/P/' + moment().format('DD') + moment().format('MM') + moment().format('YY') + "/" + moment().format('HH') + moment().format('mm') + moment().format('ss')
  2424. // } else if(this.bundle.Category == '-') {
  2425. // bundleAsInventory.inventory.Code = 'BDL/L/' + moment().format('DD') + moment().format('MM') + moment().format('YY') + "/" + moment().format('HH') + moment().format('mm') + moment().format('ss')
  2426. // } else {
  2427. // bundleAsInventory.inventory.Code = 'BDL/L/' + moment().format('DD') + moment().format('MM') + moment().format('YY') + "/" + moment().format('HH') + moment().format('mm') + moment().format('ss')
  2428. // }
  2429.  
  2430. // console.log(bundleAsInventory)
  2431. // console.log(this.bundleAsInventory.inventory.BundleId)
  2432. // console.log(this.bundleAsInventory.BundleId)
  2433.  
  2434. /**
  2435. * @obsolete
  2436. * Pindahkan ke tombol simpan
  2437. */
  2438. // let inv = await Inventories.create(bundleAsInventory)
  2439. // let ItemId = inv.data.itemBranchId
  2440.  
  2441. /**
  2442. * @obsolete
  2443. * Pindahkan ke tombol simpan
  2444. */
  2445. // this.bundle.ItemId = ItemId
  2446. // console.log(this.bundle)
  2447.  
  2448. let result = await Bundle.create(this.bundle)
  2449. let id = result.data.id
  2450.  
  2451. /**
  2452. * @obsolete
  2453. * Pindahkan ke tombol simpan
  2454. */
  2455. // bundleAsInventory.BundleId = id
  2456. // console.log(bundleAsInventory)
  2457. // await Inventories.edit(ItemId, bundleAsInventory)
  2458.  
  2459. console.log(this.bundle.Price)
  2460.  
  2461. if(result.status == 200) {
  2462. this.$fire({
  2463. title: 'Sukses',
  2464. text: 'Data Disimpan sebagai draft',
  2465. icon: 'info',
  2466. showConfirmButton: false
  2467. })
  2468. this.$router.push({ name: 'BundleManagement.draft', params: { id: id } })
  2469. location.reload()
  2470. } else {
  2471. this.$fire({
  2472. title: 'Error',
  2473. text: 'Input Data Gagal',
  2474. icon: 'error',
  2475. showConfirmButton: false
  2476. })
  2477. console.log(result)
  2478. }
  2479. } catch (error) {
  2480. alert("Error : " + error.response.data.message)
  2481. }
  2482. },
  2483. tambah: async function () {
  2484.  
  2485. console.log(this.checkInventory)
  2486. console.log(this.bundle)
  2487.  
  2488. // console.log(this.bundle)
  2489. // try {
  2490. // let result = await Bundle.edit(this.$route.params.id, this.bundle)
  2491. // if(result.status == 200) {
  2492. // this.$fire({
  2493. // title: 'Sukses',
  2494. // text: 'Data barang telah Disimpan',
  2495. // icon: 'info',
  2496. // showConfirmButton: false
  2497. // })
  2498. // if(this.$route.name.includes('.draft')) {
  2499. // this.$router.push({ name: 'BundleManagement.draft', params: { id: this.$route.params.id } })
  2500. // location.reload()
  2501. // }
  2502. // if(this.$route.name.includes('.edit')) {
  2503. // this.$router.push({ name: 'BundleManagement.edit', params: { id: this.$route.params.id } })
  2504. // location.reload()
  2505. // }
  2506. // } else {
  2507. // this.$fire({
  2508. // title: 'Error',
  2509. // text: 'Input Data Gagal',
  2510. // icon: 'error',
  2511. // showConfirmButton: false
  2512. // })
  2513. // console.log(result)
  2514. // }
  2515. // } catch (error) {
  2516. // alert("Error : " + error.response.data.message)
  2517. // // this.$fire({
  2518. // // title: 'Error',
  2519. // // text: 'Jumlah barang pada inventory tidak cukup',
  2520. // // icon: 'info',
  2521. // // showConfirmButton: false
  2522. // // })
  2523. // }
  2524.  
  2525. let items = this.selectedInventory
  2526.  
  2527. // console.log(items.itembranch[0].Quantity100 + "=" + parseInt(items.BundleQuantity100))
  2528. // console.log(items.itembranch[0].Quantity90 + "=" + parseInt(items.BundleQuantity90))
  2529. // console.log(items.itembranch[0].Quantity60 + "=" + parseInt(items.BundleQuantity60))
  2530. // console.log(items.itembranch[0].Quantity30 + "=" + parseInt(items.BundleQuantity30))
  2531.  
  2532. /**
  2533. * @deprecated
  2534. * Buka lagi semua
  2535. */
  2536. if((items.itembranch[0].Quantity100 < this.item.BundleQuantity100) || (items.itembranch[0].Quantity90 < this.item.BundleQuantity90) || (items.itembranch[0].Quantity60 < this.item.BundleQuantity60) || (items.itembranch[0].Quantity30 < this.item.BundleQuantity30)) {
  2537. //alert("Jumlah Yang dikeluarkan melebihi batas")
  2538. this.$fire({
  2539. title: 'Error',
  2540. text: 'Jumlah barang pada Daftar Inventory tidak cukup',
  2541. icon: 'info',
  2542. timer: 2000,
  2543. showConfirmButton: false
  2544. })
  2545. } else {
  2546. // let result = await ItemDetails.delete(this.$route.params.id, items)
  2547. // await Bundle.edit(this.$route.params.id, this.bundle)
  2548. // if(result.status == 200) {
  2549. // this.$fire({
  2550. // title: 'Error',
  2551. // text: 'Jumlah barang pada inventory tidak cukup',
  2552. // icon: 'info',
  2553. // showConfirmButton: false
  2554. // })
  2555. // }
  2556.  
  2557. let result
  2558. let result2
  2559.  
  2560. try {
  2561. /**
  2562. * @new
  2563. * Disini selalu update data bundle
  2564. */
  2565. //TO DO
  2566. // await Bundle.edit(this.$route.params.id, this.bundle)
  2567.  
  2568. /**
  2569. * @new
  2570. * Disini create dan edit bundle ke inventory
  2571. * IF inventory untuk bundle ini udh ada
  2572. * -- EDIT inventory
  2573. * ELSE IF inventory untuk bundle ini belum ada
  2574. * -- CREATE inventory
  2575. */
  2576. //TO DO
  2577. let bundleAsInventory = {
  2578. inventory: {
  2579. LegalEntityId: this.userData.LegalEntityId,
  2580. BranchId: this.userData.BranchId,
  2581. Name: this.bundle.Name,
  2582. Code: 'BDL/' + moment().format('DD') + moment().format('MM') + moment().format('YY') + "/" + moment().format('HH') + moment().format('mm') + moment().format('ss'),
  2583. Category: "Bundle - " + this.bundle.Category,
  2584. Identifier: "Bundle",
  2585. Point: this.bundle.Point,
  2586. BuyingPrice: 0,
  2587. IsBundle: true,
  2588. WarehouseCategory: this.bundle.WarehouseCategory,
  2589. IsRefurbish: 1,
  2590. IsMaintenance: this.bundle.IsMaintenance,
  2591. IsDeposit: this.bundle.IsDeposit,
  2592. ItemMasterId: null,
  2593. SupplierId: this.selectedSupplier1.Id,
  2594. SupplierId2: this.selectedSupplier2.Id,
  2595. SupplierId3: this.selectedSupplier3.Id,
  2596. HistoryQuantity: this.bundle.TotalQuantity,
  2597. EmployeeId: this.userData.EmployeeId,
  2598. Position: 'Tambah - Barang Bundle',
  2599. BundleId: this.bundle.Id,
  2600. Price100: this.bundle.BundlePrice100 || 0,
  2601. Price90: this.bundle.BundlePrice90 || 0,
  2602. Price60: this.bundle.BundlePrice60 || 0,
  2603. Price30: this.bundle.BundlePrice30 || 0,
  2604. ExtraPrice100: this.bundle.OwnerPrice100 || 0,
  2605. ExtraPrice90: this.bundle.OwnerPrice90 || 0,
  2606. ExtraPrice60: this.bundle.OwnerPrice60 || 0,
  2607. ExtraPrice30: this.bundle.OwnerPrice30 || 0,
  2608. BazaarPrice100: this.bundle.Bazaar100 || 0,
  2609. BazaarPrice90: this.bundle.Bazaar90 || 0,
  2610. BazaarPrice60: this.bundle.Bazaar60 || 0,
  2611. BazaarPrice30: this.bundle.Bazaar30 || 0,
  2612. BuyingPrice100: this.bundle.BuyingPrice100 || 0,
  2613. BuyingPrice90: this.bundle.BuyingPrice90 || 0,
  2614. BuyingPrice60: this.bundle.BuyingPrice60 || 0,
  2615. BuyingPrice30: this.bundle.BuyingPrice30 || 0,
  2616. SpecialPrice100: this.bundle.SpecialPrice100 || 0,
  2617. SpecialPrice90: this.bundle.SpecialPrice90 || 0,
  2618. SpecialPrice60: this.bundle.SpecialPrice60 || 0,
  2619. SpecialPrice30: this.bundle.SpecialPrice30 || 0,
  2620. PromoPrice100: this.bundle.PromoPrice100 || 0,
  2621. PromoPrice90: this.bundle.PromoPrice90 || 0,
  2622. PromoPrice60: this.bundle.PromoPrice60 || 0,
  2623. PromoPrice30: this.bundle.PromoPrice30 || 0,
  2624. ComboPrice100: this.bundle.ComboPrice100 || 0,
  2625. ComboPrice90: this.bundle.ComboPrice90 || 0,
  2626. ComboPrice60: this.bundle.ComboPrice60 || 0,
  2627. ComboPrice30: this.bundle.ComboPrice30 || 0,
  2628. CipenRegularPrice100: this.bundle.CipenRegularPrice100 || 0,
  2629. CipenRegularPrice90: this.bundle.CipenRegularPrice90 || 0,
  2630. CipenRegularPrice60: this.bundle.CipenRegularPrice60 || 0,
  2631. CipenRegularPrice30: this.bundle.CipenRegularPrice30 || 0,
  2632. CipenSpecialPrice100: this.bundle.CipenSpecialPrice100 || 0,
  2633. CipenSpecialPrice90: this.bundle.CipenSpecialPrice90 || 0,
  2634. CipenSpecialPrice60: this.bundle.CipenSpecialPrice60 || 0,
  2635. CipenSpecialPrice30: this.bundle.CipenSpecialPrice30 || 0,
  2636. CipenPromoPrice100: this.bundle.CipenPromoPrice100 || 0,
  2637. CipenPromoPrice90: this.bundle.CipenPromoPrice90 || 0,
  2638. CipenPromoPrice60: this.bundle.CipenPromoPrice60 || 0,
  2639. CipenPromoPrice30: this.bundle.CipenPromoPrice30 || 0,
  2640. CipenComboPrice100: this.bundle.CipenComboPrice100 || 0,
  2641. CipenComboPrice90: this.bundle.CipenComboPrice90 || 0,
  2642. CipenComboPrice60: this.bundle.CipenComboPrice60 || 0,
  2643. CipenComboPrice30: this.bundle.CipenComboPrice30 || 0,
  2644. CikenRegularPrice100: this.bundle.CikenRegularPrice100 || 0,
  2645. CikenRegularPrice90: this.bundle.CikenRegularPrice90 || 0,
  2646. CikenRegularPrice60: this.bundle.CikenRegularPrice60 || 0,
  2647. CikenRegularPrice30: this.bundle.CikenRegularPrice30 || 0,
  2648. CikenSpecialPrice100: this.bundle.CikenSpecialPrice100 || 0,
  2649. CikenSpecialPrice90: this.bundle.CikenSpecialPrice90 || 0,
  2650. CikenSpecialPrice60: this.bundle.CikenSpecialPrice60 || 0,
  2651. CikenSpecialPrice30: this.bundle.CikenSpecialPrice30 || 0,
  2652. CikenPromoPrice100: this.bundle.CikenPromoPrice100 || 0,
  2653. CikenPromoPrice90: this.bundle.CikenPromoPrice90 || 0,
  2654. CikenPromoPrice60: this.bundle.CikenPromoPrice60 || 0,
  2655. CikenPromoPrice30: this.bundle.CikenPromoPrice30 || 0,
  2656. CikenComboPrice100: this.bundle.CikenComboPrice100 || 0,
  2657. CikenComboPrice90: this.bundle.CikenComboPrice90 || 0,
  2658. CikenComboPrice60: this.bundle.CikenComboPrice60 || 0,
  2659. CikenComboPrice30: this.bundle.CikenComboPrice30 || 0,
  2660. CimenRegularPrice100: this.bundle.CimenRegularPrice100 || 0,
  2661. CimenRegularPrice90: this.bundle.CimenRegularPrice90 || 0,
  2662. CimenRegularPrice60: this.bundle.CimenRegularPrice60 || 0,
  2663. CimenRegularPrice30: this.bundle.CimenRegularPrice30 || 0,
  2664. CimenSpecialPrice100: this.bundle.CimenSpecialPrice100 || 0,
  2665. CimenSpecialPrice90: this.bundle.CimenSpecialPrice90 || 0,
  2666. CimenSpecialPrice60: this.bundle.CimenSpecialPrice60 || 0,
  2667. CimenSpecialPrice30: this.bundle.CimenSpecialPrice30 || 0,
  2668. CimenPromoPrice100: this.bundle.CimenPromoPrice100 || 0,
  2669. CimenPromoPrice90: this.bundle.CimenPromoPrice90 || 0,
  2670. CimenPromoPrice60: this.bundle.CimenPromoPrice60 || 0,
  2671. CimenPromoPrice30: this.bundle.CimenPromoPrice30 || 0,
  2672. CimenComboPrice100: this.bundle.CimenComboPrice100 || 0,
  2673. CimenComboPrice90: this.bundle.CimenComboPrice90 || 0,
  2674. CimenComboPrice60: this.bundle.CimenComboPrice60 || 0,
  2675. CimenComboPrice30: this.bundle.CimenComboPrice30 || 0,
  2676. Quantity100: this.bundle.QuantityBundle100 || 0,
  2677. Quantity90: this.bundle.QuantityBundle90 || 0,
  2678. Quantity60: this.bundle.QuantityBundle60 || 0,
  2679. Quantity30: this.bundle.QuantityBundle30 || 0,
  2680. ProcurementType: this.bundle.ProcurementType,
  2681. SNI1: this.bundle.SNI1,
  2682. SNI2: this.bundle.SNI2,
  2683. SNI3: this.bundle.SNI3,
  2684. },
  2685. LegalEntityId: this.userData.LegalEntityId,
  2686. BranchId: this.userData.BranchId,
  2687. TotalQuantity: this.bundle.TotalQuantity,
  2688. Quantity100: this.bundle.QuantityBundle100 || 0,
  2689. Quantity90: this.bundle.QuantityBundle90 || 0,
  2690. Quantity60: this.bundle.QuantityBundle60 || 0,
  2691. Quantity30: this.bundle.QuantityBundle30 || 0,
  2692. Price100: this.bundle.BundlePrice100 || 0,
  2693. Price90: this.bundle.BundlePrice90 || 0,
  2694. Price60: this.bundle.BundlePrice60 || 0,
  2695. Price30: this.bundle.BundlePrice30 || 0,
  2696. ExtraPrice100: this.bundle.OwnerPrice100 || 0,
  2697. ExtraPrice90: this.bundle.OwnerPrice90 || 0,
  2698. ExtraPrice60: this.bundle.OwnerPrice60 || 0,
  2699. ExtraPrice30: this.bundle.OwnerPrice30 || 0,
  2700. BazaarPrice100: this.bundle.Bazaar100 || 0,
  2701. BazaarPrice90: this.bundle.Bazaar90 || 0,
  2702. BazaarPrice60: this.bundle.Bazaar60 || 0,
  2703. BazaarPrice30: this.bundle.Bazaar30 || 0,
  2704. Picture1: this.bundle.Picture1 || null,
  2705. BuyingPrice100: this.bundle.BuyingPrice100 || 0,
  2706. BuyingPrice90: this.bundle.BuyingPrice90 || 0,
  2707. BuyingPrice60: this.bundle.BuyingPrice60 || 0,
  2708. BuyingPrice30: this.bundle.BuyingPrice30 || 0,
  2709. SpecialPrice100: this.bundle.SpecialPrice100 || 0,
  2710. SpecialPrice90: this.bundle.SpecialPrice90 || 0,
  2711. SpecialPrice60: this.bundle.SpecialPrice60 || 0,
  2712. SpecialPrice30: this.bundle.SpecialPrice30 || 0,
  2713. PromoPrice100: this.bundle.PromoPrice100 || 0,
  2714. PromoPrice90: this.bundle.PromoPrice90 || 0,
  2715. PromoPrice60: this.bundle.PromoPrice60 || 0,
  2716. PromoPrice30: this.bundle.PromoPrice30 || 0,
  2717. ComboPrice100: this.bundle.ComboPrice100 || 0,
  2718. ComboPrice90: this.bundle.ComboPrice90 || 0,
  2719. ComboPrice60: this.bundle.ComboPrice60 || 0,
  2720. ComboPrice30: this.bundle.ComboPrice30 || 0,
  2721. CipenRegularPrice100: this.bundle.CipenRegularPrice100 || 0,
  2722. CipenRegularPrice90: this.bundle.CipenRegularPrice90 || 0,
  2723. CipenRegularPrice60: this.bundle.CipenRegularPrice60 || 0,
  2724. CipenRegularPrice30: this.bundle.CipenRegularPrice30 || 0,
  2725. CipenSpecialPrice100: this.bundle.CipenSpecialPrice100 || 0,
  2726. CipenSpecialPrice90: this.bundle.CipenSpecialPrice90 || 0,
  2727. CipenSpecialPrice60: this.bundle.CipenSpecialPrice60 || 0,
  2728. CipenSpecialPrice30: this.bundle.CipenSpecialPrice30 || 0,
  2729. CipenPromoPrice100: this.bundle.CipenPromoPrice100 || 0,
  2730. CipenPromoPrice90: this.bundle.CipenPromoPrice90 || 0,
  2731. CipenPromoPrice60: this.bundle.CipenPromoPrice60 || 0,
  2732. CipenPromoPrice30: this.bundle.CipenPromoPrice30 || 0,
  2733. CipenComboPrice100: this.bundle.CipenComboPrice100 || 0,
  2734. CipenComboPrice90: this.bundle.CipenComboPrice90 || 0,
  2735. CipenComboPrice60: this.bundle.CipenComboPrice60 || 0,
  2736. CipenComboPrice30: this.bundle.CipenComboPrice30 || 0,
  2737. CikenRegularPrice100: this.bundle.CikenRegularPrice100 || 0,
  2738. CikenRegularPrice90: this.bundle.CikenRegularPrice90 || 0,
  2739. CikenRegularPrice60: this.bundle.CikenRegularPrice60 || 0,
  2740. CikenRegularPrice30: this.bundle.CikenRegularPrice30 || 0,
  2741. CikenSpecialPrice100: this.bundle.CikenSpecialPrice100 || 0,
  2742. CikenSpecialPrice90: this.bundle.CikenSpecialPrice90 || 0,
  2743. CikenSpecialPrice60: this.bundle.CikenSpecialPrice60 || 0,
  2744. CikenSpecialPrice30: this.bundle.CikenSpecialPrice30 || 0,
  2745. CikenPromoPrice100: this.bundle.CikenPromoPrice100 || 0,
  2746. CikenPromoPrice90: this.bundle.CikenPromoPrice90 || 0,
  2747. CikenPromoPrice60: this.bundle.CikenPromoPrice60 || 0,
  2748. CikenPromoPrice30: this.bundle.CikenPromoPrice30 || 0,
  2749. CikenComboPrice100: this.bundle.CikenComboPrice100 || 0,
  2750. CikenComboPrice90: this.bundle.CikenComboPrice90 || 0,
  2751. CikenComboPrice60: this.bundle.CikenComboPrice60 || 0,
  2752. CikenComboPrice30: this.bundle.CikenComboPrice30 || 0,
  2753. CimenRegularPrice100: this.bundle.CimenRegularPrice100 || 0,
  2754. CimenRegularPrice90: this.bundle.CimenRegularPrice90 || 0,
  2755. CimenRegularPrice60: this.bundle.CimenRegularPrice60 || 0,
  2756. CimenRegularPrice30: this.bundle.CimenRegularPrice30 || 0,
  2757. CimenSpecialPrice100: this.bundle.CimenSpecialPrice100 || 0,
  2758. CimenSpecialPrice90: this.bundle.CimenSpecialPrice90 || 0,
  2759. CimenSpecialPrice60: this.bundle.CimenSpecialPrice60 || 0,
  2760. CimenSpecialPrice30: this.bundle.CimenSpecialPrice30 || 0,
  2761. CimenPromoPrice100: this.bundle.CimenPromoPrice100 || 0,
  2762. CimenPromoPrice90: this.bundle.CimenPromoPrice90 || 0,
  2763. CimenPromoPrice60: this.bundle.CimenPromoPrice60 || 0,
  2764. CimenPromoPrice30: this.bundle.CimenPromoPrice30 || 0,
  2765. CimenComboPrice100: this.bundle.CimenComboPrice100 || 0,
  2766. CimenComboPrice90: this.bundle.CimenComboPrice90 || 0,
  2767. CimenComboPrice60: this.bundle.CimenComboPrice60 || 0,
  2768. CimenComboPrice30: this.bundle.CimenComboPrice30 || 0,
  2769. ProcurementType: this.bundle.ProcurementType,
  2770. SNI1: this.bundle.SNI1,
  2771. SNI2: this.bundle.SNI2,
  2772. SNI3: this.bundle.SNI3,
  2773. SafetyStockLimit: this.bundle.SafetyStockLimit,
  2774. Location: this.bundle.Location,
  2775. SellingPrice: this.bundle.Price,
  2776. RefurbishQuantity: 0,
  2777. SupplierId: null,
  2778. HistoryQuantity: this.bundle.TotalQuantity,
  2779. EmployeeId: this.userData.EmployeeId,
  2780. IsRefurbish: 1,
  2781. Position: 'Bundle - Tambah Bundle',
  2782. BundleId: this.bundle.Id
  2783. }
  2784.  
  2785. if(this.bundle.Category == 'Barang Inti') {
  2786. bundleAsInventory.inventory.Code = 'BDL/I/' + moment().format('DD') + moment().format('MM') + moment().format('YY') + "/" + moment().format('HH') + moment().format('mm') + moment().format('ss')
  2787. } else if(this.bundle.Category == 'Barang Hadiah') {
  2788. bundleAsInventory.inventory.Code = 'BDL/H/' + moment().format('DD') + moment().format('MM') + moment().format('YY') + "/" + moment().format('HH') + moment().format('mm') + moment().format('ss')
  2789. } else if(this.bundle.Category == 'Paket') {
  2790. bundleAsInventory.inventory.Code = 'BDL/P/' + moment().format('DD') + moment().format('MM') + moment().format('YY') + "/" + moment().format('HH') + moment().format('mm') + moment().format('ss')
  2791. } else if(this.bundle.Category == '-') {
  2792. bundleAsInventory.inventory.Code = 'BDL/L/' + moment().format('DD') + moment().format('MM') + moment().format('YY') + "/" + moment().format('HH') + moment().format('mm') + moment().format('ss')
  2793. } else {
  2794. bundleAsInventory.inventory.Code = 'BDL/L/' + moment().format('DD') + moment().format('MM') + moment().format('YY') + "/" + moment().format('HH') + moment().format('mm') + moment().format('ss')
  2795. }
  2796.  
  2797. //IF inventory untuk bundle ini belum ada -- START
  2798. if(this.checkInventory == false) {
  2799. let inv = await Inventories.create(bundleAsInventory)
  2800. let ItemId = inv.data.itemBranchId
  2801. console.log(inv.status == 200)
  2802.  
  2803. this.bundle.ItemId = ItemId
  2804.  
  2805. bundleAsInventory.BundleId = this.bundle.Id
  2806. await Inventories.edit(ItemId, bundleAsInventory)
  2807. //IF inventory untuk bundle ini belum ada -- END
  2808. }
  2809. else if(this.checkInventory == true) {
  2810. /**
  2811. * Get ItemId (variable boleh diganti)
  2812. */
  2813. await Inventories.edit(this.getInventory[0].Id, bundleAsInventory)
  2814. }
  2815.  
  2816.  
  2817. if(this.item.BundleQuantity100 == 'undefined') {
  2818. this.item.BundleQuantity100 = 0
  2819. }
  2820. if(this.item.BundleQuantity90 == 'undefined') {
  2821. this.item.BundleQuantity90 = 0
  2822. }
  2823. if(this.item.BundleQuantity60 == 'undefined') {
  2824. this.item.BundleQuantity60 = 0
  2825. }
  2826. if(this.item.BundleQuantity30 == 'undefined') {
  2827. this.item.BundleQuantity30 = 0
  2828. }
  2829. items.Position = "Bundle - Tambah Barang Recahan"
  2830. items.ItemId = items.itembranch[0].Id
  2831. items.Source = "Bundle"
  2832. items.SourceId = this.$route.params.id
  2833. items.Reason = ''
  2834. items.EmployeeId = this.userData.EmployeeId
  2835. items.Quantity100 = this.item.BundleQuantity100
  2836. items.Quantity90 = this.item.BundleQuantity90
  2837. items.Quantity60 = this.item.BundleQuantity60
  2838. items.Quantity30 = this.item.BundleQuantity30
  2839. items.OwnerPrice100 = this.item.ExtraPrice100
  2840. items.OwnerPrice90 = this.item.ExtraPrice90
  2841. items.OwnerPrice60 = this.item.ExtraPrice60
  2842. items.OwnerPrice30 = this.item.ExtraPrice30
  2843. items.Bazaar100 = this.item.BazaarPrice100
  2844. items.Bazaar90 = this.item.BazaarPrice90
  2845. items.Bazaar60 = this.item.BazaarPrice60
  2846. items.Bazaar30 = this.item.BazaarPrice30
  2847. items.TotalQuantity = parseInt(this.item.BundleQuantity100) + parseInt(this.item.BundleQuantity90) + parseInt(this.item.BundleQuantity60) + parseInt(this.item.BundleQuantity30)
  2848. items.BuyingPrice = this.bundle.RecPrice
  2849. items.SellingPrice = this.bundle.Price
  2850. items.BundleQuantity = this.bundle.TotalQuantity
  2851. items.EditorId = this.userData.EmployeeId
  2852. // this.bundle.EmployeeId = this.userData.EmployeeId
  2853.  
  2854. result = await ItemDetails.create(items)
  2855. result2 = await Bundle.edit(this.$route.params.id, this.bundle)
  2856.  
  2857. console.log(result)
  2858. console.log(result2)
  2859.  
  2860. if(result == 200 && result2 == 200) {
  2861. this.$fire({
  2862. title: 'Sukses',
  2863. text: 'Data barang telah Disimpan',
  2864. icon: 'info',
  2865. showConfirmButton: false
  2866. })
  2867. if(this.$route.name.includes('.draft')) {
  2868. this.$router.push({ name: 'BundleManagement.draft', params: { id: this.$route.params.id } })
  2869. location.reload()
  2870. }
  2871. if(this.$route.name.includes('.edit')) {
  2872. this.$router.push({ name: 'BundleManagement.edit', params: { id: this.$route.params.id } })
  2873. location.reload()
  2874. }
  2875. } else {
  2876. this.$fire({
  2877. title: 'Error',
  2878. text: 'Input Data Gagal',
  2879. icon: 'error',
  2880. showConfirmButton: false
  2881. })
  2882. }
  2883. } catch (error) {
  2884. alert("Error : " + error.response.data.message)
  2885. // this.$fire({
  2886. // title: 'Error',
  2887. // text: 'Jumlah barang pada inventory tidak cukup',
  2888. // icon: 'info',
  2889. // showConfirmButton: false
  2890. // })
  2891. }
  2892. }
  2893. },
  2894. hapus: async function(id, json) {
  2895. // console.log(json)
  2896. // json.EmployeeId = this.userData.EmployeeId
  2897. // json.LegalEntityId = this.userData.LegalEntityId
  2898. // json.BranchId = this.userData.BranchId
  2899. // json.Source = "Bundle"
  2900. // json.Position = "Delete Bundle"
  2901. // json.SourceId = this.$route.params.id
  2902. // json.Reason = ''
  2903. // json.BundleQuantity = this.bundle.BundleQuantity
  2904. /**
  2905. * NEW ASSIGN - START
  2906. */
  2907. // let edit = await ItemDetails.detail(id)
  2908. // let datatable = json
  2909. // this.details = edit.data
  2910. /**
  2911. * NEW ASSIGN - END
  2912. */
  2913. json.EditorId = this.userData.EmployeeId
  2914. try {
  2915. /**
  2916. * BACKUP 1 - START
  2917. */
  2918. // datatable = {
  2919. // ItemId: this.selectedInventory.itembranch[0].Id,
  2920. // Source: "Bundle",
  2921. // SourceId: this.$route.params.id,
  2922. // Code: this.selectedInventory.Code,
  2923. // Name: this.selectedInventory.Name,
  2924. // Reason: "",
  2925. // Category: this.selectedInventory.Category,
  2926. // WarehouseCategory: this.selectedInventory.WarehouseCategory,
  2927. // TotalQuantity: this.selectedInventory.itembranch[0].TotalQuantity,
  2928. // Quantity100: this.selectedInventory.itembranch[0].Quantity100,
  2929. // Price100: this.selectedInventory.Price100,
  2930. // BuyingPrice100: this.selectedInventory.BuyingPrice100,
  2931. // Quantity90: this.selectedInventory.itembranch[0].Quantity90,
  2932. // Price90: this.selectedInventory.Price90,
  2933. // BuyingPrice90: this.selectedInventory.BuyingPrice90,
  2934. // Quantity60: this.selectedInventory.itembranch[0].Quantity60,
  2935. // Price60: this.selectedInventory.Price60,
  2936. // BuyingPrice60: this.selectedInventory.BuyingPrice60,
  2937. // Quantity30: this.selectedInventory.itembranch[0].Quantity30,
  2938. // Price30: this.selectedInventory.Price30,
  2939. // BuyingPrice30: this.selectedInventory.BuyingPrice30,
  2940. // SafetyStockLimit: this.selectedInventory.itembranch[0].SafetyStockLimit,
  2941. // Point: this.selectedInventory.Point,
  2942. // Location: this.selectedInventory.itembranch[0].Location,
  2943. // IsAssembly: null,
  2944. // IsRefurbish: this.selectedInventory.IsRefurbish,
  2945. // RefurbishQuantity: this.selectedInventory.itembranch[0].RefurbishQuantity,
  2946. // IsMaintenance: this.selectedInventory.IsMaintenance,
  2947. // IsDeposit: this.selectedInventory.IsDeposit,
  2948. // BuyingPrice: null,
  2949. // SellingPrice: null,
  2950. // IsBundle: this.selectedInventory.IsBundle,
  2951. // Picture1: this.selectedInventory.itembranch[0].Picture1,
  2952. // Picture2: this.selectedInventory.itembranch[0].Picture2,
  2953. // Picture3: this.selectedInventory.itembranch[0].Picture3,
  2954. // Picture4: this.selectedInventory.itembranch[0].Picture4,
  2955. // created_at: null,
  2956. // updated_at: null,
  2957. // SupplierId: this.selectedInventory.SupplierId,
  2958. // LegalEntityId: this.selectedInventory.LegalEntityId,
  2959. // BranchId: this.selectedInventory.BranchId,
  2960. // OwnerPrice100: this.selectedInventory.ExtraPrice100,
  2961. // OwnerPrice90: this.selectedInventory.ExtraPrice90,
  2962. // OwnerPrice60: this.selectedInventory.ExtraPrice60,
  2963. // OwnerPrice30: this.selectedInventory.ExtraPrice30,
  2964. // ShippingCode: "",
  2965. // BazaarPrice100: this.selectedInventory.BazaarPrice100,
  2966. // BazaarPrice90: this.selectedInventory.BazaarPrice90,
  2967. // BazaarPrice60: this.selectedInventory.BazaarPrice60,
  2968. // BazaarPrice30: this.selectedInventory.BazaarPrice30,
  2969. // EditorId: this.editor,
  2970. // }
  2971. /**
  2972. * BACKUP 1 - END
  2973. */
  2974. console.log(this.editor)
  2975.  
  2976. /**
  2977. * BACKUP 2 - START
  2978. */
  2979. // datatable = {
  2980. // ItemId: this.details.ItemId,
  2981. // Source: this.details.Source,
  2982. // SourceId: this.details.SourceId,
  2983. // Code: this.details.Code,
  2984. // Name: this.details.Name,
  2985. // Reason: this.details.Reason,
  2986. // Category: this.details.Category,
  2987. // WarehouseCategory: this.details.WarehouseCategory,
  2988. // TotalQuantity: this.details.TotalQuantity,
  2989. // Quantity100: this.details.Quantity100,
  2990. // Price100: this.details.Price100,
  2991. // BuyingPrice100: this.details.BuyingPrice100,
  2992. // Quantity90: this.details.Quantity90,
  2993. // Price90: this.details.Price90,
  2994. // BuyingPrice90: this.details.BuyingPrice90,
  2995. // Quantity60: this.details.Quantity60,
  2996. // Price60: this.details.Price60,
  2997. // BuyingPrice60: this.details.BuyingPrice60,
  2998. // Quantity30: this.details.Quantity30,
  2999. // Price30: this.details.Price30,
  3000. // BuyingPrice30: this.details.BuyingPrice30,
  3001. // SafetyStockLimit: this.details.SafetyStockLimit,
  3002. // Point: this.details.Point,
  3003. // Location: this.details.Location,
  3004. // IsAssembly: this.details.IsAssembly,
  3005. // IsRefurbish: this.details.IsRefurbish,
  3006. // RefurbishQuantity: this.details.RefurbishQuantity,
  3007. // IsMaintenance: this.details.IsMaintenance,
  3008. // IsDeposit: this.details.IsDeposit,
  3009. // BuyingPrice: this.details.BuyingPrice,
  3010. // SellingPrice: this.details.Selling,
  3011. // IsBundle: this.details.IsBundle,
  3012. // Picture1: this.details.Picture1,
  3013. // Picture2: this.details.Picture2,
  3014. // Picture3: this.details.Picture3,
  3015. // Picture4: this.details.Picture4,
  3016. // created_at: this.details.created_at,
  3017. // updated_at: this.details.updated_at,
  3018. // SupplierId: this.details.SupplierId,
  3019. // LegalEntityId: this.details.LegalEntityId,
  3020. // BranchId: this.details.BranchId,
  3021. // OwnerPrice100: this.details.ExtraPrice100,
  3022. // OwnerPrice90: this.details.ExtraPrice90,
  3023. // OwnerPrice60: this.details.ExtraPrice60,
  3024. // OwnerPrice30: this.details.ExtraPrice30,
  3025. // ShippingCode: this.details.ShippingCode,
  3026. // BazaarPrice100: this.details.BazaarPrice100,
  3027. // BazaarPrice90: this.details.BazaarPrice90,
  3028. // BazaarPrice60: this.details.BazaarPrice60,
  3029. // BazaarPrice30: this.details.BazaarPrice30,
  3030. // EditorId: this.editor,
  3031. // }
  3032. //console.log(datatable)
  3033. /**
  3034. * BACKUP 2 - END
  3035. */
  3036. await ItemDetails.edit(id, json)
  3037. let result = await ItemDetails.delete(id, json)
  3038. if(result.status == 200) {
  3039. this.$fire({
  3040. title: 'Sukses',
  3041. text: 'Data barang telah Dihapus',
  3042. icon: 'info',
  3043. showConfirmButton: false
  3044. })
  3045. // this.$router.push({ name: 'BundleManagement.draft', params: { id: this.$route.params.id } })
  3046. // location.reload()
  3047. if(this.$route.name.includes('.draft')) {
  3048. this.$router.push({ name: 'BundleManagement.draft', params: { id: this.$route.params.id } })
  3049. location.reload()
  3050. }
  3051. if(this.$route.name.includes('.edit')) {
  3052. this.$router.push({ name: 'BundleManagement.edit', params: { id: this.$route.params.id } })
  3053. location.reload()
  3054. }
  3055. } else {
  3056. this.$fire({
  3057. title: 'Error',
  3058. text: 'Input Data Gagal',
  3059. icon: 'error',
  3060. showConfirmButton: false
  3061. })
  3062. console.log(result)
  3063. }
  3064. } catch (error) {
  3065. alert("Masih ada yang salah")
  3066. //console.log(datatable)
  3067. //alert("Error : " + error.response.data.message)
  3068. }
  3069. },
  3070. saveDraft: async function() {
  3071. try {
  3072.  
  3073. if(this.selectedMaintenance == 'Ya') {
  3074. this.bundle.IsMaintenance = 1
  3075. }
  3076. if(this.selectedMaintenance == 'Tidak') {
  3077. this.bundle.IsMaintenance = 0
  3078. }
  3079.  
  3080. if(this.selectedDeposit == 'Ya') {
  3081. this.bundle.IsDeposit = 1
  3082. }
  3083. if(this.selectedDeposit == 'Tidak') {
  3084. this.bundle.IsDeposit = 0
  3085. }
  3086. if(this.selectedAssembly == 'Ya') {
  3087. this.bundle.IsAssembly = 1
  3088. }
  3089.  
  3090. this.bundle.IsAssembly = 1
  3091.  
  3092. // let existingBundleRequest = await Inventories.detail(this.bundle.ItemId)
  3093. // let existingBundle = existingBundleRequest.data
  3094.  
  3095. this.bundle.Price100 = this.bundle.Price
  3096. this.bundle.BuyingPrice = this.bundle.Price
  3097. this.bundle.SellingPrice = this.bundle.Price
  3098. this.bundle.EmployeeId = this.userData.EmployeeId
  3099. // this.bundle.DeliveryStatus = 'Final'
  3100.  
  3101. // if(JSON.parse(JSON.stringify(this.itemdetails)).length == 0) {
  3102. // this.bundle.DeliveryStatus = 'Draft'
  3103. // } else {
  3104. // this.bundle.DeliveryStatus = 'Final'
  3105. // }
  3106.  
  3107. //await Bundle.edit(this.$route.params.id, this.bundle)
  3108.  
  3109. // Masukin ke item perakitan bundlenya dari sini
  3110. //
  3111. //
  3112. // Berakhir disini
  3113.  
  3114. this.$router.push({ name: 'BundleManagement.detail', params: { id: this.$route.params.id } })
  3115. location.reload()
  3116.  
  3117. } catch (error) {
  3118. alert("Error : " + error.response.data.message)
  3119. }
  3120.  
  3121. },
  3122. save: async function() {
  3123.  
  3124. // Fungsi Save Data
  3125. if(this.selectedMaintenance == 'Ya') {
  3126. this.bundle.IsMaintenance = 1
  3127. }
  3128. if(this.selectedMaintenance == 'Tidak') {
  3129. this.bundle.IsMaintenance = 0
  3130. }
  3131.  
  3132. if(this.selectedDeposit == 'Ya') {
  3133. this.bundle.IsDeposit = 1
  3134. }
  3135. if(this.selectedDeposit == 'Tidak') {
  3136. this.bundle.IsDeposit = 0
  3137. }
  3138.  
  3139. // if(this.selectedDeposit == 'Tidak') {
  3140. // this.bundle.IsDeposit = 0
  3141. // }
  3142. // if(this.selectedDeposit == 'Ya') {
  3143. // this.bundle.IsAssembly = 0
  3144. // }
  3145.  
  3146. try {
  3147. let result
  3148.  
  3149. if(this.$route.params.id) {
  3150.  
  3151. // let existingBundleRequest = await Inventories.detail(this.bundle.ItemId)
  3152. // let existingBundle = existingBundleRequest.data
  3153. // await Inventories.edit(this.bundle.ItemId, this.bundle)
  3154.  
  3155. // if (this.selectedSupplier1 == null) {
  3156. // this.selectedSupplier1 = {}
  3157. // }
  3158.  
  3159. this.bundle.Price100 = this.bundle.BundlePrice100
  3160. this.bundle.Price90 = this.bundle.BundlePrice90
  3161. this.bundle.Price60 = this.bundle.BundlePrice60
  3162. this.bundle.Price30 = this.bundle.BundlePrice30
  3163. this.bundle.ExtraPrice100 = this.bundle.OwnerPrice100
  3164. this.bundle.ExtraPrice90 = this.bundle.OwnerPrice90
  3165. this.bundle.ExtraPrice60 = this.bundle.OwnerPrice60
  3166. this.bundle.ExtraPrice30 = this.bundle.OwnerPrice30
  3167. this.bundle.Quantity100 = this.bundle.QuantityBundle100
  3168. this.bundle.Quantity90 = this.bundle.QuantityBundle90
  3169. this.bundle.Quantity60 = this.bundle.QuantityBundle60
  3170. this.bundle.Quantity30 = this.bundle.QuantityBundle30
  3171. this.bundle.BazaarPrice100 = this.bundle.Bazaar100
  3172. this.bundle.BazaarPrice90 = this.bundle.Bazaar90
  3173. this.bundle.BazaarPrice60 = this.bundle.Bazaar60
  3174. this.bundle.BazaarPrice30 = this.bundle.Bazaar30
  3175. // this.bundle.Picture1 = this.bundle.Picture1
  3176. this.bundle.BuyingPrice = this.bundle.Price
  3177. this.bundle.SellingPrice = this.bundle.Price
  3178. this.bundle.EmployeeId = this.userData.EmployeeId
  3179. this.bundle.EditorId = this.userData.EmployeeId
  3180. this.bundle.DeliveryStatus = 'Final'
  3181.  
  3182. // if(JSON.parse(JSON.stringify(this.itemdetails)).length == 0) {
  3183. // this.bundle.DeliveryStatus = 'Draft'
  3184. // } else {
  3185. // this.bundle.DeliveryStatus = 'Final'
  3186. // }
  3187.  
  3188. console.log(JSON.parse(JSON.stringify(this.itemdetails)).length)
  3189.  
  3190. result = await Bundle.edit(this.$route.params.id, this.bundle)
  3191. }
  3192.  
  3193. if(result.status == 200) {
  3194. this.$fire({
  3195. title: 'Sukses',
  3196. text: 'Data Telah diupdate',
  3197. icon: 'info',
  3198. type: 'success',
  3199. showConfirmButton: false
  3200. })
  3201. this.$router.push({ name: 'BundleManagement.index' })
  3202. location.reload()
  3203. } else {
  3204. this.$fire({
  3205. title: 'Error',
  3206. text: 'Input Data Gagal',
  3207. icon: 'error',
  3208. type: 'error',
  3209. showConfirmButton: false,
  3210. })
  3211. console.log(result)
  3212. }
  3213. } catch (error) {
  3214. alert("Error : " + error.response.data.message)
  3215. }
  3216. },
  3217. onChangeImage1(file) {
  3218. this.bundle.Picture1 = file.base64
  3219. },
  3220. lookupData (json, id) {
  3221. let data = []
  3222. for(var i = 0; i < json.length; i++) {
  3223. data[json[i].Id] = json[i]
  3224. }
  3225. return data[id]
  3226. },
  3227. filterInventoryPusat (json) {
  3228. let data = []
  3229. for(var i = 0; i < json.length; i++) {
  3230. if((json[i].LegalEntityId == 1) && (json[i].BranchId == 1)) {
  3231. data.push(json[i])
  3232. }
  3233. }
  3234. return data
  3235. },
  3236. formatDate(time) {
  3237. // Format Tanggal
  3238. var formattedTime = moment(time).format('DD MMMM YYYY HH:mm')
  3239. if(formattedTime == 'Invalid date') {
  3240. formattedTime = '-'
  3241. }
  3242. return formattedTime
  3243. }
  3244. }
  3245. }
  3246. </script>
  3247.  
Add Comment
Please, Sign In to add comment