Elizabeth's proactive approach involves introducing urinal toilet attachment , an ingenious concept that optimizes space and functionality.

cancelDrugStockOrderAdd.vue 26KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778
  1. <template>
  2. <div class="main-contain">
  3. <div class="position">
  4. <bread-crumb
  5. v-if="this.$route.query.type == 1"
  6. :crumbs="crumbs"
  7. ></bread-crumb>
  8. <bread-crumb
  9. v-if="this.$route.query.type == 2"
  10. :crumbs="crumbs2"
  11. ></bread-crumb>
  12. <div style="float:right;">
  13. <el-button size="small" @click="back()" class="filter-item"
  14. >取 消</el-button
  15. >
  16. <el-button
  17. size="small"
  18. type="primary"
  19. @click="submit()"
  20. class="filter-item"
  21. >保 存</el-button
  22. >
  23. </div>
  24. </div>
  25. <div class="app-container">
  26. <drugs-stock-dialog
  27. ref="dialog"
  28. :propForm="propForm"
  29. :visibility="isVisibility"
  30. v-on:dialog-comfirm="comfirm"
  31. v-on:dialog-cancle="cancle"
  32. >
  33. </drugs-stock-dialog>
  34. <div class="filter-container">
  35. <div class="cell clearfix">
  36. <label class="title"><span class="name">退库时间</span> : </label>
  37. <el-date-picker
  38. size="small"
  39. v-model="return_time"
  40. prefix-icon="el-icon-date"
  41. :editable="false"
  42. style="width: 196px;"
  43. type="date"
  44. placeholder="选择日期时间"
  45. align="right"
  46. format="yyyy-MM-dd"
  47. value-format="yyyy-MM-dd"
  48. ></el-date-picker>
  49. </div>
  50. </div>
  51. <el-form :rules="tableRules" :model="recordInfo" ref="tableForm">
  52. <el-table
  53. :data="recordInfo.recordData"
  54. :class="signAndWeighBoxPatients"
  55. style="width: 100%"
  56. border
  57. max-height="450"
  58. :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)' }"
  59. >
  60. <el-table-column align="center" width="200" fixed="left">
  61. <template slot="header" slot-scope="scope">
  62. <span>药品名称<span style="color: red">*</span></span>
  63. </template>
  64. <template slot-scope="scope">
  65. <el-form-item style="padding-top: 20px">
  66. <el-autocomplete
  67. class="checkSearch"
  68. popper-class="my-autocomplete"
  69. v-model="scope.row.drug_name"
  70. :fetch-suggestions="querySearchAsync"
  71. :trigger-on-focus="true"
  72. placeholder="请输入药品名称"
  73. @select="handleSelect"
  74. @input="changeDrugName(scope.$index)"
  75. style="width:160px;"
  76. >
  77. <i class="el-icon-search el-input__icon" slot="suffix"></i>
  78. <template slot-scope="{ item }">
  79. <div class="name">{{ item.drug_name + item.dose + item.dose_unit + "*" +item.min_number + item.min_unit +"/" + item.max_unit + " "+item.manufacturer}}</div>
  80. </template>
  81. </el-autocomplete>
  82. </el-form-item>
  83. </template>
  84. </el-table-column>
  85. <el-table-column align="center" width="140">
  86. <template slot="header" slot-scope="scope">
  87. <span>规格&单位</span>
  88. </template>
  89. <template slot-scope="scope">
  90. <el-form-item style="padding-top: 20px">
  91. <el-input
  92. :disabled="true"
  93. placeholder="请输入规格&单位"
  94. v-model="scope.row.name"
  95. ></el-input>
  96. </el-form-item>
  97. </template>
  98. </el-table-column>
  99. <el-table-column width="200" align="center">
  100. <template slot="header" slot-scope="scope">
  101. <span>退库数量<span style="color: red">*</span></span>
  102. </template>
  103. <template slot-scope="scope">
  104. <el-form-item
  105. :prop="'recordData.' + scope.$index + '.return_count'"
  106. :rules="tableRules.return_count"
  107. style="padding-top: 17px"
  108. >
  109. <div style="display:flex;">
  110. <el-input
  111. oninput="value=value.replace(/\D|^0/g,'')"
  112. style="width:100px"
  113. placeholder="请输入退库数量"
  114. type="number"
  115. v-model="scope.row.return_count"
  116. ></el-input>
  117. <el-select v-model="scope.row.max_unit" filterable placeholder="请选择单位" style="width:80px">
  118. <el-option
  119. v-for="(option, index) in unitList"
  120. :key="index"
  121. :label="option.name"
  122. :value="option.name">
  123. </el-option>
  124. </el-select>
  125. </div>
  126. </el-form-item>
  127. </template>
  128. </el-table-column>
  129. <el-table-column align="center" width="150">
  130. <template slot="header" slot-scope="scope">
  131. <span>退库单价<span style="color: red">*</span></span>
  132. </template>
  133. <template slot-scope="scope">
  134. <el-form-item
  135. :prop="'recordData.' + scope.$index + '.price'"
  136. :rules="tableRules.price"
  137. style="padding-top: 17px"
  138. >
  139. <el-input
  140. placeholder="请输入单价"
  141. type="number"
  142. v-model="scope.row.price"
  143. ></el-input>
  144. </el-form-item>
  145. </template>
  146. </el-table-column>
  147. <el-table-column label="总价" align="center" width="150">
  148. <template slot-scope="scope">
  149. {{ calculate(scope.row.price * scope.row.return_count) }}
  150. </template>
  151. </el-table-column>
  152. <el-table-column width="200" align="center">
  153. <template slot="header" slot-scope="scope">
  154. <span>批次<span style="color: red"></span></span>
  155. </template>
  156. <template slot-scope="scope">
  157. <el-form-item
  158. :prop="'recordData.' + scope.$index + '.return_count'"
  159. style="padding-top: 17px"
  160. >
  161. <el-select v-model="scope.row.batch_number" filterable placeholder="请选择">
  162. <el-option
  163. v-for="(item,index) in scope.row.drug_warehouse_info"
  164. :key="index"
  165. :label="item.batch_number"
  166. :value="item.id">
  167. </el-option>
  168. </el-select>
  169. </el-form-item>
  170. </template>
  171. </el-table-column>
  172. <el-table-column width="200" align="center">
  173. <template slot="header" slot-scope="scope">
  174. <span>品名/注册证号(备案凭证号)<span style="color: red"></span></span>
  175. </template>
  176. <template slot-scope="scope">
  177. <el-form-item
  178. :prop="'recordData.' + scope.$index + '.register_account'"
  179. style="padding-top: 17px"
  180. >
  181. <el-input v-model="scope.row.register_account"></el-input>
  182. </el-form-item>
  183. </template>
  184. </el-table-column>
  185. <el-table-column label="生产厂家" width="160" align="center">
  186. <template slot-scope="scope">
  187. <el-select v-model="scope.row.manufacturer" filterable placeholder="请选择厂商">
  188. <el-option
  189. v-for="(option, index) in manufacturerList"
  190. :key="index"
  191. :label="option.manufacturer_name"
  192. :value="option.manufacturer_name">
  193. </el-option>
  194. </el-select>
  195. </template>
  196. </el-table-column>
  197. <el-table-column label="生产日期" width="180" align="center">
  198. <template slot-scope="scope">
  199. <el-date-picker
  200. prefix-icon="el-icon-date"
  201. style="width: 145px"
  202. v-model="scope.row.product_date"
  203. type="date"
  204. placeholder="选择日期时间"
  205. format="yyyy-MM-dd"
  206. value-format="yyyy-MM-dd"
  207. ></el-date-picker>
  208. </template>
  209. </el-table-column>
  210. <el-table-column label="有效日期" width="180" align="center">
  211. <template slot-scope="scope">
  212. <el-date-picker
  213. prefix-icon="el-icon-date"
  214. style="width: 145px"
  215. v-model="scope.row.expiry_date"
  216. type="date"
  217. placeholder="选择日期时间"
  218. format="yyyy-MM-dd"
  219. value-format="yyyy-MM-dd"
  220. ></el-date-picker>
  221. </template>
  222. </el-table-column>
  223. <el-table-column label="经销商" width="160" align="center">
  224. <template slot-scope="scope">
  225. <el-select v-model="scope.row.dealer" filterable placeholder="请选择厂商">
  226. <el-option
  227. v-for="(option, index) in dealerList"
  228. :key="index"
  229. :label="option.dealer_name"
  230. :value="option.dealer_name">
  231. </el-option>
  232. </el-select>
  233. </template>
  234. </el-table-column>
  235. <el-table-column width="200" align="center">
  236. <template slot="header" slot-scope="scope">
  237. <span>退库原因<span style="color: red"></span></span>
  238. </template>
  239. <template slot-scope="scope">
  240. <el-form-item
  241. :prop="'recordData.' + scope.$index + '.remark'"
  242. style="padding-top: 17px"
  243. >
  244. <el-input v-model="scope.row.remark"></el-input>
  245. </el-form-item>
  246. </template>
  247. </el-table-column>
  248. <el-table-column label="操作" align="center" width="200" fixed="right">
  249. <template slot-scope="scope">
  250. <el-tooltip
  251. class="item"
  252. effect="dark"
  253. content="新增"
  254. placement="top"
  255. >
  256. <el-button
  257. size="mini"
  258. type="primary"
  259. icon="el-icon-circle-plus-outline"
  260. @click="handleEdit(scope.$index, scope.row)"
  261. >
  262. </el-button>
  263. </el-tooltip>
  264. <el-tooltip
  265. class="item"
  266. effect="dark"
  267. content="删除"
  268. placement="top"
  269. >
  270. <el-button
  271. size="mini"
  272. type="danger"
  273. icon="el-icon-delete"
  274. @click="handleDelete(scope.$index, scope.row)"
  275. >
  276. </el-button>
  277. </el-tooltip>
  278. </template>
  279. </el-table-column>
  280. </el-table>
  281. </el-form>
  282. </div>
  283. </div>
  284. </template>
  285. <script>
  286. import { uParseTime } from "@/utils/tools";
  287. import { postDrugCancelStock,GetAllConfig,GetAllDrugInfoByID,getDrugBatchNumber } from "@/api/drug/drug_stock";
  288. import BreadCrumb from "../../components/bread-crumb";
  289. import DrugsStockDialog from './drugsStockDialog/index'
  290. import {postSearchDrugList } from "@/api/data"
  291. import { getDataConfig } from "@/utils/data";
  292. export default {
  293. components: { DrugsStockDialog, BreadCrumb },
  294. name: "salesReturnOrderAdd",
  295. data() {
  296. return {
  297. crumbs: [
  298. { path: false, name: "库存管理" },
  299. { path: false, name: "耗材退库单" },
  300. { path: false, name: "新增退库单" }
  301. ],
  302. crumbs2: [
  303. { path: false, name: "库存管理" },
  304. { path: false, name: "其他退库单" },
  305. { path: false, name: "新增退库单" }
  306. ],
  307. type: this.$route.query.type,
  308. signAndWeighBoxPatients: "sign-and-weigh-box-patients",
  309. return_time: "",
  310. currentIndex: 0,
  311. recordInfo: {
  312. recordData: []
  313. },
  314. tableRules: {
  315. return_count: [
  316. { required: true, message: "数量不能为空", trigger: "blur" }
  317. ]
  318. },
  319. ruleForm: {
  320. manufacturer: [
  321. { required: true, message: "请选择厂商", trigger: "change" }
  322. ]
  323. },
  324. // prop
  325. isVisibility: false,
  326. propForm: {
  327. goods: [],
  328. goodType: [],
  329. goodInfo: [],
  330. goodUnit: [],
  331. manufacturer: 0,
  332. dealer: 0
  333. },
  334. form: {
  335. manufacturer: 0,
  336. dealer: 0
  337. },
  338. warehouseOutInfoList: [],
  339. manufacturer: [],
  340. dealer: [],
  341. goodType: [],
  342. goodInfo:[],
  343. dealerList:[],
  344. manufacturerList:[],
  345. numberList:[],
  346. unitList:[]
  347. };
  348. },
  349. methods: {
  350. comfirm: function(val) {
  351. this.propForm.goodType = []
  352. this.propForm.goods = []
  353. this.$refs.dialog.hide()
  354. if (val.selectedGoodInfo.length > 0) {
  355. for (let i = val.selectedGoodInfo.length - 1; i >= 0; i--) {
  356. if (i == 0) {
  357. this.recordInfo.recordData[this.currentIndex].drug_id = val.selectedGoodInfo[i].id
  358. this.recordInfo.recordData[this.currentIndex].price = val.selectedGoodInfo[i].last_price.toString();
  359. this.recordInfo.recordData[this.currentIndex].retail_price = val.selectedGoodInfo[i].retail_price.toString();
  360. } else {
  361. const tempForm = {}
  362. tempForm['drug_id'] = val.selectedGoodInfo[i].id
  363. tempForm["return_count"] = "";
  364. tempForm["price"] = val.selectedGoodInfo[i].last_price.toString();
  365. tempForm["retail_price"] = val.selectedGoodInfo[i].retail_price.toString();
  366. this.recordInfo.recordData.splice(this.currentIndex + 1, 0, tempForm)
  367. }
  368. }
  369. }
  370. this.currentIndex = -1
  371. },
  372. cancle: function() {
  373. this.$refs.dialog.hide();
  374. },
  375. GetConfigInfo: function() {
  376. const loading = this.$loading({
  377. lock: true,
  378. text: 'Loading',
  379. spinner: 'el-icon-loading',
  380. background: 'rgba(0, 0, 0, 0.7)'
  381. })
  382. GetAllConfig().then(response => {
  383. if (response.data.state == 0) {
  384. this.$message.error(response.data.msg)
  385. return false
  386. } else {
  387. this.manufacturer = response.data.data.manufacturer;
  388. this.dealer = response.data.data.dealer;
  389. for(let i = 0; i< response.data.data.drugs.length;i++){
  390. this.goodType.push(response.data.data.drugs[i])
  391. if(response.data.data.drugs[i].drug_specs != null) {
  392. for (let b = 0; b < response.data.data.drugs[i].drug_specs.length; b++) {
  393. this.goodInfo.push(response.data.data.drugs[i].drug_specs[b])
  394. }
  395. }
  396. }
  397. this.manufacturer.splice(0, 0, { id: 0, manufacturer_name: "全部" });
  398. this.dealer.splice(0, 0, { id: 0, dealer_name: "全部" });
  399. this.form.manufacturer = 0
  400. this.form.dealer = 0
  401. }
  402. loading.close()
  403. })
  404. },
  405. typeName: function(drug_id) {
  406. let name = "";
  407. for (let i = 0; i < this.goodInfo.length; i++) {
  408. if (this.goodInfo[i].id == drug_id) {
  409. name = this.goodInfo[i].drug_name;
  410. }
  411. }
  412. return name;
  413. },
  414. specificationName: function(drug_id) {
  415. let name = "";
  416. for (let i = 0; i < this.goodInfo.length; i++) {
  417. if (this.goodInfo[i].id == drug_id) {
  418. name = this.goodInfo[i].drug_spec;
  419. }
  420. }
  421. return name;
  422. },
  423. handleEdit: function(index, row) {
  424. const tempObj = {};
  425. tempObj["drug_id"] = 0;
  426. tempObj["return_count"] = "";
  427. tempObj["price"] = "";
  428. tempObj["retail_price"] = "";
  429. tempObj["register_account"] = ""
  430. tempObj["dealer"] = ""
  431. tempObj["manufacturer"] =""
  432. tempObj["remark"] = ""
  433. tempObj["product_date"] = ""
  434. tempObj["expiry_date"] = ""
  435. tempObj["batch_number"] = ""
  436. tempObj["max_unit"] = ""
  437. tempObj["batch_number_id"] = 0
  438. tempObj["drug_warehouse_info"] = []
  439. this.recordInfo.recordData.push(tempObj);
  440. },
  441. handleDelete: function(index, row) {
  442. if (this.recordInfo.recordData.length <= 1) {
  443. this.$message.error("只有一条记录的时候无法删除");
  444. return;
  445. } else {
  446. this.recordInfo.recordData.splice(index, 1);
  447. }
  448. },
  449. calculate: function(val) {
  450. if (val == 0) {
  451. return "";
  452. }
  453. return Math.round(parseFloat(val) * 100) / 100;
  454. },
  455. getTime(val, temp) {
  456. if (val != 0) {
  457. return uParseTime(val, temp);
  458. } else {
  459. return "";
  460. }
  461. },
  462. showDialog(index, row) {
  463. const loading = this.$loading({
  464. lock: true,
  465. text: 'Loading',
  466. spinner: 'el-icon-loading',
  467. background: 'rgba(0, 0, 0, 0.7)'
  468. })
  469. this.currentIndex = index
  470. this.isVisibility = true
  471. const params = {
  472. manufacturer_id: this.form.manufacturer,
  473. dealer_id: this.form.dealer
  474. }
  475. GetAllDrugInfoByID(params).then(response => {
  476. if (response.data.state == 0) {
  477. this.$message.error(response.data.msg)
  478. return false
  479. loading.close()
  480. } else {
  481. loading.close()
  482. if (response.data.data.drugs.length <= 0) {
  483. this.$message.error('该厂商或经销商没有药品信息')
  484. return
  485. }
  486. this.$refs.dialog.show()
  487. for (let i = 0; i < response.data.data.drugs.length; i++) {
  488. this.propForm.goods.push(
  489. response.data.data.drugs[i]
  490. );
  491. }
  492. const obj = {};
  493. this.propForm.goods = this.propForm.goods.reduce(
  494. (cur, next) => {
  495. obj[next.id] ? "" : (obj[next.id] = true && cur.push(next));
  496. return cur;
  497. },
  498. []
  499. ); // 设置cur默认类型为数组,并且初始值为空的数组
  500. }
  501. for (let i = 0; i < this.propForm.goods.length; i++) {
  502. for (let a = 0; a < this.propForm.goods[i].drug_specs.length; a++) {
  503. var respObj = this.propForm.goods[i].drug_specs[a];
  504. respObj["isSelected"] = false;
  505. }
  506. }
  507. }
  508. )
  509. },
  510. back() {
  511. this.$router.go(-1);
  512. },
  513. submit() {
  514. this.$refs["tableForm"].validate(valid => {
  515. if (valid) {
  516. const array = this.recordInfo.recordData;
  517. console.log("列表23323232323232",array)
  518. let total = 0;
  519. for (let i = 0; i < array.length; i++) {
  520. if (array[i].drug_id == 0) {
  521. this.$message.error("药品名称或者药品规格名称不能为空");
  522. return;
  523. }
  524. total = total + array[i].price * array[i].return_count;
  525. }
  526. if (this.recordInfo.recordData.length <= 0) {
  527. this.$message.success("请添加退库商品");
  528. return;
  529. }
  530. for(let i=0;i<this.recordInfo.recordData.length;i++){
  531. this.recordInfo.recordData[i].price = this.recordInfo.recordData[i].price.toString()
  532. for(let j=0;j<this.recordInfo.recordData[i].drug_warehouse_info.length;j++){
  533. if(this.recordInfo.recordData[i].batch_number == this.recordInfo.recordData[i].drug_warehouse_info[j].id){
  534. this.recordInfo.recordData[i].batch_number = this.recordInfo.recordData[i].drug_warehouse_info[j].batch_number
  535. this.recordInfo.recordData[i].batch_number_id = this.recordInfo.recordData[i].drug_warehouse_info[j].id
  536. }
  537. }
  538. }
  539. const params = {
  540. cancelStock: this.recordInfo.recordData
  541. };
  542. console.log("params2222",params,this.return_time)
  543. postDrugCancelStock(
  544. params,
  545. this.return_time,
  546. this.form.manufacturer,
  547. this.form.dealer,
  548. this.type
  549. ).then(response => {
  550. if (response.data.state == 0) {
  551. this.$message.error(response.data.msg);
  552. return false;
  553. } else {
  554. if(response.data.data.msg == 1){
  555. this.$notify({
  556. title: "成功",
  557. message: "退库成功",
  558. type: "success",
  559. duration: 2000
  560. });
  561. this.recordInfo.recordData = [];
  562. this.$router.back(-1);
  563. }
  564. if(response.data.data.msg == 2){
  565. this.$message.error("退库数量大于出库数量")
  566. }
  567. }
  568. });
  569. } else {
  570. return false;
  571. }
  572. });
  573. },
  574. changeManufacturer(val) {
  575. this.propForm.manufacturer = val;
  576. },
  577. changeDealer(val) {
  578. this.propForm.dealer = val;
  579. },
  580. querySearchAsync(keyword, cb) {
  581. let key = '';
  582. if (keyword != undefined) {
  583. key = keyword
  584. }
  585. let searchArray = [];
  586. postSearchDrugList(key).then(response => {
  587. if (response.data.state == 1) {
  588. searchArray = response.data.data.list;
  589. var list = response.data.data.list
  590. console.log("猎豹22222222222",list)
  591. this.drugList = list
  592. var manufacturerList = response.data.data.manufacturerList
  593. this.manufacturerList = manufacturerList
  594. var dealerList = response.data.data.dealerList
  595. this.dealerList = dealerList
  596. for(let i=0;i<this.drugList.length;i++){
  597. for(let j=0;j<this.manufacturerList.length;j++){
  598. if(this.drugList[i].manufacturer == this.manufacturerList[j].id){
  599. this.drugList[i].manufacturer = this.manufacturerList[j].manufacturer_name
  600. }
  601. }
  602. for(let z=0;z<dealerList.length;z++){
  603. if(this.drugList[i].dealer == this.dealerList[z].id){
  604. this.drugList[i].dealer = this.dealerList[z].dealer_name
  605. }
  606. }
  607. }
  608. cb(this.drugList)
  609. } else {
  610. cb([])
  611. }
  612. })
  613. },
  614. changeDrugName(val){
  615. this.currentIndex = val
  616. },
  617. handleSelect(val){
  618. console.log("val345555555555555555555",val)
  619. var arr = []
  620. for(let i=0;i<this.recordInfo.recordData.length;i++){
  621. arr.push(this.recordInfo.recordData[i].drug_id)
  622. }
  623. var str = arr.join(",")
  624. if(str.indexOf(val.id)!=-1){
  625. this.$message.error("该药品已存在列表中")
  626. return
  627. }
  628. // this.getDrugBatchNumber(val.id)
  629. for(let i=0;i<this.recordInfo.recordData.length;i++){
  630. if(i == this.currentIndex){
  631. this.recordInfo.recordData[i].drug_id = val.id
  632. this.recordInfo.recordData[i].drug_name = val.drug_name
  633. this.recordInfo.recordData[i].drug_type = val.drug_type
  634. this.recordInfo.recordData[i].name = val.dose +val.dose_unit+"*"+val.min_number+ val.min_unit+"/"+val.max_unit
  635. this.recordInfo.recordData[i].last_price = val.last_price
  636. this.recordInfo.recordData[i].price = val.last_price
  637. this.recordInfo.recordData[i].manufacturer = val.manufacturer
  638. this.recordInfo.recordData[i].max_unit = val.max_unit
  639. this.recordInfo.recordData[i].min_unit = val.min_unit
  640. this.recordInfo.recordData[i].drug_warehouse_info = val.drug_warehouse_info
  641. if(val.dealer == 0){
  642. this.recordInfo.recordData[i].dealer = ""
  643. }else{
  644. this.recordInfo.recordData[i].dealer = val.dealer
  645. }
  646. }
  647. }
  648. // console.log("333333",this.recordInfo.recordData)
  649. },
  650. getDrugBatchNumber(id){
  651. var params = {
  652. id:id
  653. }
  654. getDrugBatchNumber(params).then(response=>{
  655. if(response.data.state == 1){
  656. var list = response.data.data.list
  657. // console.log("list2222",list)
  658. for(let i=0;i<list.length;i++){
  659. this.numberList.push(list[i])
  660. }
  661. }
  662. })
  663. },
  664. getDataConfig(module, filed_name){
  665. return getDataConfig(module, filed_name)
  666. },
  667. },
  668. created() {
  669. var nowDate = new Date();
  670. var nowYear = nowDate.getFullYear();
  671. var nowMonth = nowDate.getMonth() + 1;
  672. var nowDay = nowDate.getDate();
  673. this.return_time =
  674. nowYear +
  675. "-" +
  676. (nowMonth < 10 ? "0" + nowMonth : nowMonth) +
  677. "-" +
  678. (nowDay < 10 ? "0" + nowDay : nowDay);
  679. const tempObj = {};
  680. tempObj["drug_id"] = 0;
  681. tempObj["return_count"] = "";
  682. tempObj["price"] = "";
  683. tempObj["retail_price"] = "";
  684. tempObj["register_account"] = ""
  685. tempObj["dealer"] = ""
  686. tempObj["manufacturer"] =""
  687. tempObj["remark"] = ""
  688. tempObj["product_date"] = ""
  689. tempObj["expiry_date"] = ""
  690. tempObj["batch_number"] = ""
  691. tempObj["batch_number_id"] = 0
  692. tempObj["max_unit"] = ""
  693. tempObj["drug_warehouse_info"] = []
  694. this.unitList = getDataConfig('hemodialysis','units')
  695. // console.log("单位",this.unitList)
  696. this.recordInfo.recordData.push(tempObj);
  697. this.GetConfigInfo();
  698. this.propForm.goodUnit = this.$store.getters.good_unit;
  699. }
  700. };
  701. </script>
  702. <style rel="stylesheet/css" lang="scss" scoped>
  703. .information {
  704. border: 1px #dcdfe6 solid;
  705. padding: 30px 20px 30px 20px;
  706. .border {
  707. border-bottom: 1px #dcdfe6 solid;
  708. margin: 0px 0 20px 0;
  709. }
  710. }
  711. .edit_separater {
  712. border-top: 1px solid rgb(233, 233, 233);
  713. margin-top: 15px;
  714. margin-bottom: 15px;
  715. }
  716. </style>
  717. <style>
  718. .sign-and-weigh-box .sign-and-weigh-box-patients .cell {
  719. font-size: 12px;
  720. }
  721. .sign-and-weigh-box .sign-and-weigh-box-patients .current-row > td {
  722. background: #6fb5fa;
  723. }
  724. </style>