index.vue 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607
  1. <template>
  2. <div id="transferOrder">
  3. <div v-if="isList">
  4. <el-card style="position: relative;">
  5. <el-form class="search_area" label-width="100px">
  6. <el-row :gutter="10">
  7. <el-col :span="1.5">
  8. <el-form-item label="调出库存组织">
  9. <el-select clearable size="mini" v-model="queryParams.deliveryInventoryOrg" @focus="chooseRefer('ORG_PARAM', true, '调出库存组织')" style="width: 200px">
  10. <el-option v-for="item in chuOrgOptions" :key="item.id" :label="item.name" :value="item.id" />
  11. </el-select>
  12. </el-form-item>
  13. </el-col>
  14. <el-col :span="1.5">
  15. <el-form-item label="单据日期">
  16. <el-date-picker
  17. size="mini"
  18. v-model="dateRange"
  19. style="width: 240px"
  20. value-format="yyyy-MM-dd"
  21. type="daterange"
  22. range-separator="-"
  23. ></el-date-picker>
  24. </el-form-item>
  25. </el-col>
  26. <el-col :span="1.5">
  27. <el-form-item label="订单类型">
  28. <el-select v-model="queryParams.billType" size="mini" style="width: 200px" clearable>
  29. <el-option v-for="dict in dict.type.sys_allot_billtype" :key="dict.value" :label="dict.label" :value="dict.value">
  30. </el-option>
  31. </el-select>
  32. </el-form-item>
  33. </el-col>
  34. <el-col :span="1.5">
  35. <el-form-item label="调入库存组织">
  36. <el-select clearable size="mini" v-model="queryParams.storageInventoryOrg" @focus="chooseRefer('ORG_PARAM', true, '调入库存组织')" style="width: 200px">
  37. <el-option v-for="item in ruOrgOptions" :key="item.id" :label="item.name" :value="item.id" />
  38. </el-select>
  39. </el-form-item>
  40. </el-col>
  41. <div style="position: absolute;top: 3px;right: 10px;">
  42. <el-button type="primary" size="mini" @click="searchList">搜索</el-button>
  43. <el-button size="mini" plain @click="resetList">重置</el-button>
  44. </div>
  45. </el-row>
  46. <CollapseTransition>
  47. <div v-show="expanded">
  48. <el-row :gutter="10">
  49. <el-col :span="1.5">
  50. <el-form-item label="单据号">
  51. <el-input
  52. v-model.trim="queryParams.code"
  53. size="mini"
  54. clearable
  55. style="width: 200px"
  56. />
  57. </el-form-item>
  58. </el-col>
  59. <el-col :span="1.5">
  60. <el-form-item label="制单人">
  61. <el-select clearable size="mini" v-model="queryParams.createBy" @focus="chooseRefer('CONTACTS_PARAM', true, '制单人')" style="width: 200px">
  62. <el-option v-for="item in manOptions" :key="item.id" :label="item.name" :value="item.code"/>
  63. </el-select>
  64. </el-form-item>
  65. </el-col>
  66. </el-row>
  67. </div>
  68. </CollapseTransition>
  69. </el-form>
  70. <el-divider class="lines"><i style="cursor: pointer;" :class="expanded?'el-icon-arrow-up':'el-icon-arrow-down'" @click="drop"></i></el-divider>
  71. <div class="btn_grooup">
  72. <el-button type="primary" size="mini" @click="addOrder">新增</el-button>
  73. </div>
  74. <el-table
  75. v-loading="loading"
  76. :data="tableList"
  77. fit
  78. :cell-style="{ borderColor: '#c0c0c0' }"
  79. :header-cell-style="{ borderColor: '#c0c0c0' }"
  80. class="exporttable"
  81. border
  82. show-summary
  83. :summary-method="getSummaries"
  84. highlight-current-row
  85. height="280"
  86. max-height="280"
  87. style="font-size: 12px;"
  88. ref="multipleTable"
  89. @row-click="select"
  90. @row-dblclick="doubleClick"
  91. >
  92. <el-table-column show-overflow-tooltip label="单据号" align="center" prop="code" width="150px"/>
  93. <el-table-column show-overflow-tooltip label="单据状态" align="center" prop="status" width="100px" :formatter="formatterStatus"/>
  94. <el-table-column show-overflow-tooltip label="调出库存组织" align="center" prop="deliveryInventoryOrgName" width="200px"/>
  95. <el-table-column show-overflow-tooltip label="订单类型" align="center" prop="billType" width="220px" :formatter="formatterBillType"/>
  96. <el-table-column show-overflow-tooltip label="单据日期" align="center" prop="billDate" width="100px"/>
  97. <el-table-column show-overflow-tooltip label="调拨方式" align="center" prop="allotType" width="180px">
  98. <template slot-scope="scope">
  99. <span>{{ scope.row.allotType == '2' ? '财务组织间调拨' : '财务组织内库存组织内调拨' }}</span>
  100. </template>
  101. </el-table-column>
  102. <el-table-column show-overflow-tooltip label="调拨出库单号" align="center" prop="deliveryCode" width="150px"/>
  103. <el-table-column show-overflow-tooltip label="调拨入库单号" align="center" prop="storageCode" width="150px"/>
  104. <el-table-column show-overflow-tooltip label="调拨入库组织" align="center" prop="storageInventoryOrgName" width="200px"/>
  105. <el-table-column show-overflow-tooltip label="调出业务员" align="center" prop="businessPersonalName" width="100px"/>
  106. <el-table-column show-overflow-tooltip label="调出部门" align="center" prop="deliveryDeptName" width="120px"/>
  107. <el-table-column show-overflow-tooltip label="币种" align="center" prop="currencyName"/>
  108. <el-table-column show-overflow-tooltip label="折本汇率" align="center" prop="rate"/>
  109. <el-table-column show-overflow-tooltip label="在途归属" align="center" prop="onRouteAffilliation" width="200px"/>
  110. <el-table-column show-overflow-tooltip label="总数量" align="center" prop="qty"/>
  111. <el-table-column show-overflow-tooltip label="结算路径" align="center" prop="accountPath" width="100px"/>
  112. <el-table-column show-overflow-tooltip label="客户" align="center" prop="customerName" width="150px"/>
  113. <el-table-column show-overflow-tooltip label="调出仓库" align="center" prop="deliveryWarehouseName" width="180px"/>
  114. <el-table-column show-overflow-tooltip label="调入仓库" align="center" prop="storageWarehouseName" width="180px"/>
  115. <el-table-column show-overflow-tooltip label="物流项目组" align="center" prop="materialProject" width="120px"/>
  116. <el-table-column show-overflow-tooltip label="利润中心" align="center" prop="liacenterName" width="150px"/>
  117. <!-- <el-table-column show-overflow-tooltip label="已同步WMS" align="center" prop="isSendWms" width="150px"/> -->
  118. <el-table-column show-overflow-tooltip label="备注" align="center" prop="remark" width="150px"/>
  119. <el-table-column show-overflow-tooltip label="制单人" align="center" prop="createByName" width="100px"/>
  120. <el-table-column show-overflow-tooltip label="制单日期" align="center" prop="createTime" width="150px"/>
  121. <!-- <el-table-column show-overflow-tooltip label="审批人" align="center" prop="code" width="150px"/> -->
  122. <!-- <el-table-column show-overflow-tooltip label="审批日期" align="center" prop="code" width="150px"/> -->
  123. <!-- <el-table-column show-overflow-tooltip label="最后修改人" align="center" prop="updateByName" width="100px"/>
  124. <el-table-column show-overflow-tooltip label="最后修改时间" align="center" prop="updateTime" width="150px"/> -->
  125. <el-table-column
  126. fixed="right"
  127. label="操作"
  128. align="center"
  129. width="180"
  130. >
  131. <template slot-scope="scope">
  132. <el-button type="text" size="mini" @click="check(scope.row)">查看</el-button>
  133. <el-button type="text" size="mini" v-if="scope.row.status == '0' || scope.row.status == '3'" @click="edit(scope.row)">编辑</el-button>
  134. <el-button type="text" size="mini" v-if="scope.row.status == '0' || scope.row.status == '3'" @click="commit(scope.row)">提交</el-button>
  135. <el-button type="text" size="mini" v-if="scope.row.status == '0' || scope.row.status == '3'" @click="deleteids(scope.row)">删除</el-button>
  136. </template>
  137. </el-table-column>
  138. </el-table>
  139. <el-pagination
  140. background
  141. @size-change="handleSizeChange"
  142. @current-change="handleCurrentChange"
  143. :current-page="queryParams.pageNum"
  144. :page-sizes="[10, 20, 50, 100]"
  145. :page-size="10"
  146. layout="total, sizes, prev, pager, next, jumper"
  147. :total=total>
  148. </el-pagination>
  149. <el-tabs style="margin-top: 10px;">
  150. <el-tab-pane label="物料信息">
  151. <el-table
  152. :data="materialInfo"
  153. fit
  154. :cell-style="{ borderColor: '#c0c0c0' }"
  155. :header-cell-style="{ borderColor: '#c0c0c0' }"
  156. class="exporttable"
  157. border
  158. height="125"
  159. max-height="125"
  160. style="font-size: 12px;"
  161. >
  162. <el-table-column show-overflow-tooltip label="行号" align="center" prop="rowno"/>
  163. <el-table-column show-overflow-tooltip label="物料编码" align="center" prop="materialCode" width="150px"/>
  164. <el-table-column show-overflow-tooltip label="物料名称" align="center" prop="materialName" width="150px"/>
  165. <el-table-column show-overflow-tooltip label="调拨出库单号" align="center" prop="deliveryCode" width="150px"/>
  166. <el-table-column show-overflow-tooltip label="调拨入库单号" align="center" prop="storageCode" width="150px"/>
  167. <el-table-column show-overflow-tooltip label="规格" align="center" prop="specification"/>
  168. <el-table-column show-overflow-tooltip label="生产厂家/代理人" align="center" prop="manufacturer" width="150px"/>
  169. <el-table-column show-overflow-tooltip label="产地" align="center" prop="originPlace" width="150px"/>
  170. <el-table-column show-overflow-tooltip label="型号" align="center" prop="model"/>
  171. <el-table-column show-overflow-tooltip label="单位" align="center" prop="unitName"/>
  172. <!-- <el-table-column show-overflow-tooltip label="调出仓库" align="center" prop="deliveryWarehouseName"/> -->
  173. <el-table-column show-overflow-tooltip label="数量" align="center" prop="qty"/>
  174. <el-table-column show-overflow-tooltip label="主单位" align="center" prop="mainUnit"/>
  175. <el-table-column show-overflow-tooltip label="换算率" align="center" prop="equation"/>
  176. <el-table-column show-overflow-tooltip label="主数量" align="center" prop="mainQty"/>
  177. <el-table-column show-overflow-tooltip label="税率" align="center" prop="rate"/>
  178. <!-- <el-table-column show-overflow-tooltip label="调入仓库" align="center" prop="storageWarehouseName"/> -->
  179. <el-table-column show-overflow-tooltip label="批次号" align="center" prop="patchNo"/>
  180. <el-table-column show-overflow-tooltip label="产品批号" align="center" prop="producBatch"/>
  181. <el-table-column show-overflow-tooltip label="生产日期" align="center" prop="manufactureDate"/>
  182. <el-table-column show-overflow-tooltip label="有效期至/失效日期" align="center" prop="periodEndDate" width="150px"/>
  183. <el-table-column show-overflow-tooltip label="批准文号" align="center" prop="ratifyCode"/>
  184. <el-table-column show-overflow-tooltip label="注册证号" align="center" prop="registration"/>
  185. <el-table-column show-overflow-tooltip label="商品名" align="center" prop="productCode"/>
  186. <el-table-column show-overflow-tooltip label="通用名" align="center" prop="commonCode" width="150px"/>
  187. <el-table-column show-overflow-tooltip label="剂型" align="center" prop="drug"/>
  188. <el-table-column show-overflow-tooltip label="调入调出结算规则明细" align="center" prop="ruleDetail" width="180px"/>
  189. <el-table-column show-overflow-tooltip label="上市许可持有人" align="center" prop="marketingApprovalPersonal" width="120px"/>
  190. <el-table-column show-overflow-tooltip label="生产许可证号/经营许可证号/备案凭证号" align="center" prop="production" width="260px"/>
  191. <el-table-column show-overflow-tooltip label="pi码" align="center" prop="pi"/>
  192. <!-- <el-table-column show-overflow-tooltip label="无税金额" align="center" prop="code"/> -->
  193. <!-- <el-table-column show-overflow-tooltip label="备注" align="center" prop="code"/> -->
  194. <el-table-column show-overflow-tooltip label="类别" align="center" prop="classify"/>
  195. <el-table-column show-overflow-tooltip label="客户物料码" align="center" prop="customerLogistic" width="150px"/>
  196. <el-table-column show-overflow-tooltip label="客户物料名称" align="center" prop="customerLogisticName" width="150px"/>
  197. </el-table>
  198. </el-tab-pane>
  199. <el-tab-pane label="收发货信息">
  200. <el-table
  201. :data="receiveInfo"
  202. fit
  203. :cell-style="{ borderColor: '#c0c0c0' }"
  204. :header-cell-style="{ borderColor: '#c0c0c0' }"
  205. class="exporttable"
  206. border
  207. max-height="380"
  208. style="font-size: 12px;"
  209. >
  210. <el-table-column show-overflow-tooltip label="行号" align="center" prop="rowno"/>
  211. <el-table-column show-overflow-tooltip label="调拨出库单号" align="center" prop="deliveryCode" width="150px"/>
  212. <el-table-column show-overflow-tooltip label="调拨入库单号" align="center" prop="storageCode" width="150px"/>
  213. <el-table-column show-overflow-tooltip label="生产厂家/代理人" align="center" prop="manufacturer" width="150px"/>
  214. <el-table-column show-overflow-tooltip label="产地" align="center" prop="originPlace" width="150px"/>
  215. <el-table-column show-overflow-tooltip label="类别" align="center" prop="classify" width="150px"/>
  216. <el-table-column show-overflow-tooltip label="调出仓库" align="center" prop="deliveryWarehouseName" width="150px"/>
  217. <el-table-column show-overflow-tooltip label="调入仓库" align="center" prop="storageWarehouseName" width="150px"/>
  218. <!-- <el-table-column show-overflow-tooltip label="收货利润中心" align="center" prop="code"/>
  219. <el-table-column show-overflow-tooltip label="发货利润中心" align="center" prop="code"/> -->
  220. <el-table-column show-overflow-tooltip label="调入业务员" align="center" prop="businessPersonalName" width="150px"/>
  221. <el-table-column show-overflow-tooltip label="产品批号" align="center" prop="productBatch" width="150px"/>
  222. <el-table-column show-overflow-tooltip label="生产日期" align="center" prop="manufactureDate" width="150px"/>
  223. <el-table-column show-overflow-tooltip label="有效期至/失效日期" align="center" prop="periodEndDate" width="150px"/>
  224. <el-table-column show-overflow-tooltip label="批准文号" align="center" prop="ratifyCode" width="150px"/>
  225. <el-table-column show-overflow-tooltip label="注册证号" align="center" prop="registration" width="150px"/>
  226. <el-table-column show-overflow-tooltip label="商品名" align="center" prop="productCode" width="150px"/>
  227. <el-table-column show-overflow-tooltip label="通用名" align="center" prop="commonCode" width="150px"/>
  228. <el-table-column show-overflow-tooltip label="剂型" align="center" prop="drug" width="150px"/>
  229. <el-table-column show-overflow-tooltip label="收货客户" align="center" prop="customerName" width="150px"/>
  230. <el-table-column show-overflow-tooltip label="收货地址" align="center" prop="addressaddress" width="150px"/>
  231. <el-table-column show-overflow-tooltip label="收货地区" align="center" prop="area" width="150px"/>
  232. <el-table-column show-overflow-tooltip label="收货地点" align="center" prop="place" width="150px"/>
  233. <el-table-column show-overflow-tooltip label="计划发货日期" align="center" prop="deliveryDate" width="150px"/>
  234. <el-table-column show-overflow-tooltip label="计划到货日期" align="center" prop="strageDate" width="150px"/>
  235. <el-table-column show-overflow-tooltip label="运输方式" align="center" prop="transportation" width="150px"/>
  236. <el-table-column show-overflow-tooltip label="备注" align="center" prop="remark" width="150px"/>
  237. <el-table-column show-overflow-tooltip label="客户物料编码" align="center" prop="customerLogistic" width="150px"/>
  238. <el-table-column show-overflow-tooltip label="客户物料名称" align="center" prop="customerLogisticName" width="150px"/>
  239. </el-table>
  240. </el-tab-pane>
  241. <el-tab-pane label="价格费用">
  242. <el-table
  243. :data="priceList"
  244. fit
  245. :cell-style="{ borderColor: '#c0c0c0' }"
  246. :header-cell-style="{ borderColor: '#c0c0c0' }"
  247. class="exporttable"
  248. border
  249. max-height="380"
  250. style="font-size: 12px;"
  251. >
  252. <el-table-column show-overflow-tooltip label="行号" align="center" prop="rowno"/>
  253. <el-table-column show-overflow-tooltip label="调拨出库单号" align="center" prop="deliveryCode" width="150px"/>
  254. <el-table-column show-overflow-tooltip label="调拨入库单号" align="center" prop="storageCode" width="150px"/>
  255. <el-table-column show-overflow-tooltip label="生产厂家/代理人" align="center" prop="manufacturer" width="150px"/>
  256. <el-table-column show-overflow-tooltip label="产地" align="center" prop="originPlace" width="150px"/>
  257. <el-table-column show-overflow-tooltip label="类别" align="center" prop="classify" width="150px"/>
  258. <!-- <el-table-column show-overflow-tooltip label="税率" align="center" prop="code"/> -->
  259. <!-- <el-table-column show-overflow-tooltip label="无税单价" align="center" prop="code"/> -->
  260. <!-- <el-table-column show-overflow-tooltip label="含税单价" align="center" prop="code"/> -->
  261. <el-table-column show-overflow-tooltip label="产品批号" align="center" prop="productBatch" width="150px"/>
  262. <el-table-column show-overflow-tooltip label="生产日期" align="center" prop="manufactureDate" width="150px"/>
  263. <el-table-column show-overflow-tooltip label="有效期至/失效日期" align="center" prop="periodEndDate" width="150px"/>
  264. <el-table-column show-overflow-tooltip label="批准文号" align="center" prop="ratifyCode" width="150px"/>
  265. <el-table-column show-overflow-tooltip label="注册证号" align="center" prop="registration" width="150px"/>
  266. <el-table-column show-overflow-tooltip label="商品名" align="center" prop="productCode" width="150px"/>
  267. <el-table-column show-overflow-tooltip label="通用名" align="center" prop="commonCode" width="150px"/>
  268. <el-table-column show-overflow-tooltip label="剂型" align="center" prop="drug" width="150px"/>
  269. <!-- <el-table-column show-overflow-tooltip label="询价无税价" align="center" prop="code"/> -->
  270. <!-- <el-table-column show-overflow-tooltip label="询价含税价" align="center" prop="code"/> -->
  271. <!-- <el-table-column show-overflow-tooltip label="税额" align="center" prop="code"/> -->
  272. <!-- <el-table-column show-overflow-tooltip label="加价率" align="center" prop="code"/> -->
  273. <!-- <el-table-column show-overflow-tooltip label="无税金额" align="center" prop="code"/> -->
  274. <!-- <el-table-column show-overflow-tooltip label="价税合计" align="center" prop="code"/> -->
  275. <el-table-column show-overflow-tooltip label="客户物料码" align="center" prop="customerLogistic" width="150px"/>
  276. <el-table-column show-overflow-tooltip label="客户物料名称" align="center" prop="customerLogisticName" width="150px"/>
  277. </el-table>
  278. </el-tab-pane>
  279. <el-tab-pane label="执行结果">
  280. <el-table
  281. :data="resultList"
  282. fit
  283. :cell-style="{ borderColor: '#c0c0c0' }"
  284. :header-cell-style="{ borderColor: '#c0c0c0' }"
  285. class="exporttable"
  286. border
  287. max-height="380"
  288. style="font-size: 12px;"
  289. >
  290. <el-table-column show-overflow-tooltip label="行号" align="center" prop="rowno"/>
  291. <el-table-column show-overflow-tooltip label="调拨出库单号" align="center" prop="deliveryCode" width="150px"/>
  292. <el-table-column show-overflow-tooltip label="调拨入库单号" align="center" prop="storageCode" width="150px"/>
  293. <el-table-column show-overflow-tooltip label="生产厂家/代理人" align="center" prop="manufacturer" width="150px"/>
  294. <el-table-column show-overflow-tooltip label="产地" align="center" prop="originPlace" width="150px"/>
  295. <el-table-column show-overflow-tooltip label="类别" align="center" prop="classify" width="150px"/>
  296. <el-table-column show-overflow-tooltip label="产品批号" align="center" prop="productBatch" width="150px"/>
  297. <el-table-column show-overflow-tooltip label="生产日期" align="center" prop="manufactureDate" width="150px"/>
  298. <el-table-column show-overflow-tooltip label="有效期至/失效日期" align="center" prop="periodEndDate" width="150px"/>
  299. <el-table-column show-overflow-tooltip label="批准文号" align="center" prop="ratifyCode" width="150px"/>
  300. <el-table-column show-overflow-tooltip label="注册证号" align="center" prop="registration" width="150px"/>
  301. <el-table-column show-overflow-tooltip label="商品名" align="center" prop="productCode" width="150px"/>
  302. <el-table-column show-overflow-tooltip label="通用名" align="center" prop="commonCode" width="150px"/>
  303. <el-table-column show-overflow-tooltip label="剂型" align="center" prop="drug" width="150px"/>
  304. <!-- <el-table-column show-overflow-tooltip label="已调出主数量" align="center" prop="code"/>
  305. <el-table-column show-overflow-tooltip label="已调入主数量" align="center" prop="code"/> -->
  306. <!-- <el-table-column show-overflow-tooltip label="调拨在途主数量" align="center" prop="code"/> -->
  307. <!-- <el-table-column show-overflow-tooltip label="已发货主数量" align="center" prop="code"/> -->
  308. <!-- <el-table-column show-overflow-tooltip label="途损主数量" align="center" prop="code"/> -->
  309. <!-- <el-table-column show-overflow-tooltip label="累计退货主数量" align="center" prop="code"/> -->
  310. <!-- <el-table-column show-overflow-tooltip label="调出与调入已结算主数量" align="center" prop="code"/> -->
  311. <!-- <el-table-column show-overflow-tooltip label="调出与调入已结算金额" align="center" prop="code"/> -->
  312. <el-table-column show-overflow-tooltip label="客户物料码" align="center" prop="customerLogistic" width="150px"/>
  313. <el-table-column show-overflow-tooltip label="客户物料名称" align="center" prop="customerLogisticName" width="150px"/>
  314. </el-table>
  315. </el-tab-pane>
  316. </el-tabs>
  317. </el-card>
  318. </div>
  319. <Add v-model="isList" v-if="!isList" :pageStu="page" :disable="disable" :row="rowDetail" @refresh="searchList"/>
  320. <Refers ref="refer" @doSubmit="selectionsToInput" :single="true"/>
  321. </div>
  322. </template>
  323. <script>
  324. import Add from './add.vue'
  325. import CollapseTransition from '@/components/MyCollapse/collapse.vue'
  326. import Refers from '@/components/Refers/refers.vue'
  327. import {getOrderList, delOrder, submitOrder } from '@/api/purchase/transferOrder.js'
  328. export default {
  329. name: 'transferOrder',
  330. dicts: ['sys_allot_billtype'],
  331. components: {
  332. Add,
  333. CollapseTransition,
  334. Refers
  335. },
  336. data() {
  337. return {
  338. loading: true,
  339. expanded: false,
  340. // 页面配置
  341. isList: true,
  342. // 页面状态
  343. page: '',
  344. queryParams: {
  345. deliveryInventoryOrg: '',
  346. storageInventoryOrg: '',
  347. code: '',
  348. createBy:'',
  349. pageNum: 1,
  350. pageSize: 10
  351. },
  352. //单据日期查询范围
  353. dateRange:[],
  354. referCondition: {
  355. type: '',
  356. isPage: true,
  357. title: '',
  358. },
  359. options: [{
  360. value: '1', label: '是',
  361. }, {
  362. value: '0', label: '否'
  363. }],
  364. chuOrgOptions: [],
  365. ruOrgOptions: [],
  366. manOptions: [],
  367. tableList: [],
  368. total: 0,
  369. materialInfo: [],
  370. receiveInfo: [],
  371. priceList: [],
  372. resultList: [],
  373. rowDetail: {},
  374. disable: false,
  375. ids: []
  376. }
  377. },
  378. created() {
  379. this.getList(this.queryParams)
  380. },
  381. methods: {
  382. // 指定列合计
  383. getSummaries(param) {
  384. const { columns, data } = param;
  385. const sums = [];
  386. columns.forEach((column, index) => {
  387. if (index === 0) {
  388. sums[index] = '合计';
  389. return;
  390. }
  391. const values = data.map(item => Number(item[column.property]));
  392. if (column.property === 'qty') {
  393. sums[index] = values.reduce((prev, curr) => {
  394. const value = Number(curr);
  395. if (!isNaN(value)) {
  396. return prev + curr;
  397. } else {
  398. return prev;
  399. }
  400. }, 0);
  401. sums[index];
  402. }
  403. });
  404. return sums
  405. },
  406. formatterBillType(row) {
  407. switch (row.billType) {
  408. case '5X-01':
  409. return '普通+不传wms+外仓互调(同组织)'
  410. case '5X-Cxx-01':
  411. return '普通+传wms+外仓调中心仓'
  412. case '5X-Cxx-02':
  413. return '普通+传wms+中心仓调中心仓(跨组织)'
  414. case '5X-Cxx-03':
  415. return '普通+传wms+中心仓调外仓'
  416. case '5X-Cxx-04':
  417. return '普通+传wms+中心仓中心分仓互调'
  418. case '5X-Cxx-05':
  419. return 'GH+不传WMS+外仓互调(同组织)'
  420. case '5X-Cxx-06':
  421. return 'GH+传WMS+中心仓调外仓'
  422. case '5X-Cxx-07':
  423. return 'GH+传WMS+外仓调中心仓'
  424. case '5X-Cxx-08':
  425. return 'GH+传WMS+中心仓调中心仓'
  426. case '5X-Cxx-09':
  427. return 'GH+传WMS+中心仓中心分仓互调'
  428. }
  429. },
  430. // 格式化表格内容
  431. formatterStatus(row) {
  432. switch (row.status) {
  433. case '0':
  434. return '未提交'
  435. case '1':
  436. return '审批中'
  437. case '2':
  438. return '已完成'
  439. case '3':
  440. return '已驳回'
  441. }
  442. },
  443. searchList() {
  444. this.getList(this.queryParams)
  445. },
  446. resetList() {
  447. this.dateRange = [];
  448. this.queryParams = {
  449. deliveryInventoryOrg: '',
  450. billType: '',
  451. storageInventoryOrg: '',
  452. code: '',
  453. createBy:'',
  454. pageNum: 1,
  455. pageSize: 10
  456. }
  457. this.getList(this.queryParams)
  458. },
  459. getList(params){
  460. getOrderList(this.addDateRange(params, this.dateRange)).then(res => {
  461. if (res.code === 200) {
  462. this.tableList = res.rows
  463. this.total = res.total
  464. this.materialInfo = res.rows[0].stAllotMaterialList
  465. }
  466. }).then(() => {
  467. // 合计不显示重绘
  468. this.$refs.multipleTable.doLayout()
  469. this.loading = false
  470. }).catch(err => {
  471. this.loading = false
  472. })
  473. },
  474. addOrder() {
  475. this.isList = false
  476. this.page = 'add'
  477. this.disable = false
  478. },
  479. check(row) {
  480. this.isList = false
  481. this.page = 'check'
  482. this.rowDetail = row
  483. this.disable = true
  484. },
  485. doubleClick(row) {
  486. this.isList = false
  487. this.page = 'check'
  488. this.rowDetail = row
  489. this.disable = true
  490. },
  491. edit(row) {
  492. this.isList = false
  493. this.page = 'edit'
  494. this.rowDetail = row
  495. this.disable = false
  496. },
  497. commit(row) {
  498. this.$modal.loading("提交中...");
  499. submitOrder(row).then(res => {
  500. if (res.code === 200) {
  501. this.$modal.closeLoading();
  502. this.$modal.notifySuccess("提交成功");
  503. this.getList(this.queryParams)
  504. }
  505. }).catch(err => {
  506. this.$modal.closeLoading();
  507. })
  508. },
  509. //查询条件单据日期改变后
  510. billDateAfterChange(val){
  511. console.log('val',val);
  512. },
  513. // 选中某行
  514. select(row) {
  515. console.log('选中', row)
  516. this.materialInfo = row.stAllotMaterialList
  517. },
  518. // 行内删除
  519. deleteids(row) {
  520. console.log('row', row)
  521. this.$modal.confirm('确认信息').then(() => {
  522. delOrder(row.id).then(res => {
  523. if (res.code === 200) {
  524. this.$modal.notifySuccess("删除成功");
  525. this.getList(this.queryParams)
  526. }
  527. })
  528. }).catch(() => {})
  529. },
  530. handleSizeChange(val) {
  531. console.log(`每页 ${val} 条`);
  532. this.queryParams.pageSize = val
  533. this.getList(this.queryParams)
  534. },
  535. handleCurrentChange(val) {
  536. console.log(`当前页: ${val}`);
  537. this.queryParams.pageNum = val
  538. this.getList(this.queryParams)
  539. },
  540. drop() {
  541. this.expanded = !this.expanded
  542. },
  543. chooseRefer(type, isPage, title) {
  544. this.referCondition.type = type
  545. this.referCondition.isPage = isPage
  546. this.referCondition.title = title
  547. this.$refs.refer.init(this.referCondition)
  548. },
  549. selectionsToInput(selection) {
  550. if (this.referCondition.title == '调出库存组织') {
  551. this.chuOrgOptions = selection
  552. this.queryParams.deliveryInventoryOrg = selection[0].id
  553. }
  554. if (this.referCondition.title == '调入库存组织') {
  555. this.ruOrgOptions = selection
  556. this.queryParams.storageInventoryOrg = selection[0].id
  557. }
  558. if (this.referCondition.title == '制单人') {
  559. this.manOptions = selection
  560. this.queryParams.createBy = selection[0].code
  561. }
  562. },
  563. }
  564. }
  565. </script>
  566. <style lang="scss" scoped>
  567. #transferOrder {
  568. padding: 12px;
  569. box-sizing: border-box;
  570. overflow-y: scroll;
  571. }
  572. .btn_grooup {
  573. margin-bottom: 10px;
  574. display: flex;
  575. justify-content: flex-end;
  576. }
  577. .lines {
  578. margin-top: 0;
  579. }
  580. .el-pagination {
  581. margin-top: 10px;
  582. text-align: right;
  583. }
  584. ::v-deep .el-table__row > td {
  585. border-right: none;
  586. }
  587. ::v-deep .el-card .el-form-item {
  588. margin-bottom: 3px;
  589. }
  590. </style>
  591. <style>
  592. .exporttable {
  593. border: solid 1px #c0c0c0;
  594. }
  595. </style>