add.vue 50 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106
  1. <template>
  2. <div id="addOder">
  3. <el-form :model="basicForm" :rules="basicRules" ref="basic" label-width="auto">
  4. <el-row :gutter="10">
  5. <el-col :span="1.5">
  6. <el-form-item label="调出库存组织">
  7. <el-select clearable size="small" v-model="basicForm.deliveryInventoryOrg" :disabled="sonDisable" @change="controlCk" @focus="chooseRefer('ORG_PARAM', true, '调出库存组织')" style="width: 200px">
  8. <el-option v-for="item in chuOrgOptions" :key="item.id" :label="item.name" :value="item.id" />
  9. </el-select>
  10. </el-form-item>
  11. </el-col>
  12. <el-col :span="1.5">
  13. <el-form-item label="订单类型">
  14. <el-select v-model="basicForm.billType" :disabled="sonDisable" size="small" style="width: 200px" clearable>
  15. <el-option v-for="dict in dict.type.sys_allot_billtype" :key="dict.value" :label="dict.label" :value="dict.value">
  16. </el-option>
  17. </el-select>
  18. </el-form-item>
  19. </el-col>
  20. <el-col :span="1.5">
  21. <el-form-item label="单据号">
  22. <el-input
  23. v-model="basicForm.code"
  24. size="small"
  25. :disabled="sonDisable"
  26. clearable
  27. style="width: 200px"
  28. />
  29. </el-form-item>
  30. </el-col>
  31. <el-col :span="1.5">
  32. <el-form-item label="单据日期">
  33. <el-date-picker
  34. v-model="basicForm.billDate"
  35. size="small"
  36. :disabled="sonDisable"
  37. type="date"
  38. clearable
  39. @change="changeBillDate"
  40. value-format="yyyy-MM-dd"
  41. style="width: 200px">
  42. </el-date-picker>
  43. </el-form-item>
  44. </el-col>
  45. <el-col :span="1.5">
  46. <el-form-item label="调拨方式">
  47. <el-select v-model="basicForm.allotType" disabled size="small" style="width: 200px" clearable>
  48. <el-option v-for="dict in dict.type.sys_to_type" :key="dict.value" :label="dict.label" :value="dict.value">
  49. </el-option>
  50. </el-select>
  51. </el-form-item>
  52. </el-col>
  53. <el-col :span="1.5">
  54. <el-form-item label="调拨出库单号">
  55. <el-input
  56. v-model="basicForm.deliveryCode"
  57. size="small"
  58. :disabled="sonDisable"
  59. clearable
  60. style="width: 200px"
  61. />
  62. </el-form-item>
  63. </el-col>
  64. <el-col :span="1.5">
  65. <el-form-item label="调拨入库单号">
  66. <el-input
  67. v-model="basicForm.storageCode"
  68. size="small"
  69. :disabled="sonDisable"
  70. clearable
  71. style="width: 200px"
  72. />
  73. </el-form-item>
  74. </el-col>
  75. <el-col :span="1.5">
  76. <el-form-item label="调入库存组织">
  77. <el-select clearable size="small" v-model="basicForm.storageInventoryOrg" :disabled="sonDisable" @change="controlCk" @focus="chooseRefer('ORG_PARAM', true, '调入库存组织')" style="width: 200px">
  78. <el-option v-for="item in ruOrgOptions" :key="item.id" :label="item.name" :value="item.id" />
  79. </el-select>
  80. </el-form-item>
  81. </el-col>
  82. <el-col :span="1.5">
  83. <el-form-item label="调出业务员">
  84. <el-select clearable size="small" v-model="basicForm.businessPersonal" :disabled="sonDisable" @focus="chooseRefer('CONTACTS_PARAM', true, '调出业务员')" style="width: 200px">
  85. <el-option v-for="item in manOptions" :key="item.id" :label="item.name" :value="item.code" />
  86. </el-select>
  87. </el-form-item>
  88. </el-col>
  89. <el-col :span="1.5">
  90. <el-form-item label="调出部门">
  91. <el-select clearable size="small" v-model="basicForm.deliveryDept" :disabled="sonDisable || isOrg" @focus="chooseRefer('DEPT_PARAM', true, '调出部门', basicForm.deliveryInventoryOrg)" style="width: 200px">
  92. <el-option v-for="item in deptOptions" :key="item.id" :label="item.name" :value="item.id" />
  93. </el-select>
  94. </el-form-item>
  95. </el-col>
  96. <el-col :span="1.5">
  97. <el-form-item label="币种">
  98. <el-select clearable size="small" v-model="basicForm.currency" :disabled="sonDisable" @focus="chooseRefer('CURRENCY_PARAM', true, '币种')" style="width: 200px">
  99. <el-option v-for="item in currencyOptions" :key="item.id" :label="item.name" :value="item.id" />
  100. </el-select>
  101. </el-form-item>
  102. </el-col>
  103. <el-col :span="1.5">
  104. <el-form-item label="折本汇率">
  105. <el-input-number
  106. v-model="basicForm.rate"
  107. size="small"
  108. disabled
  109. :precision="2"
  110. :step="0.1"
  111. :max="10"
  112. style="width: 200px"
  113. ></el-input-number>
  114. </el-form-item>
  115. </el-col>
  116. <el-col :span="1.5">
  117. <el-form-item label="在途归属">
  118. <el-input
  119. v-model="basicForm.onRouteAffilliation"
  120. size="small"
  121. disabled
  122. clearable
  123. style="width: 200px"
  124. />
  125. </el-form-item>
  126. </el-col>
  127. <el-col :span="1.5">
  128. <el-form-item label="总数量">
  129. <el-input
  130. v-model="basicForm.qty"
  131. size="small"
  132. :disabled="sonDisable"
  133. clearable
  134. style="width: 200px"
  135. />
  136. </el-form-item>
  137. </el-col>
  138. <el-col :span="1.5">
  139. <el-form-item label="结算路径">
  140. <el-input
  141. v-model="basicForm.accountPath"
  142. size="small"
  143. :disabled="sonDisable"
  144. clearable
  145. style="width: 200px"
  146. />
  147. </el-form-item>
  148. </el-col>
  149. <el-col :span="1.5">
  150. <el-form-item label="客户">
  151. <el-input
  152. v-model="basicForm.customer"
  153. size="small"
  154. :disabled="sonDisable"
  155. clearable
  156. style="width: 200px"
  157. />
  158. </el-form-item>
  159. </el-col>
  160. <el-col :span="1.5">
  161. <el-form-item label="调入仓库">
  162. <el-select clearable size="small" v-model="basicForm.storageWarehouse" :disabled="sonDisable || isOrg" @change="controlDRHW" @focus="chooseRefer('WAREHOUSE_PARAM', true, '调入仓库', basicForm.storageInventoryOrg, 'N', 'N')" style="width: 200px">
  163. <el-option v-for="item in ruHouseOptions" :key="item.id" :label="item.name" :value="item.id" />
  164. </el-select>
  165. </el-form-item>
  166. </el-col>
  167. <el-col :span="1.5">
  168. <el-form-item label="调出仓库">
  169. <el-select clearable size="small" v-model="basicForm.deliveryWarehouse" :disabled="sonDisable || isOrg" @change="controlDCHW" @focus="chooseRefer('WAREHOUSE_PARAM', true, '调出仓库', basicForm.deliveryInventoryOrg)" style="width: 200px">
  170. <el-option v-for="item in chuHouseOptions" :key="item.id" :label="item.name" :value="item.id" />
  171. </el-select>
  172. </el-form-item>
  173. </el-col>
  174. <el-col :span="1.5">
  175. <el-form-item label="物流项目组">
  176. <el-select v-model="basicForm.materialProject" :disabled="sonDisable" size="small" style="width: 200px" clearable>
  177. <el-option v-for="dict in dict.type.sys_project_group" :key="dict.value" :label="dict.label" :value="dict.value">
  178. </el-option>
  179. </el-select>
  180. </el-form-item>
  181. </el-col>
  182. <el-col :span="1.5">
  183. <el-form-item label="利润中心">
  184. <el-select clearable size="small" v-model="basicForm.liacenter" :disabled="sonDisable" @focus="chooseTreeRefer('LIACENTER_PARAM', false, '利润中心')" style="width: 200px">
  185. <el-option v-for="item in liacenterOptions" :key="item.id" :label="item.name" :value="item.id" />
  186. </el-select>
  187. </el-form-item>
  188. </el-col>
  189. <el-col :span="1.5">
  190. <el-form-item label="单据状态">
  191. <el-select disabled v-model="basicForm.status" size="small" style="width: 200px" clearable>
  192. <el-option v-for="dict in dict.type.sys_status" :key="dict.value" :label="dict.label" :value="dict.value">
  193. </el-option>
  194. </el-select>
  195. </el-form-item>
  196. </el-col>
  197. <el-col :span="1.5">
  198. <el-form-item label="备注">
  199. <el-input
  200. v-model="basicForm.remark"
  201. size="small"
  202. :disabled="sonDisable"
  203. clearable
  204. style="width: 200px"
  205. />
  206. </el-form-item>
  207. </el-col>
  208. </el-row>
  209. <el-row>
  210. <el-col :span="20">
  211. <el-form-item label="同步NC结果">
  212. <el-input
  213. v-model="basicForm.isSendWms"
  214. type="textarea"
  215. :rows="3"
  216. size="small"
  217. disabled
  218. clearable
  219. />
  220. </el-form-item>
  221. </el-col>
  222. </el-row>
  223. <el-tabs style="margin-top: 10px;" type="border-card">
  224. <el-tab-pane label="物料信息">
  225. <div class="btn_grooup">
  226. <el-button type="primary" size="small" v-if="!sonDisable" @click="addLine">增行</el-button>
  227. </div>
  228. <el-table
  229. :data="materialInfo"
  230. fit
  231. max-height="480"
  232. >
  233. <el-table-column show-overflow-tooltip label="行号" align="center" prop="rowno"/>
  234. <el-table-column show-overflow-tooltip label="采购需求单单号" align="center" prop="demandCode" width="200px"/>
  235. <el-table-column show-overflow-tooltip label="物料编码" align="center" prop="materialCode" width="230px">
  236. <template slot-scope="scope">
  237. <el-form-item class="hang">
  238. <el-input clearable :disabled="sonDisable" size="small" v-model="scope.row.materialCode" @focus="chooseMaterial(scope.$index)">
  239. <el-button size="small" :disabled="sonDisable" slot="append" icon="el-icon-more" @click="chooseMaterial(scope.$index)"></el-button>
  240. </el-input>
  241. </el-form-item>
  242. </template>
  243. </el-table-column>
  244. <el-table-column show-overflow-tooltip label="物料名称" align="center" prop="materialName" width="200px"/>
  245. <el-table-column show-overflow-tooltip label="调拨出库单号" align="center" prop="deliveryCode" width="200px"/>
  246. <el-table-column show-overflow-tooltip label="调拨入库单号" align="center" prop="storageCode" width="200px"/>
  247. <el-table-column show-overflow-tooltip label="规格" align="center" prop="specification"/>
  248. <el-table-column show-overflow-tooltip label="生产厂家/代理人" align="center" prop="manufacturer" width="200px"/>
  249. <el-table-column show-overflow-tooltip label="产地" align="center" prop="originPlaceName"/>
  250. <el-table-column show-overflow-tooltip label="型号" align="center" prop="model"/>
  251. <el-table-column show-overflow-tooltip label="单位" align="center" prop="unitName"/>
  252. <!-- <el-table-column show-overflow-tooltip label="调出仓库" align="center" prop="deliveryWarehouseName"/> -->
  253. <el-table-column show-overflow-tooltip label="数量" align="center" prop="qty" width="150px">
  254. <template slot-scope="scope">
  255. <el-form-item class="hang">
  256. <el-input :readonly="sonDisable" clearable size="small" v-model="scope.row.qty" @input="getSL(scope)"/>
  257. </el-form-item>
  258. </template>
  259. </el-table-column>
  260. <el-table-column show-overflow-tooltip label="主单位" align="center" prop="mainUnitName"/>
  261. <el-table-column show-overflow-tooltip label="换算率" align="center" prop="equation"/>
  262. <el-table-column show-overflow-tooltip label="主数量" align="center" prop="mainQty" width="150px">
  263. <template slot-scope="scope">
  264. <el-form-item class="hang">
  265. <el-input :readonly="sonDisable" clearable size="small" v-model="scope.row.mainQty" @input="getZSL(scope)"/>
  266. </el-form-item>
  267. </template>
  268. </el-table-column>
  269. <el-table-column show-overflow-tooltip label="税率" align="center" prop="rate"/>
  270. <el-table-column show-overflow-tooltip label="调出货位" align="center" prop="deliveryAllocationName" width="230px">
  271. <template slot-scope="scope">
  272. <el-form-item class="hang">
  273. <el-input clearable :disabled="sonDisable || isDCCk" size="small" v-model="scope.row.deliveryAllocationName" @focus="chooseMxHW(scope.$index, 'ALLOCATION_PARAM', true, '调出货位', basicForm.deliveryWarehouse)">
  274. <el-button size="small" :disabled="sonDisable || isDCCk" slot="append" icon="el-icon-more" @click="chooseMxHW(scope.$index, 'ALLOCATION_PARAM', true, '调出货位', basicForm.deliveryWarehouse)"></el-button>
  275. </el-input>
  276. </el-form-item>
  277. </template>
  278. </el-table-column>
  279. <el-table-column show-overflow-tooltip label="调入部门" align="center" prop="storageDeptName" width="230px">
  280. <template slot-scope="scope">
  281. <el-form-item class="hang">
  282. <el-input clearable :disabled="sonDisable" size="small" v-model="scope.row.storageDeptName" @focus="chooseMxBM(scope.$index, 'DEPT_PARAM', true, '调入部门', basicForm.storageInventoryOrg)">
  283. <el-button size="small" :disabled="sonDisable" slot="append" icon="el-icon-more" @click="chooseMxBM(scope.$index, 'DEPT_PARAM', true, '调入部门', basicForm.storageInventoryOrg)"></el-button>
  284. </el-input>
  285. </el-form-item>
  286. </template>
  287. </el-table-column>
  288. <el-table-column show-overflow-tooltip label="调入货位" align="center" prop="storageAllocationName" width="230px">
  289. <template slot-scope="scope">
  290. <el-form-item class="hang">
  291. <el-input clearable :disabled="sonDisable || isDRCk" size="small" v-model="scope.row.storageAllocationName" @focus="chooseMxHW(scope.$index, 'ALLOCATION_PARAM', true, '调入货位', basicForm.storageWarehouse)">
  292. <el-button size="small" :disabled="sonDisable || isDRCk" slot="append" icon="el-icon-more" @click="chooseMxHW(scope.$index, 'ALLOCATION_PARAM', true, '调入货位', basicForm.storageWarehouse)"></el-button>
  293. </el-input>
  294. </el-form-item>
  295. </template>
  296. </el-table-column>
  297. <el-table-column show-overflow-tooltip label="批次号" align="center" prop="patchNo" width="150px"/>
  298. <el-table-column show-overflow-tooltip label="产品批号" align="center" prop="producBatch" width="230px">
  299. <template slot-scope="scope">
  300. <el-form-item class="hang">
  301. <el-input readonly size="small" v-model="scope.row.producBatch">
  302. <el-button size="small" :disabled="sonDisable" slot="append" icon="el-icon-more" @click="chooseBatch(scope.$index)"></el-button>
  303. </el-input>
  304. </el-form-item>
  305. </template>
  306. </el-table-column>
  307. <el-table-column show-overflow-tooltip label="生产日期" align="center" prop="manufactureDate" width="230px">
  308. <template slot-scope="scope">
  309. <el-form-item class="hang">
  310. <el-date-picker
  311. v-model="scope.row.manufactureDate"
  312. :readonly="sonDisable"
  313. type="date"
  314. size="small"
  315. value-format="yyyy-MM-dd">
  316. </el-date-picker>
  317. </el-form-item>
  318. </template>
  319. </el-table-column>
  320. <el-table-column show-overflow-tooltip label="有效期至/失效日期" align="center" prop="periodEndDate" width="150px"/>
  321. <el-table-column show-overflow-tooltip label="调拨日期" align="center" prop="allotDate" width="230px">
  322. <template slot-scope="scope">
  323. <el-form-item class="hang">
  324. <el-date-picker
  325. ref="findDate"
  326. v-model="scope.row.allotDate"
  327. :readonly="sonDisable"
  328. type="date"
  329. size="small"
  330. :picker-options="pickerOptionsEnd"
  331. value-format="yyyy-MM-dd">
  332. </el-date-picker>
  333. </el-form-item>
  334. </template>
  335. </el-table-column>
  336. <el-table-column show-overflow-tooltip label="批准文号" align="center" prop="ratifyCode" width="200px"/>
  337. <el-table-column show-overflow-tooltip label="注册证号" align="center" prop="registration" width="200px"/>
  338. <el-table-column show-overflow-tooltip label="商品名" align="center" prop="productCode" width="150px"/>
  339. <el-table-column show-overflow-tooltip label="通用名" align="center" prop="commonCode" width="150px"/>
  340. <el-table-column show-overflow-tooltip label="剂型" align="center" prop="drug"/>
  341. <el-table-column show-overflow-tooltip label="调入调出结算规则明细" align="center" prop="ruleDetail" width="200px"/>
  342. <el-table-column show-overflow-tooltip label="上市许可持有人" align="center" prop="marketingApprovalPersonal" width="200px"/>
  343. <el-table-column show-overflow-tooltip label="生产许可证号/经营许可证号/备案凭证号" align="center" prop="production" width="260px"/>
  344. <el-table-column show-overflow-tooltip label="pi码" align="center" prop="pi">
  345. <template slot-scope="scope">
  346. <el-form-item class="hang">
  347. <el-input :readonly="sonDisable" size="small" v-model="scope.row.pi"/>
  348. </el-form-item>
  349. </template>
  350. </el-table-column>
  351. <!-- <el-table-column show-overflow-tooltip label="无税金额" align="center" prop="code"/> -->
  352. <!-- <el-table-column show-overflow-tooltip label="备注" align="center" prop="code"/> -->
  353. <el-table-column show-overflow-tooltip label="类别" align="center" prop="classify" width="150px"/>
  354. <el-table-column show-overflow-tooltip label="客户物料码" align="center" prop="customerLogistic" width="150px"/>
  355. <el-table-column show-overflow-tooltip label="客户物料名称" align="center" prop="customerLogisticName" width="150px"/>
  356. <el-table-column
  357. fixed="right"
  358. label="操作"
  359. align="center"
  360. >
  361. <template slot-scope="scope">
  362. <el-button type="text" size="small" :disabled="sonDisable" @click="delLine(scope.$index, scope.row)">删除</el-button>
  363. </template>
  364. </el-table-column>
  365. </el-table>
  366. </el-tab-pane>
  367. <el-tab-pane label="收发货信息">
  368. <el-table
  369. :data="receiveInfo"
  370. fit
  371. max-height="480"
  372. >
  373. <el-table-column show-overflow-tooltip label="行号" align="center" prop="rowno"/>
  374. <el-table-column show-overflow-tooltip label="调拨出库单号" align="center" prop="deliveryCode" width="150px"/>
  375. <el-table-column show-overflow-tooltip label="调拨入库单号" align="center" prop="storageCode" width="150px"/>
  376. <el-table-column show-overflow-tooltip label="生产厂家/代理人" align="center" prop="manufacturer" width="150px"/>
  377. <el-table-column show-overflow-tooltip label="产地" align="center" prop="originPlace" width="150px"/>
  378. <el-table-column show-overflow-tooltip label="类别" align="center" prop="classify" width="150px"/>
  379. <el-table-column show-overflow-tooltip label="调出仓库" align="center" prop="deliveryWarehouseName" width="150px"/>
  380. <el-table-column show-overflow-tooltip label="调入仓库" align="center" prop="storageWarehouseName" width="150px"/>
  381. <!-- <el-table-column show-overflow-tooltip label="收货利润中心" align="center" prop="code"/>
  382. <el-table-column show-overflow-tooltip label="发货利润中心" align="center" prop="code"/> -->
  383. <el-table-column show-overflow-tooltip label="调入业务员" align="center" prop="businessPersonalName" width="150px"/>
  384. <el-table-column show-overflow-tooltip label="产品批号" align="center" prop="productBatch" width="150px"/>
  385. <el-table-column show-overflow-tooltip label="生产日期" align="center" prop="manufactureDate" width="150px"/>
  386. <el-table-column show-overflow-tooltip label="有效期至/失效日期" align="center" prop="periodEndDate" width="150px"/>
  387. <el-table-column show-overflow-tooltip label="批准文号" align="center" prop="ratifyCode" width="150px"/>
  388. <el-table-column show-overflow-tooltip label="注册证号" align="center" prop="registration" width="150px"/>
  389. <el-table-column show-overflow-tooltip label="商品名" align="center" prop="productCode" width="150px"/>
  390. <el-table-column show-overflow-tooltip label="通用名" align="center" prop="commonCode" width="150px"/>
  391. <el-table-column show-overflow-tooltip label="剂型" align="center" prop="drug" width="150px"/>
  392. <el-table-column show-overflow-tooltip label="收货客户" align="center" prop="customerName" width="150px"/>
  393. <el-table-column show-overflow-tooltip label="收货地址" align="center" prop="addressaddress" width="150px"/>
  394. <el-table-column show-overflow-tooltip label="收货地区" align="center" prop="area" width="150px"/>
  395. <el-table-column show-overflow-tooltip label="收货地点" align="center" prop="place" width="150px"/>
  396. <el-table-column show-overflow-tooltip label="计划发货日期" align="center" prop="deliveryDate" width="150px"/>
  397. <el-table-column show-overflow-tooltip label="计划到货日期" align="center" prop="strageDate" width="150px"/>
  398. <el-table-column show-overflow-tooltip label="运输方式" align="center" prop="transportation" width="150px"/>
  399. <el-table-column show-overflow-tooltip label="备注" align="center" prop="remark" width="150px"/>
  400. <el-table-column show-overflow-tooltip label="客户物料编码" align="center" prop="customerLogistic" width="150px"/>
  401. <el-table-column show-overflow-tooltip label="客户物料名称" align="center" prop="customerLogisticName" width="150px"/>
  402. </el-table>
  403. </el-tab-pane>
  404. <el-tab-pane label="价格费用">
  405. <el-table
  406. :data="priceList"
  407. fit
  408. max-height="480"
  409. >
  410. <el-table-column show-overflow-tooltip label="行号" align="center" prop="rowno"/>
  411. <el-table-column show-overflow-tooltip label="调拨出库单号" align="center" prop="deliveryCode" width="150px"/>
  412. <el-table-column show-overflow-tooltip label="调拨入库单号" align="center" prop="storageCode" width="150px"/>
  413. <el-table-column show-overflow-tooltip label="生产厂家/代理人" align="center" prop="manufacturer" width="150px"/>
  414. <el-table-column show-overflow-tooltip label="产地" align="center" prop="originPlace" width="150px"/>
  415. <el-table-column show-overflow-tooltip label="类别" align="center" prop="classify" width="150px"/>
  416. <!-- <el-table-column show-overflow-tooltip label="税率" align="center" prop="code"/> -->
  417. <!-- <el-table-column show-overflow-tooltip label="无税单价" align="center" prop="code"/> -->
  418. <!-- <el-table-column show-overflow-tooltip label="含税单价" align="center" prop="code"/> -->
  419. <el-table-column show-overflow-tooltip label="产品批号" align="center" prop="productBatch" width="150px"/>
  420. <el-table-column show-overflow-tooltip label="生产日期" align="center" prop="manufactureDate" width="150px"/>
  421. <el-table-column show-overflow-tooltip label="有效期至/失效日期" align="center" prop="periodEndDate" width="150px"/>
  422. <el-table-column show-overflow-tooltip label="批准文号" align="center" prop="ratifyCode" width="150px"/>
  423. <el-table-column show-overflow-tooltip label="注册证号" align="center" prop="registration" width="150px"/>
  424. <el-table-column show-overflow-tooltip label="商品名" align="center" prop="productCode" width="150px"/>
  425. <el-table-column show-overflow-tooltip label="通用名" align="center" prop="commonCode" width="150px"/>
  426. <el-table-column show-overflow-tooltip label="剂型" align="center" prop="drug" width="150px"/>
  427. <!-- <el-table-column show-overflow-tooltip label="询价无税价" align="center" prop="code"/> -->
  428. <!-- <el-table-column show-overflow-tooltip label="询价含税价" align="center" prop="code"/> -->
  429. <!-- <el-table-column show-overflow-tooltip label="税额" align="center" prop="code"/> -->
  430. <!-- <el-table-column show-overflow-tooltip label="加价率" align="center" prop="code"/> -->
  431. <!-- <el-table-column show-overflow-tooltip label="无税金额" align="center" prop="code"/> -->
  432. <!-- <el-table-column show-overflow-tooltip label="价税合计" align="center" prop="code"/> -->
  433. <el-table-column show-overflow-tooltip label="客户物料码" align="center" prop="customerLogistic" width="150px"/>
  434. <el-table-column show-overflow-tooltip label="客户物料名称" align="center" prop="customerLogisticName" width="150px"/>
  435. </el-table>
  436. </el-tab-pane>
  437. <el-tab-pane label="执行结果">
  438. <el-table
  439. :data="resultList"
  440. fit
  441. max-height="480"
  442. >
  443. <el-table-column show-overflow-tooltip label="行号" align="center" prop="rowno"/>
  444. <el-table-column show-overflow-tooltip label="调拨出库单号" align="center" prop="deliveryCode" width="150px"/>
  445. <el-table-column show-overflow-tooltip label="调拨入库单号" align="center" prop="storageCode" width="150px"/>
  446. <el-table-column show-overflow-tooltip label="生产厂家/代理人" align="center" prop="manufacturer" width="150px"/>
  447. <el-table-column show-overflow-tooltip label="产地" align="center" prop="originPlace" width="150px"/>
  448. <el-table-column show-overflow-tooltip label="类别" align="center" prop="classify" width="150px"/>
  449. <el-table-column show-overflow-tooltip label="产品批号" align="center" prop="productBatch" width="150px"/>
  450. <el-table-column show-overflow-tooltip label="生产日期" align="center" prop="manufactureDate" width="150px"/>
  451. <el-table-column show-overflow-tooltip label="有效期至/失效日期" align="center" prop="periodEndDate" width="150px"/>
  452. <el-table-column show-overflow-tooltip label="批准文号" align="center" prop="ratifyCode" width="150px"/>
  453. <el-table-column show-overflow-tooltip label="注册证号" align="center" prop="registration" width="150px"/>
  454. <el-table-column show-overflow-tooltip label="商品名" align="center" prop="productCode" width="150px"/>
  455. <el-table-column show-overflow-tooltip label="通用名" align="center" prop="commonCode" width="150px"/>
  456. <el-table-column show-overflow-tooltip label="剂型" align="center" prop="drug" width="150px"/>
  457. <!-- <el-table-column show-overflow-tooltip label="已调出主数量" align="center" prop="code"/>
  458. <el-table-column show-overflow-tooltip label="已调入主数量" align="center" prop="code"/> -->
  459. <!-- <el-table-column show-overflow-tooltip label="调拨在途主数量" align="center" prop="code"/> -->
  460. <!-- <el-table-column show-overflow-tooltip label="已发货主数量" align="center" prop="code"/> -->
  461. <!-- <el-table-column show-overflow-tooltip label="途损主数量" align="center" prop="code"/> -->
  462. <!-- <el-table-column show-overflow-tooltip label="累计退货主数量" align="center" prop="code"/> -->
  463. <!-- <el-table-column show-overflow-tooltip label="调出与调入已结算主数量" align="center" prop="code"/> -->
  464. <!-- <el-table-column show-overflow-tooltip label="调出与调入已结算金额" align="center" prop="code"/> -->
  465. <el-table-column show-overflow-tooltip label="客户物料码" align="center" prop="customerLogistic" width="150px"/>
  466. <el-table-column show-overflow-tooltip label="客户物料名称" align="center" prop="customerLogisticName" width="150px"/>
  467. </el-table>
  468. </el-tab-pane>
  469. </el-tabs>
  470. <el-divider content-position="left">表尾信息</el-divider>
  471. <el-row :gutter="10">
  472. <el-col :span="1.5">
  473. <el-form-item label="制单人">
  474. <el-input
  475. v-model="basicForm.createByName"
  476. size="small"
  477. disabled
  478. clearable
  479. style="width: 200px"
  480. />
  481. </el-form-item>
  482. </el-col>
  483. <el-col :span="1.5">
  484. <el-form-item label="制单日期">
  485. <el-input
  486. v-model="basicForm.createTime"
  487. size="small"
  488. disabled
  489. clearable
  490. style="width: 200px"
  491. />
  492. </el-form-item>
  493. </el-col>
  494. <!-- <el-col :span="1.5">
  495. <el-form-item label="审批人">
  496. <el-input
  497. v-model="basicForm.code"
  498. size="small"
  499. disabled
  500. clearable
  501. style="width: 200px"
  502. />
  503. </el-form-item>
  504. </el-col>
  505. <el-col :span="1.5">
  506. <el-form-item label="审批日期">
  507. <el-input
  508. v-model="basicForm.code"
  509. size="small"
  510. disabled
  511. clearable
  512. style="width: 200px"
  513. />
  514. </el-form-item>
  515. </el-col> -->
  516. </el-row>
  517. <el-divider content-position="left">审计信息</el-divider>
  518. <el-row :gutter="10">
  519. <el-col :span="1.5">
  520. <el-form-item label="创建人">
  521. <el-input
  522. v-model="basicForm.createByName"
  523. size="small"
  524. disabled
  525. clearable
  526. style="width: 200px"
  527. />
  528. </el-form-item>
  529. </el-col>
  530. <el-col :span="1.5">
  531. <el-form-item label="创建时间">
  532. <el-input
  533. v-model="basicForm.createTime"
  534. size="small"
  535. disabled
  536. clearable
  537. style="width: 200px"
  538. />
  539. </el-form-item>
  540. </el-col>
  541. <el-col :span="1.5">
  542. <el-form-item label="最后修改人">
  543. <el-input
  544. v-model="basicForm.updateByName"
  545. size="small"
  546. disabled
  547. clearable
  548. style="width: 200px"
  549. />
  550. </el-form-item>
  551. </el-col>
  552. <el-col :span="1.5">
  553. <el-form-item label="最后修改时间">
  554. <el-input
  555. v-model="basicForm.updateTime"
  556. size="small"
  557. disabled
  558. clearable
  559. style="width: 200px"
  560. />
  561. </el-form-item>
  562. </el-col>
  563. </el-row>
  564. </el-form>
  565. <div class="btn_group">
  566. <!-- <el-col :span="1.5">
  567. <el-button type="primary" size="small" plain @click="copy" v-if="sonPageStu == 'check'">复制</el-button>
  568. </el-col> -->
  569. <el-col :span="1.5">
  570. <el-button type="primary" size="small" plain @click="save" v-if="sonPageStu == 'add' || sonPageStu == 'edit'">保存</el-button>
  571. </el-col>
  572. <el-col :span="1.5" style="margin: 0 10px;">
  573. <el-button type="primary" size="small" plain @click="submit" v-if="sonPageStu == 'check' && (row.status == '0' || row.status == '3')">提交</el-button>
  574. </el-col>
  575. <el-col :span="1.5">
  576. <el-button size="small" plain @click="back">返回</el-button>
  577. </el-col>
  578. </div>
  579. <Refers ref="refer" @doSubmit="selectionsToInput" :single="true"/>
  580. <TreeRefers ref="tree" @doSubmit="selectionsToInput2" :single="true"/>
  581. <popDialog ref="materialRefer" @doSubmit="selectMaterial" :single="true" />
  582. <batchRefers ref="batchRefer" @doSubmit="selectBatch" :single="true"/>
  583. </div>
  584. </template>
  585. <script>
  586. import {addOrder, getOrderDetail, editOrder, submitOrder} from '@/api/purchase/transferOrder.js'
  587. import Refers from '@/components/Refers/refers.vue'
  588. // 用于回显参照框数据
  589. import { getRefer } from '@/api/purchase/basic.js'
  590. import TreeRefers from '@/components/Refers/treeRefer.vue'
  591. // 明细行选择物料参照
  592. import popDialog from '@/components/PopDialog/index.vue'
  593. // 明细行选择批次号
  594. import batchRefers from '@/components/Refers/batchRefer.vue'
  595. export default {
  596. name: 'addOder',
  597. dicts: ['sys_allot_billtype', 'sys_project_group', 'sys_status', 'sys_to_type'],
  598. props: ['pageStu','row', 'disable'],
  599. components: {
  600. Refers,
  601. TreeRefers,
  602. popDialog,
  603. batchRefers
  604. },
  605. model: {
  606. prop: 'isList',
  607. event: 'jugislist'
  608. },
  609. data() {
  610. return {
  611. // 不能直接改变props传来的值
  612. sonPageStu: this.pageStu,
  613. sonDisable: this.disable,
  614. basicForm: {
  615. deliveryInventoryOrg: '',
  616. deliveryInventoryOrgCode: '',
  617. deliveryInventoryOrgName: '',
  618. billType: '',
  619. code: '',
  620. billDate: '',
  621. allotType: '',
  622. deliveryCode: '',
  623. storageCode: '',
  624. storageInventoryOrg: '',
  625. storageInventory: '',
  626. storageInventoryOrgName: '',
  627. businessPersonal: '',
  628. businessPersonalName: '',
  629. deliveryDept: '',
  630. deliveryDeptName: '',
  631. currency: '',
  632. currencyName: '',
  633. rate: 1,
  634. onRouteAffilliation: '',
  635. qty: '',
  636. accountPath: '',
  637. customer: '',
  638. customerName: '',
  639. deliveryWarehouse: '',
  640. deliveryWarehouseCode: '',
  641. deliveryWarehouseName: '',
  642. storageWarehouse: '',
  643. storageWarehouseName: '',
  644. materialProject: '',
  645. liacenter: '',
  646. liacenterName: '',
  647. sourceIdentification: '',
  648. isSendWms: '',
  649. status: '0',
  650. tenantId: '',
  651. revision: '',
  652. createByName: '',
  653. updateByName: '',
  654. delFlag: '',
  655. },
  656. referCondition: {
  657. type: '',
  658. isPage: true,
  659. title: '',
  660. // 仓库编码
  661. stordocId: ''
  662. },
  663. referConditionMx: {
  664. orgCode: '',
  665. materialCode: '',
  666. unitCode: '',
  667. warehouseCode: ''
  668. },
  669. options: [{
  670. value: 'Y', label: '是',
  671. }, {
  672. value: 'N', label: '否'
  673. }],
  674. tableIndex: null,
  675. chuOrgOptions: [],
  676. ruOrgOptions:[],
  677. manOptions: [],
  678. deptOptions: [],
  679. currencyOptions: [],
  680. ruHouseOptions: [],
  681. chuHouseOptions: [],
  682. liacenterOptions: [],
  683. basicRules: {},
  684. materialInfo: [],
  685. receiveInfo: [],
  686. priceList: [],
  687. resultList: [],
  688. pickerOptionsEnd: {
  689. disabledDate: (time) => {
  690. let beginDateVal = this.basicForm.billDate;
  691. if (beginDateVal) {
  692. return (
  693. time.getTime() <
  694. new Date(beginDateVal).getTime() - 8.64e7
  695. );
  696. }
  697. }
  698. },
  699. isOrg: true,
  700. isDRCk: true,
  701. isDCCk: true,
  702. }
  703. },
  704. created() {
  705. if(this.pageStu == 'check') {
  706. console.log('数据', this.row)
  707. this.getDetails(this.row)
  708. } else if(this.pageStu == 'edit') {
  709. this.getDetails(this.row)
  710. }
  711. },
  712. methods: {
  713. // 改变单据日期时清空子表的调拨日期
  714. changeBillDate() {
  715. this.materialInfo.forEach(item => {
  716. item.allotDate = null
  717. })
  718. },
  719. // 控制先选调出库存组织和调入库存组织再选调出部门和调入调出仓库
  720. controlCk() {
  721. console.log('进了吗')
  722. if (this.basicForm.deliveryInventoryOrg && this.basicForm.storageInventoryOrg) {
  723. this.isOrg = false
  724. } else {
  725. this.basicForm.deliveryDept = ''
  726. this.basicForm.storageWarehouse = ''
  727. this.basicForm.deliveryWarehouse = ''
  728. this.isOrg = true
  729. // 选择调入库存组织时判断调拨方式
  730. this.basicForm.allotType = ''
  731. }
  732. },
  733. // 控制子表内货位是否可以填写,根据选择仓库内csFlag
  734. controlDCHW() {
  735. console.log("🚀 ~ file: add.vue:735 调出货位")
  736. this.isDCCk = true
  737. this.materialInfo.forEach(item => {
  738. item.deliveryAllocation = null
  739. item.deliveryAllocationName = null
  740. })
  741. },
  742. controlDRHW() {
  743. console.log("🚀 ~ file: add.vue:735 调入货位")
  744. this.isDRCk = true
  745. this.materialInfo.forEach(item => {
  746. item.storageAllocation = null
  747. item.storageAllocationName = null
  748. })
  749. },
  750. // 输入数量或者主数量同步改变
  751. getZSL(scope) {
  752. scope.row.qty = scope.row.mainQty
  753. },
  754. getSL(scope) {
  755. scope.row.mainQty = scope.row.qty
  756. },
  757. copy() {
  758. },
  759. submit() {
  760. this.basicForm.stAllotMaterialList = this.materialInfo
  761. this.basicForm.stAllotReceiveDeliverList = this.receiveInfo
  762. this.basicForm.stAllotReceiveExecuteList = this.priceList
  763. this.basicForm.stAllotReceiveExpenseList = this.resultList
  764. submitOrder(this.basicForm).then(res => {
  765. if (res.code === 200) {
  766. this.$modal.msgSuccess("提交成功");
  767. this.back()
  768. }
  769. })
  770. },
  771. save() {
  772. if(this.pageStu == 'add') {
  773. this.basicForm.stAllotMaterialList = this.materialInfo
  774. this.basicForm.stAllotReceiveDeliverList = this.receiveInfo
  775. this.basicForm.stAllotReceiveExecuteList = this.priceList
  776. this.basicForm.stAllotReceiveExpenseList = this.resultList
  777. addOrder(this.basicForm).then(res => {
  778. if (res.code === 200) {
  779. this.$modal.msgSuccess("保存成功");
  780. this.$emit('jugislist', true)
  781. let queryParams = {
  782. pageNum: 1,
  783. pageSize: 5
  784. }
  785. this.$emit('refresh', queryParams)
  786. }
  787. })
  788. } else if (this.pageStu == 'edit') {
  789. this.basicForm.stAllotMaterialList = this.materialInfo
  790. this.basicForm.stAllotReceiveDeliverList = this.receiveInfo
  791. this.basicForm.stAllotReceiveExecuteList = this.priceList
  792. this.basicForm.stAllotReceiveExpenseList = this.resultList
  793. editOrder(this.basicForm).then(res => {
  794. if (res.code === 200) {
  795. this.$modal.msgSuccess("编辑成功");
  796. this.back()
  797. }
  798. })
  799. }
  800. },
  801. back() {
  802. this.$emit('jugislist', true)
  803. // let queryParams = {
  804. // pageNum: 1,
  805. // pageSize: 5
  806. // }
  807. // this.$emit('refresh', queryParams)
  808. },
  809. // 如果需要回显则调用详情接口
  810. getDetails(row) {
  811. getOrderDetail(row.id).then(res => {
  812. if (res.code === 200) {
  813. this.basicForm = res.data
  814. this.materialInfo = res.data.stAllotMaterialList
  815. this.receiveInfo = res.data.stAllotReceiveDeliverList
  816. this.priceList = res.data.stAllotReceiveExecuteList
  817. this.resultList = res.data.stAllotReceiveExpenseList
  818. if(this.basicForm.deliveryInventoryOrg) { this.reBackRefer('ORG_PARAM', this.basicForm.deliveryInventoryOrg, '调出库存组织') }
  819. if(this.basicForm.storageInventoryOrg) { this.reBackRefer('ORG_PARAM', this.basicForm.storageInventoryOrg, '调入库存组织') }
  820. if(this.basicForm.businessPersonal) { this.reBackRefer('CONTACTS_PARAM', this.basicForm.businessPersonal) }
  821. if(this.basicForm.deliveryDept) { this.reBackRefer('DEPT_PARAM', this.basicForm.deliveryDept) }
  822. if(this.basicForm.currency) { this.reBackRefer('CURRENCY_PARAM', this.basicForm.currency) }
  823. if(this.basicForm.storageWarehouse) { this.reBackRefer('WAREHOUSE_PARAM', this.basicForm.storageWarehouse, '调入仓库') }
  824. if(this.basicForm.deliveryWarehouse) { this.reBackRefer('WAREHOUSE_PARAM', this.basicForm.deliveryWarehouse, '调出仓库') }
  825. if(this.basicForm.liacenter) { this.reBackRefer('LIACENTER_PARAM', this.basicForm.liacenter) }
  826. // 控制先选调出库存组织和调入库存组织再选调出部门和调入调出仓库
  827. this.controlCk()
  828. }
  829. })
  830. },
  831. // 回显参照框
  832. reBackRefer(type, id, title) {
  833. getRefer({ type: type, id: id, title: title }).then(res => {
  834. if (type == 'ORG_PARAM' && title == '调出库存组织') {
  835. this.chuOrgOptions = res.rows
  836. }
  837. if (type == 'ORG_PARAM' && title == '调入库存组织') {
  838. this.ruOrgOptions = res.rows
  839. }
  840. if (type == 'CONTACTS_PARAM') {
  841. this.manOptions = res.rows
  842. }
  843. if (type == 'DEPT_PARAM') {
  844. this.deptOptions = res.rows
  845. }
  846. if (type == 'CURRENCY_PARAM') {
  847. this.currencyOptions = res.rows
  848. }
  849. if (type == 'LIACENTER_PARAM') {
  850. this.liacenterOptions = res.rows
  851. }
  852. if (type == 'WAREHOUSE_PARAM' && title == '调入仓库') {
  853. this.ruHouseOptions = res.rows
  854. }
  855. if (type == 'WAREHOUSE_PARAM' && title == '调出仓库') {
  856. this.chuHouseOptions = res.rows
  857. }
  858. if (type == 'UNIT_PARAM') {
  859. this.materialInfo[this.tableIndex].unitCode = res.rows[0].code
  860. }
  861. })
  862. },
  863. addLine() {
  864. const newLine = {
  865. rowno: null,
  866. demandCode: null,
  867. material: null,
  868. materialCode: null,
  869. materialName: null,
  870. deliveryCode: null,
  871. storageCode: null,
  872. specification: null,
  873. manufacturer: null,
  874. originPlace: null,
  875. originPlaceName: null,
  876. model: null,
  877. unit: null,
  878. unitCode: null,
  879. unitName: null,
  880. deliveryWarehouseName: null,
  881. qty: null,
  882. mainUnit: null,
  883. mainUnitName: null,
  884. equation: '1/1',
  885. mainQty: null,
  886. rate: '0.00',
  887. storageWarehouseName: null,
  888. deliveryAllocationName: null,
  889. deliveryAllocation: null,
  890. storageDept: null,
  891. storageDeptName: null,
  892. storageAllocationName: null,
  893. storageAllocation: null,
  894. patchNo: null,
  895. producBatch: null,
  896. manufactureDate: null,
  897. periodEndDate: null,
  898. allotDate: null,
  899. ratifyCode: null,
  900. registration: null,
  901. productCode: null,
  902. commonCode: null,
  903. drug: null,
  904. ruleDetail: null,
  905. marketingApprovalPersonal: null,
  906. production: null,
  907. pi: null,
  908. classify: null,
  909. customerLogistic: null,
  910. customerLogisticName: null
  911. }
  912. this.materialInfo.push(newLine)
  913. },
  914. delLine(index) {
  915. console.log('删除行:', index)
  916. this.materialInfo.splice(index, 1)
  917. },
  918. chooseRefer(type, isPage, title, pkOrg, isDirectStore, gubFlag) {
  919. this.referCondition.type = type
  920. this.referCondition.isPage = isPage
  921. this.referCondition.title = title
  922. this.referCondition.pkOrg = pkOrg
  923. this.referCondition.isDirectStore = isDirectStore
  924. this.referCondition.gubFlag = gubFlag
  925. this.$refs.refer.init(this.referCondition)
  926. },
  927. selectionsToInput(selection) {
  928. if (this.referCondition.title == '调出库存组织') {
  929. this.chuOrgOptions = selection
  930. this.basicForm.deliveryInventoryOrg = selection[0].id
  931. this.basicForm.deliveryInventoryOrgCode = selection[0].code
  932. this.basicForm.deliveryInventoryOrgName = selection[0].name
  933. // 选择调入库存组织时判断调拨方式
  934. if (this.basicForm.storageInventoryOrg == this.basicForm.deliveryInventoryOrg) {
  935. this.basicForm.allotType = '4'
  936. } else {
  937. this.basicForm.allotType = '2'
  938. }
  939. }
  940. if (this.referCondition.title == '调入库存组织') {
  941. this.ruOrgOptions = selection
  942. this.basicForm.storageInventoryOrg = selection[0].id
  943. this.basicForm.storageInventory = selection[0].code
  944. this.basicForm.storageInventoryOrgName = selection[0].name
  945. this.basicForm.onRouteAffilliation = selection[0].name
  946. // 选择调入库存组织时判断调拨方式
  947. if (this.basicForm.storageInventoryOrg == this.basicForm.deliveryInventoryOrg) {
  948. this.basicForm.allotType = '4'
  949. } else {
  950. this.basicForm.allotType = '2'
  951. }
  952. }
  953. if (this.referCondition.title == '调出业务员') {
  954. this.manOptions = selection
  955. this.basicForm.businessPersonal = selection[0].code
  956. this.basicForm.businessPersonalName = selection[0].name
  957. }
  958. if (this.referCondition.title == '调出部门') {
  959. this.deptOptions = selection
  960. this.basicForm.deliveryDept = selection[0].id
  961. this.basicForm.deliveryDeptName = selection[0].name
  962. }
  963. if (this.referCondition.title == '币种') {
  964. this.currencyOptions = selection
  965. this.basicForm.currency = selection[0].id
  966. this.basicForm.currencyName = selection[0].name
  967. }
  968. if (this.referCondition.title == '调入仓库') {
  969. this.ruHouseOptions = selection
  970. this.basicForm.storageWarehouse = selection[0].id
  971. this.basicForm.storageWarehouseName = selection[0].name
  972. console.log('1111', selection[0].csFlag)
  973. if(selection[0].csFlag == 'N') {
  974. this.isDRCk = true
  975. } else {
  976. this.isDRCk = false
  977. }
  978. }
  979. if (this.referCondition.title == '调出仓库') {
  980. this.chuHouseOptions = selection
  981. this.basicForm.deliveryWarehouse = selection[0].id
  982. this.basicForm.deliveryWarehouseCode = selection[0].code
  983. this.basicForm.deliveryWarehouseName = selection[0].name
  984. console.log('2222', selection[0].csFlag)
  985. if (selection[0].csFlag == 'N') {
  986. this.isDCCk = true
  987. } else {
  988. this.isDCCk = false
  989. }
  990. }
  991. if (this.referCondition.title == '调出货位') {
  992. this.materialInfo[this.tableIndex].deliveryAllocationName = selection[0].name
  993. this.materialInfo[this.tableIndex].deliveryAllocation = selection[0].id
  994. }
  995. if (this.referCondition.title == '调入货位') {
  996. this.materialInfo[this.tableIndex].storageAllocationName = selection[0].name
  997. this.materialInfo[this.tableIndex].storageAllocation = selection[0].id
  998. }
  999. if (this.referCondition.title == '调入部门') {
  1000. this.materialInfo[this.tableIndex].storageDeptName = selection[0].name
  1001. this.materialInfo[this.tableIndex].storageDept = selection[0].id
  1002. }
  1003. // 控制先选调出库存组织和调入库存组织再选调出部门和调入调出仓库
  1004. this.controlCk()
  1005. },
  1006. chooseTreeRefer(type, isPage, title) {
  1007. this.referCondition.type = type
  1008. this.referCondition.isPage = isPage
  1009. this.referCondition.title = title
  1010. this.$refs.tree.init(this.referCondition)
  1011. },
  1012. selectionsToInput2(selection) {
  1013. this.liacenterOptions.push(selection)
  1014. this.basicForm.liacenter = selection.id
  1015. this.basicForm.liacenterName = selection.name
  1016. },
  1017. // 明细行选择物料编码带出数据
  1018. chooseMaterial(index) {
  1019. console.log("🚀 ~ file: add.vue:790 ~ chooseMaterial ~ index:", index)
  1020. this.tableIndex = index
  1021. this.$refs.materialRefer.init()
  1022. },
  1023. selectMaterial(selection) {
  1024. console.log('选中的物料', selection)
  1025. this.materialInfo[this.tableIndex].material = selection[0].id
  1026. this.materialInfo[this.tableIndex].materialCode = selection[0].code
  1027. this.materialInfo[this.tableIndex].materialName = selection[0].name
  1028. this.materialInfo[this.tableIndex].specification = selection[0].specification
  1029. this.materialInfo[this.tableIndex].model = selection[0].model
  1030. this.materialInfo[this.tableIndex].originPlace = selection[0].originPlace
  1031. this.materialInfo[this.tableIndex].originPlaceName = selection[0].originPlaceName
  1032. this.materialInfo[this.tableIndex].unit = selection[0].unitId
  1033. this.materialInfo[this.tableIndex].mainUnit = selection[0].unitId
  1034. this.materialInfo[this.tableIndex].unitName = selection[0].unitIdName
  1035. this.materialInfo[this.tableIndex].mainUnitName = selection[0].unitIdName
  1036. this.materialInfo[this.tableIndex].manufacturer = selection[0].manufacturerIdName
  1037. this.materialInfo[this.tableIndex].marketingApprovalPersonal = selection[0].registrant
  1038. this.materialInfo[this.tableIndex].production = selection[0].productionPermit
  1039. // 根据物料单位id查询单位code
  1040. this.reBackRefer('UNIT_PARAM', selection[0].unitId)
  1041. },
  1042. // 明细行选择批次号
  1043. chooseBatch(index) {
  1044. this.tableIndex = index
  1045. this.referConditionMx.orgCode = this.basicForm.deliveryInventoryOrgCode
  1046. this.referConditionMx.materialCode = this.materialInfo[this.tableIndex].materialCode
  1047. this.referConditionMx.unitCode = this.materialInfo[this.tableIndex].unitCode
  1048. this.referConditionMx.warehouseCode = this.basicForm.deliveryWarehouseCode
  1049. this.$refs.batchRefer.init(this.referConditionMx)
  1050. },
  1051. selectBatch(selection) {
  1052. console.log('选中的批次号', selection)
  1053. },
  1054. // 明细行选择货位
  1055. chooseMxHW(index, type, isPage, title, stordocId) {
  1056. this.tableIndex = index
  1057. this.referCondition.type = type
  1058. this.referCondition.isPage = isPage
  1059. this.referCondition.title = title
  1060. this.referCondition.stordocId = stordocId
  1061. this.$refs.refer.init(this.referCondition)
  1062. },
  1063. // 明细行选择调入部门
  1064. chooseMxBM(index, type, isPage, title, pkOrg) {
  1065. this.tableIndex = index
  1066. this.referCondition.type = type
  1067. this.referCondition.isPage = isPage
  1068. this.referCondition.title = title
  1069. this.referCondition.pkOrg = pkOrg
  1070. this.$refs.refer.init(this.referCondition)
  1071. },
  1072. }
  1073. }
  1074. </script>
  1075. <style lang="scss" scoped>
  1076. .btn_group {
  1077. width: 100%;
  1078. margin: 20px 0;
  1079. display: flex;
  1080. justify-content: center;
  1081. }
  1082. .btn_grooup {
  1083. margin-bottom: 10px;
  1084. display: flex;
  1085. justify-content: flex-end;
  1086. }
  1087. .hang {
  1088. margin: auto;
  1089. }
  1090. .hang ::v-deep .el-form-item__content{
  1091. margin-left: 0px !important;
  1092. }
  1093. </style>