12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469 |
- <template>
- <div class="page_consumables">
- <div style="display:flex;justify-content: space-between;width:100%;margin-bottom:20px;">
- <div class="cell clearfix" style="margin-bottom:0;">
- <el-input style="width: 180px;margin-right:10px;" @keyup.enter.native='searchAction' v-model="keywords"
- class="filter-item"/>
- <el-button style="margin-right:10px;" class="filter-item" type="primary" icon="el-icon-search"
- @click="searchAction">搜索
- </el-button>
- <label class="title"><span class="name">是否启用</span> : </label>
- <el-select v-model="is_use" style="width:140px;margin-right:10px;" placeholder="请选择" @change="changeUser">
- <el-option
- v-for="(item,z) in options"
- :key="z"
- :label="item.label"
- :value="item.value">
- </el-option>
- </el-select>
- <label class="title"><span class="name">生产厂商</span> : </label>
- <el-select v-model="manufacturer" style="width:140px;margin-right:10px;" placeholder="请选择" @change="changeManufacture">
- <el-option
- v-for="(item,y) in manufacturers"
- :key="y"
- :label="item.manufacturer_name"
- :value="item.id">
- </el-option>
- </el-select>
- <span style="color: #909399;font-size:14px;">备案 : </span>
- <el-select v-model="is_record" style="width:140px;margin-right:10px;" placeholder="请选择" @change="changeRecord">
- <el-option
- v-for="(item,index) in optionOne"
- :key="index"
- :label="item.label"
- :value="item.value">
- </el-option>
- </el-select>
-
- </div>
- <div>
- <el-button type="primary" @click="openForm()">新增</el-button>
- </div>
-
- </div>
-
- <div style="display:flex; align-items:center;margin-bottom:10px;">
- <el-button type="primary" size="mini" @click="BatchDelete()" v-if="$store.getters.xt_user.org_id == 9504 || $store.getters.xt_user.org_id == 10028">批量备案</el-button>
- <el-button type="primary" size="mini" v-if="$store.getters.xt_user.org_id != 9504 && $store.getters.xt_user.org_id != 10028" @click="GDYBBatchPutOnRecord">批量备案</el-button>
- <el-link target="_blank" href="https://kuyi.shengws.com/stockTemplate.xlsx" :underline="false"
- style="margin-left:15px">
- <el-button
- class="filter-item"
- type="primary"
- size="small"
- >下载模版
- </el-button>
- </el-link>
- <good-excel :on-success='handleSuccess'></good-excel>
- <el-button
- style="margin-left:10px;"
- @click="generateLog()"
- class="filter-item"
- type="primary"
- size="small"
- >下载日志
- </el-button>
- </div>
-
- <el-table
- border style="width: 100%" :row-style="{ color: '#303133' }"
- :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)', color: '#606266'}"
- :data="goodInfo.goodInfoData"
- v-loading="goodInfo.loading"
- @selection-change="handleSelectionChange"
- >
- <el-table-column
- align="center"
- type="selection"
- width="55">
- </el-table-column>
- <el-table-column type="index" label="序号" width="60px" align="center"></el-table-column>
- <el-table-column label="耗材名称" align="center">
- <template slot-scope="scope">
- {{ scope.row.good_name }}
- </template>
- </el-table-column>
- <el-table-column prop="date" label="规格型号" align="center">
- <template slot-scope="scope">
- {{ scope.row.specification_name }}
- </template>
-
- </el-table-column>
- <el-table-column prop="date" label="耗材种类" width="140" align="center">
- <template slot-scope="scope">
- {{ getGoodKind(scope.row.good_kind) }}
- </template>
- </el-table-column>
- <el-table-column label="耗材编号" width="140" align="center">
- <template slot-scope="scope">
- {{ scope.row.good_number }}
- </template>
- </el-table-column>
-
- <!-- <el-table-column label="最小单位" width="60" align="center">
- <template slot-scope="scope">
- {{ getGoodUnit(scope.row.good_unit) }}
- </template>
- </el-table-column> -->
- <el-table-column label="零售价" width="60" align="center">
- <template slot-scope="scope">
- {{ scope.row.retail_price }}
- </template>
- </el-table-column>
- <el-table-column label="社保目录编码" width="110" align="center">
- <template slot-scope="scope">
- {{ scope.row.social_security_directory_code }}
- </template>
- </el-table-column>
- <el-table-column label="状态" width="60" align="center">
- <template slot-scope="scope">
- <!--{{ scope.row.good_status}}-->
- <div>{{scope.row.good_status.indexOf('停用') == -1 ? '启用':'停用' }}</div>
-
- </template>
-
- </el-table-column>
-
- <el-table-column prop="date" label="操作" width="300" align="center">
- <template slot-scope="scope">
- <el-button @click="handleGoodInfoEdit(scope.$index, scope.row)" type="primary" size="small">编辑</el-button>
- <!--<el-button type="primary" size="small" @click="clickSelfPayment(scope.row.id)">自付比例</el-button>-->
- <el-button type="danger" size="small" @click="handleGoodInfoDelete(scope.$index, scope.row)">删除</el-button>
-
- <el-button type="primary" size="small" icon="el-icon-refresh-left" @click="toReturn(scope.row.id,scope.row.is_mark)" v-if="$store.getters.xt_user.org_id == 9504 || $store.getters.xt_user.org_id == 10028">
- <span v-if="scope.row.is_mark == 0">备案</span>
- <span v-if="scope.row.is_mark == 1">撤销</span>
- </el-button>
-
- <el-button type="primary" size="small" icon="el-icon-refresh-left" v-if="$store.getters.xt_user.org_id != 9504 && $store.getters.xt_user.org_id != 10028">
- <span v-if="scope.row.is_mark == 0 || scope.row.is_mark == 2" @click="putOnRecord(scope.row.id)" >目录对照</span>
- <span v-if="scope.row.is_mark == 1" @click="putOnUnRecord(scope.row.id)" >撤消对照</span>
- </el-button>
- </template>
- </el-table-column>
- </el-table>
-
- <el-pagination
- @size-change="handleSizeChange"
- @current-change="handleCurrentChange"
- :page-sizes="[10, 50, 100]"
- :page-size="10"
- background
- align="right"
- style="margin-top:20px;"
- layout="total, sizes, prev, pager, next, jumper"
- :total="total"
- >
- </el-pagination>
- <good-info-dailog ref="addConsumable"
- :titles="goodInfo.goodInfoDialog.goodInfoTitle"
- :formValue="goodInfo.goodInfoDialog.formValue"
- :visibility="goodInfo.goodInfoDialog.isVisibility"
- :isCreated="goodInfo.goodInfoDialog.isCreated"
- v-on:dialog-comfirm="goodInfoDialogComfirm"
- v-on:dialog-cancle="goodInfoDialogCancle"
- ></good-info-dailog>
- <self-payment ref='selfPayment'></self-payment>
-
-
- <el-dialog
- title="提示"
- :visible.sync="dialogVisible"
- width="40%"
- >
- <span>您提交的文档不是系统标准导入模板,请检查您的文档或重新 </span>
- <span slot="footer" class="dialog-footer">
- <el-button @click="dialogVisible = false">取 消</el-button>
- <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
- </span>
- </el-dialog>
-
-
- <el-dialog
- title="提示"
- :visible.sync="exportLogVisible"
- width="40%"
- >
-
- <div v-for="(item,i) in logs" :key="i">
- <span> {{ item.export_time | parseTime('{y}-{m}-{d} {h}:{i}:{s}')}}</span>
- <br/>
- <br/>
- <span>{{getContent(item)}}</span>
- <span >点击</span>
- <span style="color:blue" @click="generateTxt(item)">查看详情</span>
- <br/>
- <br/>
- </div>
-
- <span slot="footer" class="dialog-footer">
- <el-button @click="exportLogVisible = false">取 消</el-button>
- <el-button type="primary" @click="exportLogVisible = false">确 定</el-button>
- </span>
- </el-dialog>
-
- </div>
- </template>
-
- <script>
- import GoodInfoDailog from '../../stock/Dialog/goodInfoDailog'
- import { getDictionaryDataConfig } from "@/utils/data";
- import selfPayment from './selfPayment'
- import axios from 'axios'
- import {
- createGoodInfo,
- deleteGoodInfo,
- GetAllDeals,
- GetAllGoodType,
- GetAllManufacturer,
- GetGoodInfo,
- GetGoodInfoByGoodId,
- getGoodInfoList,
- modifyGoodInfo,
- postGoodInformation,
- getInitializtion
- } from '@/api/stock'
- import UploadExcel from '@/xt_pages/components/UploadExcel'
- import GoodExcel from '@/xt_pages/components/GoodExcel'
- import { generateLog } from '@/api/config'
- export default {
- components: {
- GoodInfoDailog,
- selfPayment,
- UploadExcel,
- GoodExcel
- },
- data() {
- return {
- good_kind:'',
- is_use:'',
- is_charge:'',
- search_input: '',
- options: [{
- value: '0',
- label: '全部'
- },{
- value: '1',
- label: '是'
- }, {
- value: '2',
- label: '否'
- }],
- value: '',
-
- total: 0,
- pageTotal: 0,
- pageSelect: 0,
- page: 1,
- limit: 10,
- keywords: '',
- goodInfo: {
- loading: false,
- goodInfoData: [],
- good_code: '',
- editGoodId: '',
- editGoodIndex: '',
- goodInfoDialog: {
- goodInfoTitle: '新增商品信息',
- isCreated: 1, //1.创建 2.编辑 3.查看详情
- formValue: {
- good_id: '',
- specification_name: '',
- buy_price: '',
- sell_price: '',
- remark: '',
- manufacturer: '',
- good_type_id: '',
- dealer: '',
- expiry_date_warn_day_count: '',
- stock_warn_count: '',
- is_reuse: '2',
- dealers: [],
- manufacturers: [],
- goodType: [],
- goodUnit: [],
- good_name:'',
- pinyin:"",
- wubi:"",
- good_kind:'',
- medical_insurance_level:'',
- good_unit:'',
- retail_price:'',
- medical_insurance_number:'',
- is_special_diseases:'',
- is_record:'',
- statistics_category:'',
- agent:'',
- good_status:'',
- default_count:'',
- sign:'',
- is_default:'',
- is_charge_use:'',
- is_charge_predict:'',
- is_statistics_work:'',
- sort:'',
- is_doctor_use:'',
- good_number:'',
- social_security_directory_code:"",
- special_medical:"",
- production_type:"",
- min_number:"",
- packing_unit:"",
- packing_price:'',
- default_count_unit:"",
- min_unit:"",
- },
- isVisibility: false,
-
- }
- },
- selectDrug:[],
- manufacturers:[],
- optionOne: [
- {
- value: '0',
- label: '全部'
- }, {
- value: '1',
- label: '已备案'
- }, {
- value: '2',
- label: '未备案'
- }],
- is_record:"",
- manufacturer:"",
- dialogVisible:false,
- goodType:[],
- dealers:[],
- exportLogVisible:false,
- logs: [],
- goodKindList:[]
- }
- },
- methods: {
- putOnUnRecord(id){
- var that = this;
- let params = {
- ids:id.toString(),
- record_type: 2,
- admin_user_id:this.$store.getters.xt_user.user.id
- };
- axios.get('http://127.0.0.1:9532/api/uncheckcode/get',{params:params}).then(function(response) {
- if (response.data.state == 0) {
- that.$message.error(response.data.data.msg);
- return false
- } else {
- if(response.data.data.failed_code == -10){
- // that.$message.error(response.data.data.msg)
- that.$confirm(response.data.data.msg, '医保错误信息', {
- confirmButtonText: '确 定',
- type: 'warning'
- }).then(() => {
-
- }).catch(() => {
- })
- }else{
- // for (let i = 0; i < that.tableData.length; i++) {
- // if (that.tableData[i].id == that.currentObject.id) {
- // that.tableData[i].record.is_cancel == 1
- // }
- // }
- }
-
- }
- }).catch(function(error) {
- })
- },
- putOnRecord(id){
- var that = this;
-
- let params = {
- ids:id.toString(),
- record_type: 2,
- admin_user_id:this.$store.getters.xt_user.user.id
- };
-
- axios.get('http://127.0.0.1:9532/api/checkcode/get',{params:params}).then(function(response) {
- if (response.data.state == 0) {
- that.$message.error(response.data.data.msg);
- return false
- } else {
- if(response.data.data.failed_code == -10){
- // that.$message.error(response.data.data.msg)
- that.$confirm(response.data.data.msg, '医保错误信息', {
- confirmButtonText: '确 定',
- type: 'warning'
- }).then(() => {
-
- }).catch(() => {
- })
- }else{
-
-
-
- }
-
-
-
- }
- }).catch(function(error) {
- })
- },
- GDYBBatchPutOnRecord(){
- var that = this;
- var ids = [];
- var idMap = {};
- for (const index in this.selectDrug) {
- ids.push(this.selectDrug[index].id);
- idMap[this.selectDrug[index].id] = this.selectDrug[index].id;
- }
- let params = {
- ids:ids.join(','),
- record_type: 2,
- admin_user_id:this.$store.getters.xt_user.user.id
- };
- axios.get('http://127.0.0.1:9532/api/checkcode/get',{params:params}).then(function(response) {
- if (response.data.state == 0) {
- that.$message.error(response.data.data.msg);
- return false
- } else {
- if(response.data.data.failed_code == -10){
- // that.$message.error(response.data.data.msg)
- that.$confirm(response.data.data.msg, '医保错误信息', {
- confirmButtonText: '确 定',
- type: 'warning'
- }).then(() => {
-
- }).catch(() => {
- })
- }else{
-
-
- }
- }
- }).catch(function(error) {
- })
- },
-
- changeKind(val){
- this.getList()
-
- },
- changeCharge(val){
- this.getList()
-
- },
- changeUser(val){
- this.getList()
-
-
- },
- getGoodUnit(id){
- for (let i = 0; i <this.$store.getters.good_unit.length; i++ ){
- if(id == this.$store.getters.good_unit[i].id){
-
- return this.$store.getters.good_unit[i].name
- }
- }
- return ""
- },
- getGoodKind(id){
- // var data = this.getDictionaryDataConfig('system','good_kind')
- var data = this.goodKindList;
-
- var name = "";
- for(let i = 0; i < data.length; i++){
- if(id == data[i].value){
- name = data[i].name
- }
-
- }
- return name
- },
- getDictionaryDataConfig(module,filed_name){
- return getDictionaryDataConfig(module,filed_name)
-
- },
- search: function() {
- this.getList()
- },
- handleGoodInfoEdit: function(index, row) {
- this.getAllDealer();
- this.getAllManufacturer();
- this.getAllGoodType();
- this.goodInfo.editGoodId = row.id;
- this.goodInfo.editGoodIndex = index;
-
- let params = {
- id: row.id
- };
- GetGoodInfo(params).then(response => {
- if (response.data.state == 0) {
- this.$message.error(response.data.msg);
- return false
- } else {
-
- if (response.data.data.goodInfo.good_unit <= 0) {
- this.goodInfo.goodInfoDialog.formValue.good_unit = ''
- } else {
- this.goodInfo.goodInfoDialog.formValue.good_unit =
- response.data.data.goodInfo.good_unit
- }
-
- if (response.data.data.goodInfo.manufacturer <= 0) {
- this.goodInfo.goodInfoDialog.formValue.manufacturer = ''
- } else {
- this.goodInfo.goodInfoDialog.formValue.manufacturer = response.data.data.goodInfo.manufacturer
-
- }
-
- if (response.data.data.goodInfo.dealer <= 0) {
- this.goodInfo.goodInfoDialog.formValue.dealer = ''
- } else {
- this.goodInfo.goodInfoDialog.formValue.dealer =
- response.data.data.goodInfo.dealer
- }
-
- this.goodInfo.goodInfoDialog.formValue.specification_name =
- response.data.data.goodInfo.specification_name;
- this.goodInfo.goodInfoDialog.formValue.buy_price =
- response.data.data.goodInfo.buy_price;
- this.goodInfo.goodInfoDialog.formValue.sell_price =
- response.data.data.goodInfo.sell_price;
- this.goodInfo.goodInfoDialog.formValue.expiry_date_warn_day_count =
- response.data.data.goodInfo.expiry_date_warn_day_count;
- this.goodInfo.goodInfoDialog.formValue.stock_warn_count =
- response.data.data.goodInfo.stock_warn_count;
- this.goodInfo.goodInfoDialog.formValue.is_reuse = response.data.data.goodInfo.is_reuse.toString();
- this.goodInfo.goodInfoDialog.formValue.remark =
- response.data.data.goodInfo.remark;
- this.goodInfo.goodInfoDialog.isCreated = 2;
- this.goodInfo.good_code = response.data.data.goodInfo.good_code;
- this.goodInfo.goodInfoDialog.formValue.good_type_id =
- response.data.data.goodInfo.good_type_id;
-
-
- this.goodInfo.goodInfoDialog.formValue.good_name =
- response.data.data.goodInfo.good_name;
-
-
- this.goodInfo.goodInfoDialog.formValue.pinyin =
- response.data.data.goodInfo.pinyin;
-
- this.goodInfo.goodInfoDialog.formValue.wubi =
- response.data.data.goodInfo.wubi;
-
-
-
- if (response.data.data.goodInfo.good_kind <= 0) {
- this.goodInfo.goodInfoDialog.formValue.good_kind = ''
- } else {
- this.goodInfo.goodInfoDialog.formValue.good_kind =
- response.data.data.goodInfo.good_kind
- }
-
- if (response.data.data.goodInfo.medical_insurance_level <= 0) {
- this.goodInfo.goodInfoDialog.formValue.medical_insurance_level = ''
- } else {
- this.goodInfo.goodInfoDialog.formValue.medical_insurance_level =
- response.data.data.goodInfo.medical_insurance_level
- }
-
-
- this.goodInfo.goodInfoDialog.formValue.retail_price =
- response.data.data.goodInfo.retail_price;
-
-
- this.goodInfo.goodInfoDialog.formValue.medical_insurance_number =
- response.data.data.goodInfo.medical_insurance_number;
-
-
- if (response.data.data.goodInfo.is_special_diseases <= 0) {
- this.goodInfo.goodInfoDialog.formValue.is_special_diseases = ''
- } else {
- this.goodInfo.goodInfoDialog.formValue.is_special_diseases =
- response.data.data.goodInfo.is_special_diseases.toString()
- }
-
- if (response.data.data.goodInfo.is_record <= 0) {
- this.goodInfo.goodInfoDialog.formValue.is_record = ''
- } else {
- this.goodInfo.goodInfoDialog.formValue.is_record =
- response.data.data.goodInfo.is_record.toString()
- }
-
- if (response.data.data.goodInfo.statistics_category <= 0) {
- this.goodInfo.goodInfoDialog.formValue.statistics_category = ''
- } else {
- this.goodInfo.goodInfoDialog.formValue.statistics_category =
- response.data.data.goodInfo.statistics_category
- }
-
-
- if (response.data.data.goodInfo.good_status <= 0) {
- this.goodInfo.goodInfoDialog.formValue.good_status = ''
- } else {
- this.goodInfo.goodInfoDialog.formValue.good_status =
- response.data.data.goodInfo.good_status
- }
-
-
- if (response.data.data.goodInfo.default_count <= 0) {
- this.goodInfo.goodInfoDialog.formValue.default_count = ''
- } else {
- this.goodInfo.goodInfoDialog.formValue.default_count =
- response.data.data.goodInfo.default_count
- }
-
-
-
-
- if (response.data.data.goodInfo.sign <= 0) {
- this.goodInfo.goodInfoDialog.formValue.sign = ''
- } else {
- this.goodInfo.goodInfoDialog.formValue.sign =
- response.data.data.goodInfo.sign
- }
-
-
-
- if (response.data.data.goodInfo.is_default <= 0) {
- this.goodInfo.goodInfoDialog.formValue.is_default = ''
- } else {
- this.goodInfo.goodInfoDialog.formValue.is_default =
- response.data.data.goodInfo.is_default.toString()
- }
-
- if (response.data.data.goodInfo.is_charge_use <= 0) {
- this.goodInfo.goodInfoDialog.formValue.is_charge_use = ''
- } else {
- this.goodInfo.goodInfoDialog.formValue.is_charge_use =
- response.data.data.goodInfo.is_charge_use.toString()
- }
-
-
- if (response.data.data.goodInfo.is_charge_predict <= 0) {
- this.goodInfo.goodInfoDialog.formValue.is_charge_predict = ''
- } else {
- this.goodInfo.goodInfoDialog.formValue.is_charge_predict =
- response.data.data.goodInfo.is_charge_predict.toString()
- }
-
-
- if (response.data.data.goodInfo.is_statistics_work <= 0) {
- this.goodInfo.goodInfoDialog.formValue.is_statistics_work = ''
- } else {
- this.goodInfo.goodInfoDialog.formValue.is_statistics_work =
- response.data.data.goodInfo.is_statistics_work.toString()
- }
-
-
- if (response.data.data.goodInfo.sort <= 0) {
- this.goodInfo.goodInfoDialog.formValue.sort = ''
- } else {
- this.goodInfo.goodInfoDialog.formValue.sort =
- response.data.data.goodInfo.sort.toString()
- }
-
-
- if (response.data.data.goodInfo.is_doctor_use <= 0) {
- this.goodInfo.goodInfoDialog.formValue.is_doctor_use = ''
- } else {
- this.goodInfo.goodInfoDialog.formValue.is_doctor_use =
- response.data.data.goodInfo.is_doctor_use.toString()
- }
-
- this.goodInfo.goodInfoDialog.formValue.agent =response.data.data.goodInfo.agent;
-
- this.goodInfo.goodInfoDialog.formValue.good_number = response.data.data.goodInfo.good_number;
-
- this.goodInfo.goodInfoDialog.formValue.social_security_directory_code = response.data.data.goodInfo.social_security_directory_code;
-
- if(response.data.data.production_type<=0){
- this.goodInfo.goodInfoDialog.production_type = ''
- }else{
- this.goodInfo.goodInfoDialog.formValue.production_type = response.data.data.goodInfo.production_type.toString()
- }
-
- if(response.data.data.special_medical<=0){
- this.goodInfo.goodInfoDialog.special_medical = ''
- }else{
- this.goodInfo.goodInfoDialog.formValue.special_medical = response.data.data.goodInfo.special_medical.toString()
- }
- this.goodInfo.goodInfoDialog.formValue.min_unit = response.data.data.goodInfo.min_unit
- this.goodInfo.goodInfoDialog.formValue.min_number = response.data.data.goodInfo.min_number
- this.goodInfo.goodInfoDialog.formValue.packing_unit = response.data.data.goodInfo.packing_unit
- this.goodInfo.goodInfoDialog.formValue.packing_price = response.data.data.goodInfo.packing_price
- this.goodInfo.goodInfoDialog.formValue.default_count_unit = response.data.data.goodInfo.default_count_unit
- this.$refs.addConsumable.show(row.id, this.goodInfo.goodInfoDialog.formValue)
- }
- })
- },
- handleGoodInfoDelete: function(index, row) {
- this.$confirm('确认删除这条商品信息?', '删除商品信息', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- })
- .then(() => {
- let params = {
- id: row.id
- };
-
- deleteGoodInfo(params).then(response => {
- if (response.data.state == 0) {
- this.$message.error(response.data.msg);
- return false
- } else {
- this.goodInfo.goodInfoData.splice(index, 1);
- this.$message.success('删除成功')
- }
- })
- })
- .catch(() => {
- })
- },
- getList() {
- this.goodInfo.loading = true;
- let params = {
- page: this.page,
- limit: this.limit,
- keyword: this.keywords,
- is_use:this.is_use,
- good_kind:this.good_kind,
- is_charge: this.is_charge,
- is_mark:this.is_record,
- manufacturer:this.manufacturer,
- };
-
- getGoodInfoList(params).then(response => {
- if (response.data.state == 0) {
- this.goodInfo.loading = false;
- this.$message.error(response.data.msg);
- return false
- } else {
- this.goodInfo.loading = false;
- this.total = response.data.data.total;
- this.goodInfo.goodInfoData = [];
- for (let i = 0; i < response.data.data.list.length; i++) {
- this.goodInfo.goodInfoData.push(response.data.data.list[i])
- }
- }
- })
- },
- tableRowClassName({ row, rowIndex }) {
- //把每一行的索引放进row
- row.index = rowIndex
- },
- onRowClick(row, event, column) {
- this.goodInfo.goodInfoData = [];
- this.goodType.tableCurrentIndex = row.index;
- this.goodInfo.goodInfoDialog.formValue.good_id = row.id;
- let params = {
- id: row.id
- };
- this.goodInfo.loading = true;
- GetGoodInfoByGoodId(params).then(response => {
- if (response.data.state == 0) {
- this.goodInfo.loading = false;
- this.$message.error(response.data.msg);
- return false
- } else {
- this.goodInfo.loading = false;
- this.getList()
-
- // for (let i = 0; i < response.data.data.list.length; i++) {
- // this.goodInfo.goodInfoData.push(response.data.data.list[i])
- // }
- }
- })
- },
- goodInfoDialogComfirm: function(val) {
- console.log("val22222",val)
- if (val.isCreated == 2) {
- //修改
- val['id'] = this.goodInfo.editGoodId;
- val['good_code'] = this.goodInfo.good_code;
-
- modifyGoodInfo(val).then(response => {
- if (response.data.state == 0) {
- // this.$message.error(response.data.msg)
- this.$message.error("同一耗材类型同一规格名称不能重复录入!");
- return false
- } else {
- this.$refs.addConsumable.hide();
- this.getList();
- // this.goodInfo.goodInfoData[
- // this.goodInfo.editGoodIndex
- // ].specification_name =
- // response.data.data.goodInfo.specification_name
- // this.goodInfo.goodInfoData[this.goodInfo.editGoodIndex].good_unit =
- // response.data.data.goodInfo.good_unit
- // this.goodInfo.goodInfoData[
- // this.goodInfo.editGoodIndex
- // ].buy_price = response.data.data.goodInfo.buy_price.toString()
- // this.goodInfo.goodInfoData[
- // this.goodInfo.editGoodIndex
- // ].sell_price = response.data.data.goodInfo.sell_price.toString()
- // this.goodInfo.goodInfoData[
- // this.goodInfo.editGoodIndex
- // ].expiry_date_warn_day_count = response.data.data.goodInfo.expiry_date_warn_day_count.toString()
- // this.goodInfo.goodInfoData[
- // this.goodInfo.editGoodIndex
- // ].stock_warn_count = response.data.data.goodInfo.stock_warn_count.toString()
-
- this.$message.success('修改成功')
- }
- })
- } else if (val.isCreated == 1) {
-
-
- if(val.is_reuse == ""){
- val.is_reuse = 0
- }else{
- val.is_reuse = parseInt(val.is_reuse)
- }
-
- if(val.stock_warn_count == ""){
- val.stock_warn_count = 0
- }else{
- val.stock_warn_count = parseInt(val.stock_warn_count)
- }
-
- //新增
- createGoodInfo(val).then(response => {
- if (response.data.state == 0) {
- // this.$message.error(response.data.msg)
- // return false
- this.$message.error("同一耗材类型同一规格名称不能重复录入!")
- } else {
- this.$refs.addConsumable.hide();
- this.getList();
- // this.goodInfo.goodInfoData.unshift(response.data.data.goodInfo)
- this.$message.success('新增成功')
- }
- })
- }
- },
- goodInfoDialogCancle: function() {
- this.$refs.addConsumable.hide()
- },
- showInfoDialog: function() {
- this.getAllDealer();
- this.getAllManufacturer();
- this.goodInfo.goodInfoDialog.formValue.goodType = [];
- GetAllGoodType().then(response => {
- if (response.data.state == 0) {
- this.$message.error(response.data.msg);
- return false
- } else {
- for (let i = 0; i < response.data.data.goodType.length; i++) {
- if (response.data.data.goodType[i].type == 1) {
- response.data.data.goodType[i].type_name = response.data.data.goodType[i].type_name + '(系统设定)'
- }
- this.goodInfo.goodInfoDialog.formValue.goodType.push(
- response.data.data.goodType[i]
- )
- }
- if (this.goodInfo.goodInfoDialog.formValue.goodType.length <= 0) {
- this.$message.error('请先新增商品类型');
-
- } else {
- this.goodInfo.goodInfoDialog.isVisibility = true;
- this.goodInfo.goodInfoDialog.isCreated = 1
- }
- }
- });
- this.$refs.addConsumable.show()
-
- },
- getAllDealer: function() {
- this.goodInfo.goodInfoDialog.formValue.dealers = [];
- GetAllDeals().then(response => {
- if (response.data.state == 0) {
- this.$message.error(response.data.msg);
- return false
- } else {
- for (let i = 0; i < response.data.data.dealer.length; i++) {
- this.goodInfo.goodInfoDialog.formValue.dealers.push(
- response.data.data.dealer[i]
- );
- this.dealers.push(response.data.data.dealer[i])
- }
- }
- })
- },
- getAllManufacturer: function() {
- this.goodInfo.goodInfoDialog.formValue.manufacturers = [];
- GetAllManufacturer().then(response => {
- if (response.data.state == 0) {
- this.$message.error(response.data.msg);
- return false
- } else {
- var obj = {id:0,manufacturer_name:"全部"};
- this.manufacturers.push(obj);
- for (let i = 0; i < response.data.data.manufacturer.length; i++) {
- this.goodInfo.goodInfoDialog.formValue.manufacturers.push(
- response.data.data.manufacturer[i]
- );
- this.manufacturers.push(response.data.data.manufacturer[i])
- }
-
- }
- })
- },
- getAllGoodType: function() {
- this.goodInfo.goodInfoDialog.formValue.goodType = [];
- GetAllGoodType().then(response => {
- if (response.data.state == 0) {
- this.$message.error(response.data.msg);
- return false
- } else {
- for (let i = 0; i < response.data.data.goodType.length; i++) {
- if (response.data.data.goodType[i].type == 1) {
- response.data.data.goodType[i].type_name = response.data.data.goodType[i].type_name + '(系统设定)'
- }
- this.goodInfo.goodInfoDialog.formValue.goodType.push(response.data.data.goodType[i]);
- this.goodType.push(response.data.data.goodType[i])
- }
- }
- })
- },
- handleSizeChange(val) {
- this.limit = val;
- this.getList()
- },
- handleCurrentChange(val) {
- this.page = val;
- this.getList()
- },
- searchAction() {
- this.is_use = "";
- this.is_charge = "";
- this.good_kind = "";
- this.getList()
- },clickSelfPayment(id){
- this.$refs.selfPayment.show(id,2)
- },
- openForm() {
-
- this.getAllDealer();
- this.getAllManufacturer();
- this.goodInfo.goodInfoDialog.formValue.goodType = [];
- GetAllGoodType().then(response => {
- if (response.data.state == 0) {
- this.$message.error(response.data.msg);
- return false
- } else {
- for (let i = 0; i < response.data.data.goodType.length; i++) {
- if (response.data.data.goodType[i].type == 1) {
- response.data.data.goodType[i].type_name = response.data.data.goodType[i].type_name + '(系统设定)'
- }
- this.goodInfo.goodInfoDialog.formValue.goodType.push(
- response.data.data.goodType[i]
- )
- }
- if (this.goodInfo.goodInfoDialog.formValue.goodType.length <= 0) {
- this.$message.error('请先新增商品类型');
-
- } else {
- this.goodInfo.goodInfoDialog.isVisibility = true;
- this.goodInfo.goodInfoDialog.isCreated = 1
- }
- }
- });
- this.goodInfo.goodInfoDialog.formValue.good_id = '';
- this.goodInfo.goodInfoDialog.formValue.specification_name = '';
- this.goodInfo.goodInfoDialog.formValue.buy_price = '';
- this.goodInfo.goodInfoDialog.formValue.sell_price = '';
- this.goodInfo.goodInfoDialog.formValue.remark = '';
- this.goodInfo.goodInfoDialog.formValue.manufacturer = '';
- this.goodInfo.goodInfoDialog.formValue.good_type_id = '';
- this.goodInfo.goodInfoDialog.formValue.dealer = '';
- this.goodInfo.goodInfoDialog.formValue.expiry_date_warn_day_count = '';
- this.goodInfo.goodInfoDialog.formValue.stock_warn_count = '';
- this.goodInfo.goodInfoDialog.formValue.is_reuse = '2';
- this.goodInfo.goodInfoDialog.formValue.good_name = '';
- this.goodInfo.goodInfoDialog.formValue.pinyin = '';
- this.goodInfo.goodInfoDialog.formValue.wubi = '';
- this.goodInfo.goodInfoDialog.formValue.good_kind = '';
- this.goodInfo.goodInfoDialog.formValue.medical_insurance_level = '';
- this.goodInfo.goodInfoDialog.formValue.retail_price = '';
- this.goodInfo.goodInfoDialog.formValue.medical_insurance_number = '';
- this.goodInfo.goodInfoDialog.formValue.is_special_diseases = '';
- this.goodInfo.goodInfoDialog.formValue.is_record = '';
- this.goodInfo.goodInfoDialog.formValue.statistics_category = '';
- this.goodInfo.goodInfoDialog.formValue.good_status = '';
- this.goodInfo.goodInfoDialog.formValue.default_count = '';
- this.goodInfo.goodInfoDialog.formValue.sign = '';
- this.goodInfo.goodInfoDialog.formValue.is_default = '';
- this.goodInfo.goodInfoDialog.formValue.is_charge_use = '';
- this.goodInfo.goodInfoDialog.formValue.is_charge_predict = '';
- this.goodInfo.goodInfoDialog.formValue.is_statistics_work = '';
- this.goodInfo.goodInfoDialog.formValue.sort = '';
- this.goodInfo.goodInfoDialog.formValue.is_doctor_use = '';
- this.goodInfo.goodInfoDialog.formValue.agent = '';
- this.goodInfo.goodInfoDialog.formValue.good_number = '';
-
- this.$refs.addConsumable.show(0)
- },
- handleSelectionChange(val) {
- this.selectDrug = val;
- },
- // toRecord(){
-
- // var that = this
- // axios.get('http://127.0.0.1:9532/sz/api/goods/get').then(function(response) {
- // if (response.data.state == 0) {
- // that.$message.error(response.data.msg)
- // return false
- // } else {
- // that.$message({ message: '备案成功', type: 'success' })
- // }
- // }).catch(function(error) {
- // })
- // },
- BatchDelete() {
- if (this.selectDrug.length == 0) {
- this.$message.error("请选择要备案的信息");
- return false;
- }
- this.$confirm(
- "确认要备案所选记录吗? <br>",
- "备案提示",
- {
- dangerouslyUseHTMLString: true,
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }
- ).then(() => {
- var ids = [];
- var idMap = {};
- for (const index in this.selectDrug) {
- ids.push(this.selectDrug[index].id);
- idMap[this.selectDrug[index].id] = this.selectDrug[index].id;
- }
-
- var idss = ids.join(',');
- let params = {
- ids:idss,
- admin_user_id:this.$store.getters.xt_user.user.id
- };
-
-
- var that = this;
- axios.get('http://127.0.0.1:9532/sz/api/goods/get',{ params: params }).then(function(response) {
- if (response.data.state == 0) {
- that.$message.error(response.data.data.msg);
- return false
- } else {
- if(response.data.data.msg == ""){
- that.$message.success("备案成功!");
- that.getList()
- }
- if(response.data.data.msg!=""){
- that.$message.error(response.data.data.msg);
- that.getList()
- }
- }
- }).catch(function(error) {
- })
- });
- },
- toReturn(id,isMark){
-
- var that = this;
- let params = {
- 'id':id,
- 'type_id':3,
- 'is_mark':isMark,
- 'admin_user_id':this.$store.getters.xt_user.user.id,
- };
- axios.get('http://127.0.0.1:9532/sz/api/revocation/get',{params:params}).then(function(response) {
- if (response.data.state == 0) {
- that.$message.error(response.data.data.msg);
- return false
- } else {
- if(response.data.data.msg == ""){
- that.$message.success("备案成功!");
- that.getList()
- }
- if(response.data.data.msg!=""){
- that.$message.error(response.data.data.msg);
- that.getList()
- }
- }
- }).catch(function(error) {
- })
- },
- changeManufacture(){
- this.getList()
- },
- changeRecord(){
- this.getList()
- },
- handleSuccess({ results, header }) {
-
- if (header != undefined && header.length > 0) {
-
- var isHasMedicalInsuranceLevel = header.includes('*医保等级');
-
- var isHasGoodUnit = header.includes('*单位');
-
- var isHasStockWarnCount = header.includes('*库存警戒');
-
- var isHasManuFacturer = header.includes('*生产厂商');
-
- var isHasGoodName = header.includes('*耗材名称');
-
- var isHasGoodKand = header.includes('*耗材种类');
-
- var isHasSpecificationName = header.includes('*规格型号');
-
- var isHasBuyPrice = header.includes('*零价');
-
- if (!(isHasMedicalInsuranceLevel && isHasGoodUnit && isHasStockWarnCount && isHasManuFacturer && isHasGoodName && isHasGoodKand && isHasSpecificationName && isHasBuyPrice)) {
- this.dialogVisible = true;
- return
- }
- }else {
- this.dialogVisible = true;
- return
- }
-
- var tableData = [];
- for(let i=1;i<results.length;i++){
- let obj = {"good_kind_id":0,"good_type_id":0,"medical_insurance_id":0,"dealer_id":0,"statistic_id":0,"manufacturer_id":0,"unit_id":0};
- for (var key in results[i]) {
-
- if (results[i]['*耗材名称'] === undefined) {
- obj['good_name'] = ''
- } else {
- if (key == '*耗材名称') {
- obj['good_name'] = results[i][key].replace(/\s/g,"")
- }
- }
-
- if (results[i]['*耗材种类'] === undefined) {
- obj['good_kind'] = ''
- } else {
- if (key == '*耗材种类') {
- obj['good_kind'] = results[i][key].replace(/\s/g,"")
- }
- }
-
- if (results[i]['*耗材类型'] === undefined) {
- obj['type_name'] = ''
- } else {
- if (key == '*耗材类型') {
- obj['type_name'] = results[i][key].replace(/\s/g,"")
- }
- }
-
- if (results[i]['*医保等级'] === undefined) {
- obj['medical_insurance_level'] = ''
- } else {
- if (key == '*医保等级') {
- obj['medical_insurance_level'] = results[i][key].replace(/\s/g,"")
- }
- }
-
- if (results[i]['*规格型号'] === undefined) {
- obj['specification_name'] = ''
- } else {
- if (key == '*规格型号') {
- obj['specification_name'] = results[i][key].replace(/\s/g,"")
- }
- }
-
- if (results[i]['*生产厂商'] === undefined) {
- obj['manufacturer'] = ''
- } else {
- if (key == '*生产厂商') {
- obj['manufacturer'] = results[i][key].replace(/\s/g,"")
- }
- }
-
- if (results[i]['*单位'] === undefined) {
- obj['good_unit'] = ''
- } else {
- if (key == '*单位') {
- obj['good_unit'] = results[i][key].replace(/\s/g,"")
- }
- }
-
- if (results[i]['*零价'] === undefined) {
- obj['retail_price'] = ''
- } else {
- if (key == '*零价') {
- obj['retail_price'] = results[i][key].replace(/\s/g,"")
- }
- }
-
- if (results[i]['*库存警戒'] === undefined) {
- obj['stock_warn_count'] = ''
- } else {
- if (key == '*库存警戒') {
- obj['stock_warn_count'] = results[i][key].replace(/\s/g,"")
- }
- }
-
- if (results[i]['经销商'] === undefined) {
- obj['dealer'] = ''
- } else {
- if (key == '经销商') {
- obj['dealer'] = results[i][key].replace(/\s/g,"")
- }
- }
-
- if (results[i]['拼音'] === undefined) {
- obj['pinyin'] = ''
- } else {
- if (key == '拼音') {
- obj['pinyin'] = results[i][key].replace(/\s/g,"")
- }
- }
-
- if (results[i]['五笔'] === undefined) {
- obj['wubi'] = ''
- } else {
- if (key == '五笔') {
- obj['wubi'] = results[i][key].replace(/\s/g,"")
- }
- }
-
- if (results[i]['最新进价'] === undefined) {
- obj['buy_price'] = ''
- } else {
- if (key == '最新进价') {
- obj['buy_price'] = results[i][key].replace(/\s/g,"")
- }
- }
-
- if (results[i]['医保编码'] === undefined) {
- obj['medical_insurance_number'] = ''
- } else {
- if (key == '医保编码') {
- obj['medical_insurance_number'] = results[i][key].replace(/\s/g,"")
- }
- }
-
- if (results[i]['是否特病目录'] === undefined) {
- obj['is_special_diseases'] = ''
- } else {
- if (key == '是否特病目录') {
- obj['is_special_diseases'] = results[i][key].replace(/\s/g,"")
- }
- }
-
- if (results[i]['是否备案'] === undefined) {
- obj['is_record'] = ''
- } else {
- if (key == '是否备案') {
- obj['is_record'] = results[i][key].replace(/\s/g,"")
- }
- }
-
- if (results[i]['统计分类'] === undefined) {
- obj['statistics_category'] = ''
- } else {
- if (key == '统计分类') {
- obj['statistics_category'] = results[i][key].replace(/\s/g,"")
- }
- }
-
- if (results[i]['状态'] === undefined) {
- obj['good_status'] = ''
- } else {
- if (key == '状态') {
- obj['good_status'] = results[i][key].replace(/\s/g,"")
- }
- }
-
-
- if (results[i]['社保目录编码'] === undefined) {
- obj['social_security_directory_code'] = ''
- } else {
- if (key == '社保目录编码') {
- obj['social_security_directory_code'] = results[i][key].replace(/\s/g,"")
- }
- }
-
- if (results[i]['生产地类别'] === undefined) {
- obj['production_type'] = ''
- } else {
- if (key == '生产地类别') {
- obj['production_type'] = results[i][key].replace(/\s/g,"")
- }
- }
-
- if (results[i]['特殊医用材料标志'] === undefined) {
- obj['special_medical'] = ''
- } else {
- if (key == '特殊医用材料标志') {
- obj['special_medical'] = results[i][key].replace(/\s/g,"")
- }
- }
-
- if (results[i]['备注'] === undefined) {
- obj['remark'] = ''
- } else {
- if (key == '备注') {
- obj['remark'] = results[i][key].replace(/\s/g,"")
- }
- }
-
-
- }
- tableData.push(obj);
- var goodUnit = this.$store.getters.good_unit;
-
-
- for(let i=0;i<tableData.length;i++){
-
- for(let c=0;c<goodUnit.length;c++){
- if(tableData[i].good_unit == goodUnit[c].name){
- tableData[i].unit_id = goodUnit[c].id
- }
- }
-
- }
- }
-
- for(let i=0;i<tableData.length;i++){
- tableData[i].stock_warn_count = parseInt(tableData[i].stock_warn_count);
-
- if(tableData[i].is_special_diseases == "是"){
- tableData[i].is_special_diseases = 1
- }
- if(tableData[i].is_special_diseases == "否"){
- tableData[i].is_special_diseases = 2
- }
-
- if(tableData[i].is_record == "是"){
- tableData[i].is_record = 1
- }
- if(tableData[i].is_record == "否"){
- tableData[i].is_record = 2
- }
-
-
-
- if(tableData[i].special_medical == "是"){
- tableData[i].special_medical = "1"
- }
- if(tableData[i].special_medical == "否"){
- tableData[i].special_medical = "2"
- }
- }
-
- for(let i=0;i<tableData.length;i++){
-
- if(tableData[i].is_special_diseases == ""){
- tableData[i].is_special_diseases = 0
- }else{
- tableData[i].is_special_diseases = parseInt(tableData[i].is_special_diseases)
- }
-
- if(tableData[i].is_record == ""){
- tableData[i].is_record = 0
- }else{
- tableData[i].is_record = parseInt(tableData[i].is_record)
- }
-
-
- }
-
- let params = {
- 'goods':tableData
- };
-
-
-
- postGoodInformation(params).then(response=>{
- if(response.data.state == 1){
- var msg = response.data.data.msg;
- this.$message.success("导入成功!");
- this.getList();
- this.getInitializtion()
- }else{
- this.$message.error("导入失败,请下载日志查看")
- }
- })
- },
- generateTxt: function(log) {
- var content = '';
- var errlog = log.err_logs;
- content = this.getContent(log);
- for (let i = 0; i < errlog.length; i++) {
- if (content.length == 0) {
- content = errlog[i].err_msg
- } else {
- content = content + '\n' + errlog[i].err_msg
- }
- }
-
- var url = new Blob(['\ufeff' + content], { type: 'text/txt,charset=UTF-8' });
- if (typeof url === 'object' && url instanceof Blob) {
- url = URL.createObjectURL(url) // 创建blob地址
- }
- const aLink = document.createElement('a');
- aLink.href = url;
- aLink.download = this.timestampToTime(log.export_time) + '患者导入日志' + '.txt';
- aLink.click()
-
- },
- getContent(log) {
- return '您导入的文档共' + log.total_num + '条患者数据' + ',' + '已成功导入' + log.success_num + '条,导入失败' + log.fail_num + '条,'
- },
- timestampToTime(timestamp) {
- var date = new Date(timestamp * 1000);//时间戳为10位需*1000,时间戳为13位的话不需乘1000
- var Y = date.getFullYear() + '年';
- var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '月';
- var D = (date.getDate() < 10 ? '0' + (date.getDate()) : date.getDate()) + '日 ';
- var h = (date.getHours() < 10 ? '0' + (date.getHours()) : date.getHours()) + '时';
- var m = (date.getMinutes() < 10 ? '0' + (date.getMinutes()) : date.getMinutes()) + '分';
- var s = (date.getSeconds() < 10 ? '0' + (date.getSeconds()) : date.getSeconds()) + '秒';
- return Y + M + D + h + m + s
- },
- generateLog() {
- let params = {
- 'log_type': 5
- };
- generateLog(params).then(
- response => {
- if (response.data.state === 1) {
- this.logs = response.data.data.logs;
- this.exportLogVisible = true
- } else {
- this.$message.error(response.data.msg)
- }
- }
- )
-
- },
- getInitializtion(){
- getInitializtion().then(response=>{
- if(response.data.state == 1){
- var goodKindList = response.data.data.goodKindList;
-
- this.goodKindList = goodKindList
-
-
- }
- })
- }
-
- },
- created() {
- this.getList();
- this.getAllDealer();
- this.getAllManufacturer();
- this.getAllGoodType();
- this.goodInfo.goodInfoDialog.formValue.goodUnit = this.$store.getters.good_unit;
- this.getInitializtion()
- }
- }
- </script>
|