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

drugStockOutOrderEdit.vue 26KB

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