details.vue 91 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858
  1. <!-- 物料信息基础档案——详情 -->
  2. <template>
  3. <div class="material-details" v-loading="loading">
  4. <!-- 操作栏 -->
  5. <!-- 基本信息栏 -->
  6. <div style="display: flex;justify-content: end;">
  7. <div v-if="activeMainTab == 'material'">
  8. <!-- 基本信息修改状态下—— 保存、保存新增、更新导入、取消 -->
  9. <el-row
  10. v-if="updateButtonGroup || maintainNewVersion"
  11. :gutter="10"
  12. class="mb10"
  13. type="flex"
  14. justify="end"
  15. >
  16. <el-col :span="1.5">
  17. <el-button-group>
  18. <el-button size="small" @click="handleSave"
  19. v-hasPermi="['system:material:add', `${maintainNewVersion ? '' : 'system:material:versions'}`]">
  20. 保存
  21. </el-button>
  22. </el-button-group>
  23. </el-col>
  24. <el-col :span="1.5">
  25. <el-button-group>
  26. <el-button size="small" @click="handleCancel">取消</el-button>
  27. </el-button-group>
  28. </el-col>
  29. </el-row>
  30. <el-row
  31. v-else
  32. :gutter="10"
  33. class="mb10"
  34. type="flex"
  35. justify="end"
  36. >
  37. <!-- 新增、修改、删除、复制 -->
  38. <el-col :span="1.5">
  39. <el-button-group>
  40. <!-- <el-button size="small" @click="handleInster">新增</el-button> -->
  41. <el-button size="small" @click="handleBasicEdit">修改</el-button>
  42. <!-- <el-button size="small" @click="handleDel">删除</el-button> -->
  43. <!-- <el-button size="small" @click="handleCopy">复制</el-button> -->
  44. </el-button-group>
  45. </el-col>
  46. <!-- 查询、刷新、过滤 -->
  47. <el-col :span="1.5">
  48. <el-button-group>
  49. <el-button size="small" @click="handleRefresh">刷新</el-button>
  50. </el-button-group>
  51. </el-col>
  52. <!-- 启用 -->
  53. <el-col :span="1.5">
  54. <el-button-group>
  55. <el-button size="small" @click="handleMaterialType">维护物料类别</el-button>
  56. <el-button size="small" @click="handleIsInvoke" :key="count" v-hasPermi="['system:material:add']">
  57. <!-- 0:启用 2:停用 -->
  58. {{ basicData.value.isEnable == '已启用' ? '停用' : '启用' }}
  59. </el-button>
  60. </el-button-group>
  61. </el-col>
  62. <!-- 维护新版本 -->
  63. <el-col :span="1.5">
  64. <el-button-group>
  65. <el-button size="small" @click="handleNewVersion" v-hasPermi="['system:material:versions']">维护新版本
  66. </el-button>
  67. </el-button-group>
  68. </el-col>
  69. </el-row>
  70. </div>
  71. <!-- 其他标签页操作 修改、删除 -->
  72. <el-row
  73. :gutter="10"
  74. class="mb10"
  75. v-show="activeMainTab != 'material'"
  76. type="flex"
  77. justify="end"
  78. >
  79. <el-col :span="1.5">
  80. <el-button-group>
  81. <el-button size="small" @click="handleOtherEdit('table')">修改</el-button>
  82. <el-button size="small" v-show="activeMainTab != 'material_finance'" @click="handleOtherDel">删除</el-button>
  83. </el-button-group>
  84. <el-button-group>
  85. <el-button size="small" @click="handleOtherListRefresh">刷新</el-button>
  86. </el-button-group>
  87. </el-col>
  88. </el-row>
  89. <!-- 返回 切换 附件管理 -->
  90. <el-row type="flex" justify="space-between">
  91. <el-col :span="6">
  92. <!-- :disabled="headerParam.isEdit" -->
  93. <el-button size="small" @click="handleBack" :disabled="updateButtonGroup">返回</el-button>
  94. </el-col>
  95. <el-col :span="6" style="text-align: right;">
  96. </el-col>
  97. </el-row>
  98. </div>
  99. <el-card>
  100. <div class="md-content">
  101. <el-form :inline="true" label-position="right" :model="basicData.value">
  102. <!-- <el-form-item label="所属组织"></el-form-item> -->
  103. <el-form-item label="物料编码">
  104. <el-input v-model="basicData.value.code" readonly size="mini"></el-input>
  105. </el-form-item>
  106. <el-form-item label="物料名称">
  107. <el-input v-model="basicData.value.name" readonly size="mini"></el-input>
  108. </el-form-item>
  109. <el-form-item label="英文名称">
  110. <el-input v-model="basicData.value.enName" readonly size="mini"></el-input>
  111. </el-form-item>
  112. <!-- <el-form-item label="版本号"></el-form-item> -->
  113. </el-form>
  114. <dr-tabs :tabList="detailsTabs" :handleTabClick="handleMainTabClick">
  115. <template #tabContent>
  116. <div class="md-basic" :key="count">
  117. <!-- 主信息 -->
  118. <div class="md-main">
  119. <!-- 基本信息展示表单 -->
  120. <el-form
  121. v-if="activeMainTab == 'material'"
  122. :inline="true"
  123. label-position="right"
  124. :model="basicData.value"
  125. ref="basicMessageRef"
  126. :rules="rules"
  127. >
  128. <el-row :gutter="10">
  129. <el-col :span="8" v-for="f in basicData.form" style="text-align: right;">
  130. <template v-if="f.show">
  131. <!-- 多选框 -->
  132. <el-form-item
  133. v-if="f.attribute == 'checkbox'"
  134. style="text-align: left;"
  135. :prop="f.prop"
  136. :key="f.required"
  137. >
  138. <el-checkbox
  139. :label="f.name" name="type"
  140. v-model="basicData.value[f.prop]"
  141. true-label="0"
  142. false-label="2"
  143. :disabled="handleJudge(f)"
  144. size="mini"
  145. >
  146. </el-checkbox>
  147. </el-form-item>
  148. <!-- 下拉框 -->
  149. <el-form-item v-else-if="f.attribute == 'select'"
  150. :id="(updateButtonGroup && f.apiUrl) ? 'selected' : ''"
  151. :prop="f.apiUrl ? `${f.prop}Name` : f.prop"
  152. :key="f.required"
  153. :rules="[{ required: f.required ,message: `请选择${f.name}`, trigger: 'change' }]"
  154. >
  155. <template slot="label">
  156. <el-tooltip class="item" effect="dark" placement="top-start" :disabled="f.name.length < 10">
  157. <!-- <span :class="(f.apiUrl && f.required) ? 'redSpan': ''">{{ f.name }}</span> -->
  158. <span>{{ f.name }}</span>
  159. <div slot="content">
  160. <p> {{ f.name }}</p>
  161. </div>
  162. </el-tooltip>
  163. </template>
  164. <!-- 参照 -->
  165. <el-select v-if="f.apiUrl"
  166. v-model="basicData.value[`${f.prop}Name`]"
  167. placeholder="请选择"
  168. size="mini"
  169. :key="basicData.value[f.prop]"
  170. :disabled="handleJudge(f)"
  171. @focus="f.apiUrl && handleQueryMore(f, '', { name: 'basicData', prop: f.prop })">
  172. <div slot="empty"></div>
  173. </el-select>
  174. <!-- 字典 -->
  175. <el-select v-if="f.dictId"
  176. v-model="basicData.value[f.prop]"
  177. placeholder="请选择"
  178. size="mini"
  179. :key="basicData.value[f.prop]"
  180. :disabled="handleJudge(f)"
  181. >
  182. <el-option v-if="f.dictId"
  183. v-for="d in f.dictValue" :key="d.dictValue" :label="d.dictLabel"
  184. :value="d.dictValue">
  185. </el-option>
  186. </el-select>
  187. </el-form-item>
  188. <!-- 图片 -->
  189. <el-form-item v-else-if="f.attribute == 'image'" :label="f.name" @clicks="handleUpImage">
  190. <el-image :src="basicData.value[f.prop]" fit="contain"></el-image>
  191. <!-- <img :src="basicData.value[f.prop]" @clicks="handleUpImage" alt="加载失败"> -->
  192. </el-form-item>
  193. <!--attribute 文本 数字 文本域 为null -->
  194. <el-form-item v-else :prop="f.prop" :key="f.required">
  195. <template slot="label">
  196. <el-tooltip class="item" effect="dark" placement="top-start" :disabled="f.name.length < 10">
  197. <span>{{ f.name }}</span>
  198. <div slot="content">
  199. <p>{{ f.name }}</p>
  200. </div>
  201. </el-tooltip>
  202. </template>
  203. <el-input size="mini"
  204. v-model="basicData.value[f.prop]"
  205. :type="f.attribute || 'text'"
  206. :readonly="handleJudge(f)">
  207. </el-input>
  208. </el-form-item>
  209. </template>
  210. </el-col>
  211. </el-row>
  212. </el-form>
  213. <!-- 其他展示为列表 -->
  214. <el-table v-else
  215. border
  216. :data="mainMsg.value"
  217. @cell-dblclick="handleMaindbClick"
  218. @selection-change="handleMainChange"
  219. >
  220. <el-table-column type="selection" width="55"/>
  221. <el-table-column type="index" v-if="mainMsg.form.length" label="序号" width="55" align="center"/>
  222. <el-table-column
  223. v-for="m in mainMsg.form"
  224. v-if="m.show"
  225. :label="m.name"
  226. align="center"
  227. :prop="m.attribute == 'select' ? `${m.prop}Name` : m.prop"
  228. show-overflow-tooltip
  229. >
  230. <template slot-scope="scope">
  231. {{ m.attribute == 'select' ? scope.row[`${m.prop}Name`] :
  232. (m.attribute == 'checkbox' ?
  233. (scope.row[m.prop] == '0' ? '√' : '')
  234. : scope.row[m.prop])
  235. }}
  236. </template>
  237. </el-table-column>
  238. </el-table>
  239. </div>
  240. <!-- 副信息 -->
  241. <div class="md-vice">
  242. <dr-tabs v-if="activeMainTab == 'material'" :tabList="basicMessage"
  243. :handleTabClick="handleViceTabClick">
  244. <template #tabContent>
  245. <el-form v-if="activeViceTab == 'material_medcine'"
  246. :inline="true"
  247. label-position="right"
  248. ref="medcineRef"
  249. :model="medcineData.value"
  250. class="md-vice-content"
  251. :rules="medcineRules"
  252. >
  253. <el-row :gutter="10">
  254. <el-col :span="8" v-for="m in medcineData.form" style="text-align: right;">
  255. <!-- 需要根据基本信息中的是否医药物料字段判断是否可以填写 -->
  256. <template v-if="m.show">
  257. <!-- 多选框 -->
  258. <el-form-item v-if="m.attribute == 'checkbox'" :prop="m.prop">
  259. <el-checkbox
  260. :label="m.name" name="type" v-model="medcineData.value[m.prop]" size="mini"
  261. :disabled="!(updateButtonGroup && m.edit && basicData.value.isMedicine == '0')"
  262. true-label="0" false-label="2">
  263. </el-checkbox>
  264. </el-form-item>
  265. <!-- 下拉框 -->
  266. <el-form-item v-else-if="m.attribute == 'select'"
  267. :label="m.name"
  268. :prop="m.apiUrl ?`${m.prop}Name`: m.prop"
  269. :rules="[{ required: m.required ,message: `请选择${m.name}`, trigger: 'change' }]"
  270. >
  271. <!-- 参照弹窗 -->
  272. <el-select v-if="m.apiUrl"
  273. v-model="medcineData.value[`${m.prop}Name`]"
  274. placeholder="请选择"
  275. :key="medcineData.value[m.prop]" size="mini"
  276. :disabled="!(updateButtonGroup && m.edit && basicData.value.isMedicine == '0')"
  277. @focus="m.apiUrl && handleQueryMore(m, '', { name: 'medcineData', prop: m.prop })">
  278. <div slot="empty"></div>
  279. </el-select>
  280. <!-- 下拉选择 -->
  281. <el-select v-if="m.dictId"
  282. v-model="medcineData.value[m.prop]"
  283. placeholder="请选择"
  284. :key="medcineData.value[m.prop]"
  285. size="mini"
  286. :disabled="!(updateButtonGroup && m.edit && basicData.value.isMedicine == '0')"
  287. @focus="m.apiUrl && handleQueryMore(m, '', { name: 'medcineData', prop: m.prop })">
  288. <el-option v-if="m.dictId" v-for="d in m.dictValue" :key="d.dictValue"
  289. :label="d.dictLabel" :value="d.dictValue">
  290. </el-option>
  291. </el-select>
  292. </el-form-item>
  293. <!-- 图片 -->
  294. <el-form-item v-else-if="m.attribute == 'image'" :label="m.name">
  295. <el-image :src="medcineData.value[m.prop]" fit="contain">
  296. </el-image>
  297. </el-form-item>
  298. <!-- 文本、数字、textarae -->
  299. <el-form-item v-else :label="m.name">
  300. <el-input size="mini"
  301. v-model="medcineData.value[m.prop]"
  302. :type="m.attribute || 'text'"
  303. :readonly="!(updateButtonGroup && m.edit && basicData.value.isMedicine == '0')">
  304. </el-input>
  305. </el-form-item>
  306. </template>
  307. </el-col>
  308. </el-row>
  309. </el-form>
  310. <!-- 其他展示为列表 -->
  311. <!-- 辅计量 -->
  312. <el-table border v-else-if="activeViceTab == 'material_unit'" :data="unitDetails.value"
  313. class="material-table">
  314. <el-table-column type="index" v-if="unitDetails.form.length" label="序号" width="55"
  315. align="center"/>
  316. <el-table-column v-for="v in unitDetails.form" v-if="v.show" :label="v.name" align="center"
  317. :prop="v.attribute == 'select' ? `${v.prop}Name` : v.prop" show-overflow-tooltip>
  318. <template slot-scope="scope">
  319. {{ v.attribute == 'select' ? scope.row[`${v.prop}Name`] :
  320. (v.attribute == 'checkbox' ?
  321. (scope.row[v.prop] == '0' ? '√' : '')
  322. : scope.row[v.prop])
  323. }}
  324. </template>
  325. </el-table-column>
  326. </el-table>
  327. <!-- 辅助属性 -->
  328. <el-table border v-else-if="activeViceTab == 'material_property'" :data="propertyDetail.value"
  329. class="material-table">
  330. <el-table-column type="index" v-if="propertyDetail.form.length" label="序号" width="55"
  331. align="center"/>
  332. <el-table-column v-for="v in propertyDetail.form" v-if="v.show" :label="v.name" align="center"
  333. :prop="v.attribute == 'select' ? `${v.prop}Name` : v.prop" show-overflow-tooltip>
  334. <template slot-scope="scope">
  335. {{ v.attribute == 'select' ? scope.row[`${v.prop}Name`] :
  336. (v.attribute == 'checkbox' ?
  337. (scope.row[v.prop] == '0' ? '√' : '')
  338. : scope.row[v.prop])
  339. }}
  340. </template>
  341. </el-table-column>
  342. </el-table>
  343. </template>
  344. </dr-tabs>
  345. </div>
  346. <!-- 基本信息 - 审计信息 -->
  347. <div class="md-auditInfo" v-if="activeMainTab == 'material'">
  348. <el-divider content-position="left">审计信息</el-divider>
  349. <el-form :inline="true" label-position="right" :model="basicData.value">
  350. <el-form-item label="创建人">
  351. <el-input v-model="basicData.value.createByName" size="mini" readonly></el-input>
  352. </el-form-item>
  353. <el-form-item label="创建时间">
  354. <el-input v-model="basicData.value.createTime" size="mini" readonly></el-input>
  355. </el-form-item>
  356. <el-form-item label="最后修改人">
  357. <el-input v-model="basicData.value.updateByName" size="mini" readonly></el-input>
  358. </el-form-item>
  359. <el-form-item label="最后修改时间">
  360. <el-input v-model="basicData.value.updateTime" size="mini" readonly></el-input>
  361. </el-form-item>
  362. </el-form>
  363. </div>
  364. </div>
  365. </template>
  366. </dr-tabs>
  367. </div>
  368. </el-card>
  369. <!-- 维护物料类别弹窗 -->
  370. <el-dialog
  371. title="物料类别维护"
  372. :visible.sync="materialType.show"
  373. :before-close="handleCloseTypeDetails"
  374. :close-on-press-escape="false"
  375. :close-on-click-modal="false"
  376. width="80%"
  377. center
  378. class="materialType"
  379. >
  380. <!-- 操作按钮 -->
  381. <el-row
  382. :gutter="10"
  383. class="mb10"
  384. type="flex"
  385. justify="end"
  386. >
  387. <el-col :span="1.5">
  388. <el-button-group>
  389. <el-button size="small" :disabled="!materialType.isEdit" @click="handleMaterialTypeRow('add')">增行
  390. </el-button>
  391. <el-button size="small" :disabled="!materialType.isEdit" @click="handleMaterialTypeRow('del')">删行
  392. </el-button>
  393. </el-button-group>
  394. <el-button-group>
  395. <el-button size="small" @click="handleMaterialTypeRow('edit')" v-hasPermi="['system:material:add']">{{
  396. materialType.isEdit
  397. ? '保存' : '修改' }}
  398. </el-button>
  399. <el-button size="small" v-if="materialType.isEdit" @click="handleMaterialTypeRow('cancal')">取消</el-button>
  400. <el-button size="small" @click="handleMaterialTypeRow">刷新</el-button>
  401. </el-button-group>
  402. </el-col>
  403. </el-row>
  404. <!-- 表格数据 -->
  405. <el-table
  406. border
  407. :data="materialType.value"
  408. stripe
  409. style="width: 100%"
  410. max-height="350"
  411. v-loading="materialType.loading"
  412. :key="refer"
  413. @selection-change="handleSelectionType"
  414. >
  415. <el-table-column type="selection" width="30"/>
  416. <el-table-column type="index" width="50" label="序号"/>
  417. <el-table-column v-for="mt in materialType.form" v-if="mt.show" :label="mt.name" width="180">
  418. <template slot-scope="scope">
  419. <!-- :prop="mt.prop" -->
  420. <!-- 多选框 -->
  421. <el-checkbox size="mini" v-if="mt.attribute == 'checkbox'" :disabled="!(materialType.isEdit && mt.edit)"
  422. true-label="0" false-label="2" v-model="scope.row[mt.prop]"/>
  423. <!-- 下拉框 / 参照弹窗---- 药品类别编码 scope.row[`${mt.prop}Name`] -->
  424. <el-select size="mini" v-else-if="mt.attribute == 'select' && mt.apiUrl" placeholder="请选择"
  425. :disabled="!(materialType.isEdit && mt.edit)" v-model="scope.row[mt.prop]"
  426. :key="scope.row[mt.prop]"
  427. @focus="mt.apiUrl && handleQueryMore(mt, '', { name: 'materialType', prop: scope.row })">
  428. <div slot="empty"></div>
  429. </el-select>
  430. <!-- <el-select size="mini" v-else-if="mt.attribute == 'select' && mt.dictId" placeholder="请选择"
  431. :disabled="!(materialType.isEdit && mt.edit)" v-model="scope.row[mt.prop]" :key="scope.row[mt.prop]">
  432. <el-option v-if="mt.dictId" v-for="d in mt.dictId" :key="d.dictValue" :label="d.dictLabel"
  433. :value="d.dictValue"></el-option></el-select> -->
  434. <!-- 其他类型 -->
  435. <el-input v-else size="mini" v-model="scope.row[mt.prop]" :readonly="!(materialType.isEdit && mt.edit)"/>
  436. </template>
  437. </el-table-column>
  438. </el-table>
  439. </el-dialog>
  440. <!-- 操作提示弹窗 -->
  441. <el-dialog title="操作提示" :visible.sync="optionDialog.show" width="30%" center>
  442. <span>是否确认{{ optionDialog.op }}?</span>
  443. <span slot="footer">
  444. <el-button @click="handleOptionCancal">取 消</el-button>
  445. <el-button type="primary" @click="handleComfirmOption('cancal')">确 定</el-button>
  446. </span>
  447. </el-dialog>
  448. <!-- 其他页签的操作 -->
  449. <el-dialog
  450. :title="otherDeatils.title"
  451. :visible.sync="otherDeatils.show"
  452. show-close width="70%"
  453. :before-close="handleCloseOtherDetails"
  454. :close-on-press-escape="false"
  455. :close-on-click-modal="false"
  456. class="otherDialog"
  457. >
  458. <div v-loading="otherDeatils.loading">
  459. <!-- 其他标签页操作 修改、删除 -->
  460. <el-row
  461. :gutter="10"
  462. class="mb10"
  463. type="flex"
  464. justify="end"
  465. >
  466. <el-col :span="1.5" v-if="!otherDeatils.isEdit">
  467. <el-button-group>
  468. <el-button size="small" @click="handleOtherEdit('form')">修改</el-button>
  469. <!-- <el-button size="small" @click="handleOtherDel">删除</el-button> -->
  470. </el-button-group>
  471. <el-button-group>
  472. <el-button size="small" @click="handleOtherRefresh">刷新</el-button>
  473. </el-button-group>
  474. </el-col>
  475. <el-col :span="1.5" v-else>
  476. <el-button-group>
  477. <el-button size="small" @click="handleOtherSave">保存</el-button>
  478. <el-button size="small" @click="handleOtherCancel">取消</el-button>
  479. </el-button-group>
  480. </el-col>
  481. </el-row>
  482. <el-collapse v-model="collapseActive" @change="handleCollapseChange">
  483. <el-collapse-item title="物料基本信息" name="basic">
  484. <el-form :inline="true" label-position="right" :model="basicData.value">
  485. <el-form-item label="物料编码">
  486. <el-input v-model="basicData.value.code" size="small" readonly></el-input>
  487. </el-form-item>
  488. <el-form-item label="物料名称">
  489. <el-input v-model="basicData.value.name" size="small" readonly></el-input>
  490. </el-form-item>
  491. <el-form-item label="英文名称">
  492. <el-input v-model="basicData.value.enName" size="small" readonly></el-input>
  493. </el-form-item>
  494. </el-form>
  495. </el-collapse-item>
  496. <el-collapse-item :title="otherDeatils.title" :name="activeMainTab">
  497. <div class="od-msg">
  498. <!-- 展示表单 -->
  499. <el-form :inline="true" label-position="right" :key="refer" :hide-required-asterisk="true"
  500. :model="otherDeatils.value">
  501. <el-row :gutter="10">
  502. <el-col :span="8" v-for="f in otherDeatils.form" style="text-align: right;">
  503. <template v-if="f.show">
  504. <!-- 多选框 -->
  505. <el-form-item v-if="f.attribute == 'checkbox'" style="text-align: left;" class="od-msg-checkedbx">
  506. <el-checkbox :label="f.name" name="type" v-model="otherDeatils.value[f.prop]" true-label="0"
  507. false-label="2" :disabled="!(otherDeatils.isEdit && f.edit)">
  508. </el-checkbox>
  509. </el-form-item>
  510. <!-- 下拉框 - 弹窗参照 -->
  511. <el-form-item v-else-if="f.attribute == 'select'" :label="f.name">
  512. <el-select v-if="f.apiUrl" v-model="otherDeatils.value[`${f.prop}Name`]" placeholder="请选择"
  513. :key="otherDeatils.value[f.prop]" :disabled="!(otherDeatils.isEdit && f.edit)"
  514. @focus="f.apiUrl && handleQueryMore(f, '', { name: 'otherDeatils', prop: f.prop })">
  515. <div slot="empty"></div>
  516. </el-select>
  517. <!-- 字典-下拉 -->
  518. <el-select v-if="f.dictId" v-model="otherDeatils.value[f.prop]" placeholder="请选择"
  519. :key="otherDeatils.value[f.prop]" :disabled="!(otherDeatils.isEdit && f.edit)">
  520. <el-option v-if="f.dictId" v-for="d in f.dictValue" :key="d.dictValue" :label="d.dictLabel"
  521. :value="d.dictValue">
  522. </el-option>
  523. </el-select>
  524. </el-form-item>
  525. <el-form-item v-else-if="f.attribute == 'image'" :label="f.name">
  526. <el-image :src="otherDeatils.value[f.prop]" fit="contain">
  527. </el-image>
  528. </el-form-item>
  529. <!--attribute 文本 数字 文本域 为null -->
  530. <el-form-item v-else :label="f.name">
  531. <el-input size="small" v-model="otherDeatils.value[f.prop]" :type="f.attribute || 'text'"
  532. :readonly="!(otherDeatils.isEdit && f.edit)">
  533. </el-input>
  534. </el-form-item>
  535. </template>
  536. </el-col>
  537. </el-row>
  538. </el-form>
  539. </div>
  540. </el-collapse-item>
  541. <el-collapse-item title="审计信息" name="auditInfo">
  542. <!-- 基本信息 - 审计信息 -->
  543. <div class="md-auditInfo">
  544. <el-form :inline="true" label-position="right" :model="basicData.value">
  545. <el-form-item label="创建人">
  546. <el-input v-model="basicData.value.createByName" size="small" readonly></el-input>
  547. </el-form-item>
  548. <el-form-item label="创建时间">
  549. <el-input v-model="basicData.value.createTime" size="small" readonly></el-input>
  550. </el-form-item>
  551. <el-form-item label="最后修改人">
  552. <el-input v-model="basicData.value.updateByName" size="small" readonly></el-input>
  553. </el-form-item>
  554. <el-form-item label="最后修改时间">
  555. <el-input v-model="basicData.value.updateTime" size="small" readonly></el-input>
  556. </el-form-item>
  557. </el-form>
  558. </div>
  559. </el-collapse-item>
  560. </el-collapse>
  561. </div>
  562. </el-dialog>
  563. <!-- 参照弹窗 -->
  564. <el-dialog
  565. :title="MoreDataDialog.msg.name"
  566. :visible.sync="MoreDataDialog.show"
  567. width="70%"
  568. class="MoreDataDialog"
  569. :close-on-press-escape="false"
  570. :close-on-click-modal="false"
  571. :before-close="handleCloseRefer"
  572. >
  573. <div>
  574. <el-row>
  575. <el-col :span="1.5">
  576. <el-input v-model="MoreDataDialog.key" placeholder="过滤" size="mini" @change="handleFilterRefer"/>
  577. </el-col>
  578. </el-row>
  579. <!-- 树形 -->
  580. <el-tree
  581. class="referTree"
  582. v-loading="MoreDataDialog.loading"
  583. v-if="MoreDataDialog.type == 'tree'"
  584. :data="MoreDataDialog.list"
  585. @node-click="handleNodeClick"
  586. :key="refer"
  587. :props="MoreDataDialog.msg.apiUrl == 'queryMedcineItemDrug' ? drugProps : defaultProps"
  588. node-key="id"
  589. >
  590. </el-tree>
  591. <!-- queryMedcineItemDrug -->
  592. <!-- 列表 -->
  593. <div v-else>
  594. <el-table
  595. border
  596. :data="MoreDataDialog.list"
  597. v-loading="MoreDataDialog.loading"
  598. style="width: 100%"
  599. @row-click="handleCurentRow"
  600. highlight-current-row
  601. >
  602. <el-table-column type="index" label="序号" width="55" align="center"/>
  603. <el-table-column v-for="m in MoreDataDialog.form" v-if="m.show" :prop="m.prop" :label="m.name"/>
  604. </el-table>
  605. <el-pagination
  606. @size-change="handleSizeChange"
  607. @current-change="handleCurrentChange"
  608. :current-page="queryParams.pageNum"
  609. :page-sizes="[10, 20, 50, 100]"
  610. layout="total, sizes, prev, pager, next, jumper"
  611. :total="queryParams.total"
  612. >
  613. </el-pagination>
  614. </div>
  615. <!-- 按钮 -->
  616. <el-row class="more-button">
  617. <el-button round size="small" @click="handleConcalRefer">取消</el-button>
  618. <el-button round size="small" type="primary" @click="handleConfirmRefer">确认</el-button>
  619. </el-row>
  620. </div>
  621. </el-dialog>
  622. </div>
  623. </template>
  624. <script>
  625. import drTabs from '../components/dr-tabs.vue';
  626. import detailsTabs from '../config/detailsTabs';
  627. import materialApi from '@/api/material/basic';
  628. import {getDicts as getDicts} from '@/api/system/dict/data'
  629. import arrayUtils from '../tools/arrayUtils';
  630. import { initRules, initParams} from './init/index';
  631. import { getDetail } from '@/api/classify/basic';
  632. export default {
  633. name: 'material-details',
  634. // dicts: [],
  635. components: {
  636. drTabs
  637. },
  638. data() {
  639. return {
  640. count: 1,
  641. refer: 1,
  642. loading: false,
  643. rules:{},
  644. medcineRules:{},
  645. // 维护新版本
  646. maintainNewVersion: false,
  647. // 详情固定标签页
  648. detailsTabs,
  649. defaultProps: {
  650. children: 'childrens',
  651. label: 'name'
  652. },
  653. drugProps: {
  654. children: 'childrens',
  655. label: function (data, node) {
  656. return data.code + ' ' + data.name
  657. }
  658. // 'name'
  659. },
  660. // 标签页当前激活状态
  661. activeMainTab: 'material',
  662. activeViceTab: 'material_medcine',
  663. materialId: this.$route.params.id,
  664. collapseActive: ['basic', '',],
  665. // 修改按钮 是否激活
  666. updateButtonGroup: false,
  667. // 基本信息下的页签
  668. basicMessage: [
  669. {
  670. label: '医药行业',
  671. code: 'material_medcine',
  672. isShow: true,
  673. },
  674. {
  675. label: '辅计量管理',
  676. code: 'material_unit',
  677. isShow: true,
  678. },
  679. {
  680. label: '辅助属性',
  681. code: 'material_property',
  682. isShow: true,
  683. },
  684. ],
  685. // 基本信息
  686. basicData: {
  687. value: {},
  688. form: []
  689. },
  690. // 物料类别
  691. materialType: {
  692. show: false,
  693. value: [],
  694. form: [],
  695. loading: false,
  696. checkedList: [],
  697. isEdit: false,
  698. },
  699. // 医药行业
  700. medcineData: {
  701. value: {},
  702. form: []
  703. },
  704. // 辅助属性
  705. propertyDetail: {
  706. value: [],
  707. form: []
  708. },
  709. // 辅计量管理
  710. unitDetails: {
  711. value: [],
  712. form: []
  713. },
  714. // 主标签信息
  715. mainMsg: {
  716. form: [],
  717. value: [],
  718. checkedList: [],
  719. },
  720. // 副信息
  721. viceMsg: {
  722. form: [],
  723. value: [],
  724. },
  725. // 操作弹窗
  726. optionDialog: {
  727. show: false,
  728. op: ''
  729. },
  730. // 其他页签操作弹窗
  731. otherDeatils: {
  732. loading: false,
  733. show: false,
  734. title: '',
  735. // 查询关键字-物料id
  736. queryKey: '',
  737. isEdit: false,
  738. // 详情表头
  739. from: [],
  740. // 详情值
  741. value: {}
  742. },
  743. // 编辑-更多数据展示弹窗_ 参照
  744. MoreDataDialog: {
  745. loading: false,
  746. show: false,
  747. // 查询关键字
  748. key: '',
  749. // 需要查看参照的表单头信息
  750. msg: '',
  751. type: 'table',
  752. // 查询出的参照数据
  753. list: [],
  754. // 查询出的参照表头
  755. form: [],
  756. // 选中的参照数据
  757. value: '',
  758. // 参照最后应该赋值的地方
  759. target: {
  760. name: '',
  761. prop: ''
  762. }
  763. },
  764. // 参照分页参数
  765. queryParams: {
  766. pageNum: 1,
  767. total: 0,
  768. pageSize: 10,
  769. },
  770. }
  771. },
  772. methods: {
  773. // 判断效期管理
  774. handleJudge(attribute) {
  775. // 维护新版本才能修改:批号及库存状态管理(isInventoryStatus)、
  776. if (attribute.prop == 'isInventoryStatus') {
  777. return !(this.maintainNewVersion && attribute.edit);
  778. }
  779. // 序列号管理(serialNoManager):维护新版本 && 批号及库存状态管理
  780. else if (attribute.prop == 'serialNoManager') {
  781. if (this.basicData.value['isInventoryStatus'] == '2') this.basicData.value['serialNoManager'] = '2';
  782. return !(this.maintainNewVersion && attribute.edit && this.basicData.value['isInventoryStatus'] == '0');
  783. }
  784. // 批号及库存状态管理(isInventoryStatus) 控制 效期管理是否展示(expiryDateManagerment)
  785. else if (attribute.prop == 'expiryDateManagerment') {
  786. if (this.basicData.value['isInventoryStatus'] == '2') this.basicData.value['expiryDateManagerment'] = '2';
  787. return !(this.updateButtonGroup && attribute.edit && this.basicData.value['isInventoryStatus'] == '0');
  788. }
  789. // 效期管理(expiryDateManagerment):控制一下几个是否可编辑
  790. // expiryUnitId 效期单位 usefulLife 有效期 usefulLifeUnitId 有效期至单位
  791. else if (attribute.prop == 'expiryUnitId'
  792. || attribute.prop == 'usefulLife'
  793. || attribute.prop == 'usefulLifeUnitId'
  794. || attribute.prop == 'recentWarningPeriod'
  795. ) {
  796. if (this.basicData.value['expiryDateManagerment'] == '2') {
  797. this.basicData.value['expiryUnitId'] = '';
  798. this.basicData.value['usefulLife'] = '';
  799. this.basicData.value['usefulLifeUnitId'] = '';
  800. this.basicData.value['recentWarningPeriod'] = '';
  801. }
  802. return !(this.updateButtonGroup && attribute.edit && this.basicData.value['expiryDateManagerment'] == '0');
  803. }
  804. // 默认采购组织:purchasingOrganization 业务部门:businessDepartment
  805. else if (attribute.prop == 'businessDepartment') {
  806. return !(this.updateButtonGroup && attribute.edit && this.basicData.value['purchasingOrganization']);
  807. } else {
  808. // 其他属性是否可编辑
  809. return !(this.updateButtonGroup && attribute.edit);
  810. }
  811. },
  812. // 返回
  813. handleBack() {
  814. this.$store.dispatch('tagsView/delView', this.$route)
  815. this.$router.go(-1)
  816. // this.$router.push({
  817. // path: `/basic/material/basicFile`,
  818. // });
  819. },
  820. // 附件按钮
  821. handleFile() {
  822. console.log('附件按钮');
  823. },
  824. // 改变分页情况
  825. handleChangePage(type) {
  826. switch (type) {
  827. case 'first':
  828. console.log('第一页');
  829. break;
  830. case 'pre':
  831. console.log('上一页');
  832. break;
  833. case 'next':
  834. console.log('下一页');
  835. break;
  836. case 'end':
  837. console.log('最后页');
  838. break;
  839. }
  840. },
  841. // 切换主信息标签
  842. handleMainTabClick(e) {
  843. this.activeMainTab = detailsTabs[e.index].code;
  844. this.collapseActive.splice(1, 1, this.activeMainTab);
  845. console.log(this.collapseActive, 'this.collapseActive');
  846. this.handleOtherListRefresh();
  847. },
  848. // 切换副表信息
  849. handleViceTabClick(e) {
  850. console.log(this.basicMessage[e.index], '切换标签');
  851. this.activeViceTab = this.basicMessage[e.index].code;
  852. switch (this.activeViceTab) {
  853. // 医药行业
  854. case 'material_medcine':
  855. this.getTagList('material_medcine', (form) => {
  856. this.medcineData.form = form;
  857. this.getMedcineDetails(this.materialId, 'material_medcine');
  858. })
  859. break;
  860. // 辅计量管理
  861. case 'material_unit':
  862. this.getTagList('material_unit', (form) => {
  863. console.log(form, 'form');
  864. this.unitDetails.form = form;
  865. this.getUnitList(this.materialId);
  866. });
  867. break;
  868. // 辅助属性
  869. case 'material_property':
  870. this.getTagList('material_property', (form) => {
  871. this.propertyDetail.form = form;
  872. this.getPropertyList(this.materialId);
  873. });
  874. break;
  875. default:
  876. break;
  877. }
  878. },
  879. // 主标签页 列表双击
  880. handleMaindbClick(e) {
  881. this.otherDeatils.queryKey = e.id;
  882. this.otherDeatils.show = true;
  883. let activeTab = this.detailsTabs.filter(item => item.code == this.activeMainTab)[0];
  884. console.log(activeTab, 'activeTab');
  885. this.otherDeatils.title = activeTab.label;
  886. this.getOtherListDetails(activeTab.code, this.otherDeatils.queryKey);
  887. },
  888. // 主页签 列表数据选择
  889. handleMainChange(e) {
  890. this.mainMsg.checkedList = e;
  891. },
  892. // 上传图片
  893. handleUpImage() {
  894. },
  895. // 编辑状态下,参照弹窗显示查询数据
  896. handleQueryMore(msg, val, target) {
  897. this.MoreDataDialog.loading = true;
  898. let _this = this;
  899. console.log('编辑状态下,弹窗显示查询数据', msg, 'val', val, target);
  900. this.MoreDataDialog.show = true;
  901. this.MoreDataDialog.msg = msg;
  902. this.MoreDataDialog.target = target;
  903. let par = {param: this.MoreDataDialog.key};
  904. this[target.name].form.map(t => {
  905. if (t.relevance && t.relevance != '') {
  906. let reList = t.relevance.split(',');
  907. console.log(reList, 'reList-------------------');
  908. reList.forEach(i => {
  909. par[i] = this.basicData.value[i]
  910. })
  911. console.log(par, 'par/////////////////////////');
  912. }
  913. })
  914. this.getExecuteMethods(msg.apiUrl, par, (data) => {
  915. console.log(data, '编辑状态下,弹窗显示查询数据');
  916. _this.MoreDataDialog.type = data.type;
  917. if (data.type == 'tree') {
  918. _this.MoreDataDialog.list = arrayUtils.filterTreeData(data.tableBody);
  919. } else {
  920. _this.MoreDataDialog.list = data.tableBody;
  921. _this.MoreDataDialog.form = data.tableHeader;
  922. }
  923. this.refer++;
  924. // this.count++;s
  925. console.log(_this.MoreDataDialog.list, 'this.MoreDataDialog.list');
  926. console.log(_this.MoreDataDialog.form, 'this.MoreDataDialog.form');
  927. })
  928. },
  929. // 参照改变分页大小
  930. handleSizeChange(e) {
  931. this.queryParams.pageSize = e;
  932. this.handleQueryMore(this.MoreDataDialog.msg, this.MoreDataDialog.key, this.MoreDataDialog.target);
  933. },
  934. // 参照改变当前页
  935. handleCurrentChange(e) {
  936. this.queryParams.pageNum = e;
  937. this.handleQueryMore(this.MoreDataDialog.msg, this.MoreDataDialog.key, this.MoreDataDialog.target);
  938. },
  939. // 根据apiUrl获取对应参照的值
  940. getExecuteMethods(methodName, param, cb) {
  941. let page = {
  942. pageSize: this.queryParams.pageSize,
  943. pageNum: this.queryParams.pageNum,
  944. }
  945. let params = {...param};
  946. // 业务部门需要 依据默认采购组组织查询
  947. if (methodName == "queryOperatingDepptTree") {
  948. params['puOrgId'] = this.basicData.value['purchasingOrganization']
  949. }
  950. materialApi.executeMethods(methodName, params, page).then(res => {
  951. this.MoreDataDialog.loading = false;
  952. if (res.code == 200) {
  953. this.queryParams.total = res.data.total;
  954. cb(res.data);
  955. }
  956. })
  957. },
  958. // 获取物料基本信息详细信息
  959. async getMaterialDetails(id, templateCode) {
  960. let _this = this;
  961. await materialApi.materialDetails(
  962. id,
  963. templateCode,
  964. ).then(res => {
  965. this.loading = false;
  966. console.log(res, '物料基本信息');
  967. let {code, data} = res;
  968. if (code == 200) {
  969. _this.basicData.value ={... _this.basicData.value,...data.data};
  970. for (const key in data.data) {
  971. _this.basicData.value[key] = (typeof data.data[key] === 'number') ? String(data.data[key]) : data.data[key];
  972. }
  973. // _this.handleAddReferLabel('basicData');
  974. }
  975. })
  976. },
  977. // 添加参照中的label
  978. // handleAddReferLabel(dataName) {
  979. // let _this = this;
  980. // this[dataName].form.map(item => {
  981. // // 查参照
  982. // if (item.apiUrl && item.apiUrl != '') {
  983. // let param = {};
  984. // if (item.relevance && item.relevance != '') {
  985. // let reList = item.relevance.split(',');
  986. // console.log(reList, 'reList-------------------');
  987. // reList.forEach(i => {
  988. // param[i] = this.basicData.value[i]
  989. // })
  990. // console.log(param, 'param/////////////////////////');
  991. // }
  992. // _this.getExecuteMethods(item.apiUrl, param, (data) => {
  993. // let { tableBody } = data;
  994. // // 维护物料类别 --- 属于列表中获取label
  995. // if (dataName == 'materialType') {
  996. // _this[dataName].value.length && (_this[dataName].value = _this[dataName].value.map(d => {
  997. // let Blabel = tableBody.filter((t) => t.id == d[item.prop])[0];
  998. // console.log(Blabel, 'Blabel``````````````````````````');
  999. // d[`${item.prop}Label`] = (Blabel && Blabel.name) || Blabel || '';
  1000. // return d;
  1001. // }))
  1002. // } else {
  1003. // let Blabel = tableBody.filter((t) => t.id == _this[dataName].value[item.prop])[0];
  1004. // console.log(Blabel, 'Blabel``````````````````````````');
  1005. // _this[dataName].value[`${item.prop}Label`] = (Blabel && Blabel.name) || Blabel || '';
  1006. // }
  1007. // // this.count++;
  1008. // this.loading = false;
  1009. // console.log(_this[dataName].value, `${dataName}//////////////////////`);
  1010. // })
  1011. // }
  1012. // })
  1013. // this.materialType.loading = false;
  1014. // },
  1015. // 查询财务信息列表
  1016. async getFinanceList(materialId) {
  1017. try {
  1018. this.loading = true;
  1019. let {code,data} = await materialApi.financeList({materialId});
  1020. if (code == 200) {
  1021. this.mainMsg.value = data.tableBody.rows;
  1022. }
  1023. } catch (error) {
  1024. }finally{
  1025. this.loading = false;
  1026. }
  1027. },
  1028. // 查询计划信息列表
  1029. async getPlanList(materialId) {
  1030. try {
  1031. this.loading = true;
  1032. let {code,data} = await materialApi.planList({materialId});
  1033. if (code == 200) {
  1034. this.mainMsg.value = data.tableBody.rows;
  1035. }
  1036. } catch (error) {
  1037. }finally{
  1038. this.loading = false;
  1039. }
  1040. },
  1041. // 查询成本信息列表
  1042. async getCostList(materialId) {
  1043. try {
  1044. this.loading = true;
  1045. let {code,data} = await materialApi.costList({materialId});
  1046. if (code == 200) {
  1047. this.mainMsg.value = data.tableBody.rows;
  1048. }
  1049. } catch (error) {
  1050. }finally{
  1051. this.loading = false;
  1052. }
  1053. },
  1054. // 查询利润中心列表
  1055. async getCenterList(materialId) {
  1056. try {
  1057. this.loading = true;
  1058. let {code,data} = await materialApi.centerList({materialId});
  1059. if (code == 200) {
  1060. this.mainMsg.value = data.tableBody.rows;
  1061. }
  1062. } catch (error) {
  1063. }finally{
  1064. this.loading = false;
  1065. }
  1066. },
  1067. // 查询采购中心列表
  1068. async getPurchaseList(materialId) {
  1069. try {
  1070. this.loading = true;
  1071. let {code,data} = await materialApi.purchaseList({materialId});
  1072. if (code == 200) {
  1073. this.mainMsg.value = data.tableBody.rows;
  1074. }
  1075. } catch (error) {
  1076. }finally{
  1077. this.loading = false;
  1078. }
  1079. },
  1080. // 获取库存信息列表
  1081. async getInventoryList(materialId) {
  1082. try {
  1083. this.loading = true;
  1084. let {code,data} = await materialApi.inventoryList({materialId});
  1085. if (code == 200) {
  1086. this.mainMsg.value = data.tableBody.rows;
  1087. }
  1088. } catch (error) {}finally{
  1089. this.loading = false;
  1090. }
  1091. },
  1092. // 查询其他标签页列表详情
  1093. getOtherListDetails(type, id) {
  1094. console.log(type, id, '查询其他标签页列表详情');
  1095. this.otherDeatils.form = this.mainMsg.form;
  1096. console.log(this.otherDeatils.form, 'this.otherDeatils.form');
  1097. switch (type) {
  1098. // 财物信息
  1099. case 'material_finance':
  1100. this.getFinanceDetails(id);
  1101. break;
  1102. // 利润中心信息
  1103. case 'profit_center':
  1104. this.getCenterDetails(id);
  1105. break;
  1106. // 采购信息
  1107. case 'material_purchase':
  1108. this.getPurchaseDetails(id);
  1109. break;
  1110. // 库存信息
  1111. case 'material_inventory':
  1112. this.getInventoryDetails(id);
  1113. break;
  1114. // 计划信息
  1115. case 'material_plan':
  1116. this.getPlanDetails(id);
  1117. break;
  1118. // 成本信息
  1119. case 'material_cost':
  1120. this.getCostDetails(id);
  1121. break;
  1122. default:
  1123. break;
  1124. }
  1125. },
  1126. // 查询财务信息详情
  1127. async getFinanceDetails(id) {
  1128. try {
  1129. this.otherDeatils.loading = true;
  1130. let {code,data} = await materialApi.financeDetails(id);
  1131. if (code == 200) {
  1132. this.otherDeatils.value = data.data;
  1133. }
  1134. } catch (error) {}
  1135. finally{
  1136. setTimeout(()=>{
  1137. this.otherDeatils.loading = false;
  1138. },200)
  1139. }
  1140. },
  1141. // 获取利润中心详情
  1142. async getCenterDetails(id) {
  1143. try {
  1144. this.otherDeatils.loading = true;
  1145. let {code,data} = await materialApi.centerDetails(id);
  1146. if (code == 200) {
  1147. this.otherDeatils.value = data.data;
  1148. }
  1149. } catch (error) {}
  1150. finally{
  1151. setTimeout(()=>{
  1152. this.otherDeatils.loading = false;
  1153. },200)
  1154. }
  1155. },
  1156. // 获取采购详细信息详情
  1157. async getPurchaseDetails(id) {
  1158. try {
  1159. this.otherDeatils.loading = true;
  1160. let {code,data} = await materialApi.purchaseDetails(id);
  1161. if (code == 200) {
  1162. this.otherDeatils.value = data.data;
  1163. }
  1164. } catch (error) {}
  1165. finally{
  1166. setTimeout(()=>{
  1167. this.otherDeatils.loading = false;
  1168. },200)
  1169. }
  1170. },
  1171. // 获取成本信息详情
  1172. async getCostDetails(id) {
  1173. try {
  1174. this.otherDeatils.loading = true;
  1175. let {code,data} = await materialApi.costDetails(id);
  1176. if (code == 200) {
  1177. this.otherDeatils.value = data.data;
  1178. }
  1179. } catch (error) {}
  1180. finally{
  1181. setTimeout(()=>{
  1182. this.otherDeatils.loading = false;
  1183. },200)
  1184. }
  1185. },
  1186. // 获取计划信息详情
  1187. async getPlanDetails(id) {
  1188. try {
  1189. this.otherDeatils.loading = true;
  1190. let {code,data} = await materialApi.planDetails(id);
  1191. if (code == 200) {
  1192. this.otherDeatils.value = data.data;
  1193. }
  1194. } catch (error) {}
  1195. finally{
  1196. setTimeout(()=>{
  1197. this.otherDeatils.loading = false;
  1198. },200)
  1199. }
  1200. },
  1201. //
  1202. async getInventoryDetails(id) {
  1203. try {
  1204. this.otherDeatils.loading = true;
  1205. let {code,data} = await materialApi.inventoryDetails(id);
  1206. if (code == 200) {
  1207. this.otherDeatils.value = data.data;
  1208. }
  1209. } catch (error) {}
  1210. finally{
  1211. setTimeout(()=>{
  1212. this.otherDeatils.loading = false;
  1213. },200)
  1214. }
  1215. },
  1216. /* 二级标签页 */
  1217. // 根据物料id获取医药行业信息详细信息
  1218. async getMedcineDetails(id) {
  1219. let _this = this;
  1220. console.log(id);
  1221. materialApi.medcineDetailsInfo(id).then((res) => {
  1222. this.loading = false;
  1223. console.log(res, '医药行业');
  1224. let {code, data} = res;
  1225. if (code == 200) {
  1226. _this.medcineData.value = data.data || {};
  1227. // this.medcineData.form = data.form;
  1228. // _this.handleAddReferLabel('medcineData');
  1229. console.log(' _this.medcineData', _this.medcineData, res);
  1230. }
  1231. })
  1232. },
  1233. // 获取物料辅助属性详细信息+表单列段属性
  1234. getPropertyDetails(id) {
  1235. materialApi.propertyDetails(id).then(res => {
  1236. console.log(res, '物料辅助属性详细信息');
  1237. if (res.code == 200) {
  1238. this.propertyDetail.value = res.data.data || [];
  1239. }
  1240. })
  1241. },
  1242. // 查询物料辅助属性列表+表头字段
  1243. getPropertyList(materialId) {
  1244. materialApi.propertyList({materialId}).then(res => {
  1245. console.log(res, '料辅助属性列表');
  1246. if (res.code == 200) {
  1247. this.propertyDetail.value = res.data.data || [];
  1248. }
  1249. })
  1250. },
  1251. //获取辅助计量单位基本信息+表单列段属性
  1252. getUnitDetails(materialId) {
  1253. materialApi.unitDetails(materialId).then(res => {
  1254. console.log(res, '辅助计量单位基本信息');
  1255. if (res.code == 200) {
  1256. this.unitDetails.value = res.data.tableBody.rows || [];
  1257. }
  1258. })
  1259. },
  1260. //获取辅计量管理列表信息
  1261. getUnitList(materialId) {
  1262. materialApi.unitList({materialId}).then(res => {
  1263. console.log(res, '辅计量管理列表信息');
  1264. if (res.code == 200) {
  1265. this.unitDetails.value = res.data.tableBody.rows || [];
  1266. }
  1267. })
  1268. },
  1269. // 获取物料列表表头
  1270. getTagList(templateCode, cb) {
  1271. let _this = this
  1272. materialApi.tagList({templateCode}).then(res => {
  1273. console.log(res, `获取${templateCode}表头`);
  1274. let dictIdList = [];
  1275. if (res.code == 200) {
  1276. res.data.map(item => {
  1277. // 查字典
  1278. if (item.dictId && item.dictId != '') {
  1279. // 通过接口获取有dict的对应的数据
  1280. getDicts(item.dictId).then(dict => {
  1281. if (dict.data) {
  1282. item['dictValue'] = dict.data;
  1283. }
  1284. })
  1285. }
  1286. })
  1287. // 动态更改dict
  1288. // res.data.forEach(item => {
  1289. // if (item.dictId) {
  1290. // // 请求接口
  1291. // dictIdList.push(item.dictId);
  1292. // }
  1293. // })
  1294. // console.log(dictIdList, 'dictIdList');
  1295. // _this.dict = [..._this.dict, ...dictIdList];
  1296. // _this.dict = Array.from(new Set([..._this.dict, ...dictIdList]));
  1297. // console.log(_this.dict, 'dicts');
  1298. return cb(res.data);
  1299. }
  1300. })
  1301. },
  1302. // 根据物料id获取物料类别维护列表
  1303. getMedcineitemList(materialId) {
  1304. let _this = this;
  1305. materialApi.medcineitemList({materialId}).then(res => {
  1306. this.materialType.loading = false;
  1307. console.log(res, '根据物料id获取物料类别维护列表');
  1308. if (res.code == 200) {
  1309. _this.materialType.value = res.data.tableBody.rows;
  1310. // _this.handleAddReferLabel('materialType');
  1311. }
  1312. })
  1313. },
  1314. // 新增
  1315. handleInster() {
  1316. this.$notify({
  1317. title: '警告',
  1318. message: '物料只能通过申请审批增加,不能在节点直接录入!',
  1319. type: 'warning'
  1320. });
  1321. },
  1322. // 除基本信息之后的修改
  1323. handleOtherEdit(type) {
  1324. // debugger
  1325. console.log('除基本信息之后的修改', type);
  1326. if ('table' === type) {
  1327. if (this.mainMsg.checkedList.length == 1) {
  1328. this.otherDeatils.show = true;
  1329. this.otherDeatils.isEdit = true;
  1330. let activeTab = this.detailsTabs.filter(item => item.code == this.activeMainTab)[0];
  1331. this.otherDeatils.title = activeTab.label;
  1332. this.otherDeatils.queryKey = this.mainMsg.checkedList[0].id;
  1333. console.log(this.otherDeatils, 'this.otherDeatils');
  1334. // 查询其他标签页列表详情
  1335. this.getOtherListDetails(activeTab.code, this.otherDeatils.queryKey);
  1336. } else {
  1337. this.$notify({
  1338. title: '警告',
  1339. message: '修改请选择单个数据!',
  1340. type: 'warning'
  1341. });
  1342. }
  1343. } else if ('form' === type) {
  1344. if (this.otherDeatils.queryKey) {
  1345. this.otherDeatils.show = true;
  1346. this.otherDeatils.isEdit = true;
  1347. let activeTab = this.detailsTabs.filter(item => item.code == this.activeMainTab)[0];
  1348. this.otherDeatils.title = activeTab.label;
  1349. // 查询其他标签页列表详情
  1350. this.getOtherListDetails(activeTab.code, this.otherDeatils.queryKey);
  1351. }
  1352. }
  1353. },
  1354. // 其他标签详情弹窗-刷新
  1355. handleOtherRefresh() {
  1356. this.getOtherListDetails(this.activeMainTab, this.otherDeatils.queryKey);
  1357. },
  1358. // 其他标签详情弹窗-删除
  1359. handleOtherDel() {
  1360. let ids = this.mainMsg.checkedList.map(i => i.id);
  1361. console.log(`${this.activeMainTab}其他标签详情弹窗-删除---id合集`, ids);
  1362. if (ids.length) {
  1363. switch (this.activeMainTab) {
  1364. // 财物信息
  1365. case 'material_finance':
  1366. this.handleDelFinance(ids);
  1367. break;
  1368. // 利润中心信息
  1369. case 'profit_center':
  1370. this.handledDelCenter(ids);
  1371. break;
  1372. // 采购信息
  1373. case 'material_purchase':
  1374. this.handledelPurchase(ids);
  1375. break;
  1376. // 库存信息
  1377. case 'material_inventory':
  1378. this.handleDelInventory(ids);
  1379. break;
  1380. // 计划信息
  1381. case 'material_plan':
  1382. this.handleDelPlan(ids);
  1383. break;
  1384. // 成本信息
  1385. case 'material_cost':
  1386. this.handleDelCost(ids);
  1387. default:
  1388. break;
  1389. }
  1390. } else {
  1391. this.$notify({
  1392. title: '警告',
  1393. message: '请选择需要删除的数据!',
  1394. type: 'warning'
  1395. });
  1396. }
  1397. },
  1398. // 其他标签页刷新
  1399. async handleOtherListRefresh() {
  1400. switch (this.activeMainTab) {
  1401. // 基本信息
  1402. case 'material':
  1403. await this.getTagList('material', async(form) => {
  1404. this.basicData.form = [...form];
  1405. await this.getMaterialDetails(this.materialId, 'material');
  1406. })
  1407. break;
  1408. // 财物信息
  1409. case 'material_finance':
  1410. await this.getTagList('material_finance', async(form) => {
  1411. this.mainMsg.form = [...form];
  1412. await this.getFinanceList(this.materialId);
  1413. });
  1414. break;
  1415. // 利润中心信息
  1416. case 'profit_center':
  1417. await this.getTagList('profit_center', async(form) => {
  1418. this.mainMsg.form = [...form];
  1419. await this.getCenterList(this.materialId);
  1420. });
  1421. break;
  1422. // 采购信息
  1423. case 'material_purchase':
  1424. await this.getTagList('material_purchase', async(form) => {
  1425. this.mainMsg.form = [...form];
  1426. await this.getPurchaseList(this.materialId);
  1427. });
  1428. break;
  1429. // 库存信息
  1430. case 'material_inventory':
  1431. await this.getTagList('material_inventory', async(form) => {
  1432. this.mainMsg.form = [...form];
  1433. await this.getInventoryList(this.materialId);
  1434. });
  1435. break;
  1436. // 计划信息
  1437. case 'material_plan':
  1438. await this.getTagList('material_plan', async(form) => {
  1439. this.mainMsg.form = [...form];
  1440. await this.getPlanList(this.materialId);
  1441. });
  1442. break;
  1443. // 成本信息
  1444. case 'material_cost':
  1445. await this.getTagList('material_cost',async(form) => {
  1446. this.mainMsg.form = [...form];
  1447. await this.getCostList(this.materialId);
  1448. });
  1449. break;
  1450. default:
  1451. break;
  1452. }
  1453. },
  1454. // 修改
  1455. handleBasicEdit() {
  1456. console.log('修改基本信息');
  1457. this.updateButtonGroup = true;
  1458. // this.count++;
  1459. //需要禁止点击其他标签
  1460. // this.detailsTabs = this.detailsTabs.map(item => {
  1461. // item['disabled'] = true;
  1462. // return item
  1463. // })
  1464. console.log(this.detailsTabs, 'this.detailsTabs ');
  1465. },
  1466. // 删除
  1467. handleDel() {
  1468. console.log('删除----基本信息');
  1469. },
  1470. // 复制
  1471. handleCopy() {
  1472. console.log('复制');
  1473. },
  1474. //查询
  1475. handleQuery() {
  1476. },
  1477. // 刷新
  1478. handleRefresh() {
  1479. console.log('刷新');
  1480. this.$refs.basicMessageRef.clearValidate();
  1481. this.$refs.medcineRef.clearValidate();
  1482. this.handleRest();
  1483. },
  1484. // 过滤
  1485. handleFilter(e) {
  1486. console.log(e, '过滤');
  1487. },
  1488. filterCondition(type) {
  1489. return {
  1490. type
  1491. }
  1492. },
  1493. // 维护物料类别
  1494. handleMaterialType() {
  1495. console.log('维护物料类别');
  1496. this.materialType.show = true;
  1497. this.materialType.loading = true;
  1498. this.getTagList('material_medcine_item', (form) => {
  1499. this.materialType.form = form;
  1500. this.getMedcineitemList(this.materialId);
  1501. });
  1502. },
  1503. // 启用
  1504. handleIsInvoke(e) {
  1505. console.log('启用', this.basicData.value.isEnable);
  1506. let param = {
  1507. isEnable: this.basicData.value.isEnable == '已启用' ? '2' : '0',
  1508. id: this.basicData.value.id
  1509. };
  1510. console.log(param, '启用/停用param');
  1511. materialApi.updateEnableMaterial(param).then(res => {
  1512. console.log(res, '启用/停用');
  1513. if (res.code == 200) this.handleRefresh();
  1514. })
  1515. },
  1516. // 维护新版本
  1517. handleNewVersion() {
  1518. let _this = this;
  1519. let data = {
  1520. // 物料编码
  1521. code: this.basicData.value.code
  1522. }
  1523. materialApi.versions(data).then(res => {
  1524. console.log(res, '维护新版本');
  1525. if (res.code == 200) {
  1526. _this.maintainNewVersion = res.data.result;
  1527. // 维护版本消息展示 by shiy 2023/05/31
  1528. if (!res.data.result) {
  1529. this.$notify({
  1530. title: '警告',
  1531. message: res.data.msg,
  1532. type: 'warning'
  1533. });
  1534. }
  1535. }
  1536. })
  1537. },
  1538. // 维护物料保存
  1539. handleSaveNewVersion(cb) {
  1540. let data = {
  1541. // 物料编码
  1542. materialCode: this.basicData.value.code,
  1543. //序列号管理; 2= 否,0= 是
  1544. serialNoManager: this.basicData.value.serialNoManager,
  1545. // 批号及库存状态管理;2=否,0=是
  1546. isInventoryStatus: this.basicData.value.isInventoryStatus,
  1547. }
  1548. materialApi.saveVersions(data).then(res => {
  1549. console.log(res, '维护物料保存');
  1550. if (res.code == 200) {
  1551. cb();
  1552. }
  1553. })
  1554. .catch((error) => {
  1555. this.loading = false;
  1556. })
  1557. },
  1558. // 取消保存
  1559. handleCancel() {
  1560. console.log('取消保存');
  1561. this.optionDialog.op = '取消';
  1562. this.optionDialog.show = true;
  1563. },
  1564. // 保存修改
  1565. handleSave() {
  1566. console.log('保存修改');
  1567. this.$refs['basicMessageRef'].validate(async (valid) => {
  1568. if (valid) {
  1569. this.loading = true;
  1570. // 普通保存修改
  1571. this.updateButtonGroup && this.handleSaveMaterial(() => {
  1572. this.updateButtonGroup = false;
  1573. this.handleRefresh();
  1574. });
  1575. // 维护新版本保存修改
  1576. this.maintainNewVersion && this.handleSaveNewVersion(() => {
  1577. this.maintainNewVersion = false;
  1578. this.handleRefresh();
  1579. })
  1580. } else {
  1581. this.$notify.error({
  1582. title: '错误',
  1583. message: '存在必填项未填写!'
  1584. });
  1585. console.log('error submit!!');
  1586. return false;
  1587. }
  1588. })
  1589. },
  1590. // 物料类别列表选中
  1591. handleSelectionType(list) {
  1592. console.log('物料类别列表选中', list);
  1593. this.materialType.checkedList = list;
  1594. },
  1595. // 物料类别增删行
  1596. handleMaterialTypeRow(op) {
  1597. let _this = this;
  1598. switch (op) {
  1599. // 增行
  1600. case 'add':
  1601. let rowObj = {};
  1602. for (const key in _this.materialType.value[0]) {
  1603. if (Object.hasOwnProperty.call(_this.materialType.value[0], key)) {
  1604. rowObj[key] = '';
  1605. }
  1606. }
  1607. rowObj['insertId'] = new Date().getTime();
  1608. this.materialType.value.push(rowObj);
  1609. console.log(this.materialType.value, '物料类别增行rowObj后');
  1610. break;
  1611. // 删行
  1612. case 'del':
  1613. console.log('物料类别删行', _this.materialType.checkedList);
  1614. if (_this.materialType.checkedList.length) {
  1615. _this.materialType.checkedList.map(c => {
  1616. _this.materialType.value = _this.materialType.value.filter(m => {
  1617. if (m.id && m.id != '' && m.id != c.id) {
  1618. return m;
  1619. } else if (m.insertId && m.insertId != '' && m.insertId != c.insertId) {
  1620. return m
  1621. }
  1622. })
  1623. })
  1624. } else {
  1625. this.$notify({
  1626. title: '警告',
  1627. message: '请选择需要删除的信息!',
  1628. type: 'warning'
  1629. });
  1630. }
  1631. break;
  1632. // 取消
  1633. case 'cancal':
  1634. this.materialType.isEdit = false;
  1635. this.handleMaterialTypeRow();
  1636. break;
  1637. // 保存、修改
  1638. case 'edit':
  1639. if (_this.materialType.isEdit) {
  1640. // 编辑状态
  1641. let nullList = _this.materialType.value.filter(m => (!m.drugId || m.drugId == ''));
  1642. console.log(nullList, 'nullList');
  1643. if (!nullList.length && _this.materialType.value.length) {
  1644. console.log('物料类别保存', _this.materialType.value);
  1645. let params = {
  1646. materialId: _this.materialId,
  1647. medcineItems: _this.materialType.value
  1648. }
  1649. materialApi.medcineitemBatchSave(params).then(res => {
  1650. console.log(res, '保存物料类型');
  1651. if (res.code == 200) {
  1652. _this.materialType.isEdit = false;
  1653. _this.handleMaterialTypeRow();
  1654. }
  1655. })
  1656. // 保存
  1657. } else {
  1658. this.$notify({
  1659. title: '警告',
  1660. message: '不能保存空数据或存在数据为空!',
  1661. type: 'warning'
  1662. });
  1663. }
  1664. } else {
  1665. // 非编辑状态
  1666. console.log('物料类别修改');
  1667. this.materialType.isEdit = true;
  1668. }
  1669. break;
  1670. // 刷新
  1671. default:
  1672. console.log('物料类别刷新');
  1673. if (this.materialType.isEdit) {
  1674. this.$notify({
  1675. title: '警告',
  1676. message: '请先保存数据!',
  1677. type: 'warning'
  1678. });
  1679. } else {
  1680. this.materialType.loading = true;
  1681. this.getTagList('material_medcine_item', (form) => {
  1682. this.materialType.form = form;
  1683. this.getMedcineitemList(this.materialId);
  1684. });
  1685. }
  1686. break;
  1687. }
  1688. },
  1689. // 物料类别弹窗关闭前
  1690. handleCloseTypeDetails(done) {
  1691. console.log('物料类别弹窗关闭前');
  1692. this.materialType.isEdit ? this.$notify({
  1693. title: '警告',
  1694. message: '请先保存数据!',
  1695. type: 'warning'
  1696. }): done();
  1697. },
  1698. // 保存修改并新增
  1699. handleSaveAdd() {
  1700. console.log('保存修改并新增');
  1701. },
  1702. // 其他标签页弹窗取消操作
  1703. handleOtherCancel() {
  1704. console.log('其他标签页弹窗取消操作');
  1705. this.optionDialog.show = true;
  1706. this.optionDialog.op = '修改';
  1707. },
  1708. // 其他标签页弹窗保存
  1709. async handleOtherSave() {
  1710. console.log('其他标签页弹窗保存', this.activeMainTab);
  1711. let data = this.otherDeatils.value;
  1712. console.log(data, 'params');
  1713. switch (this.activeMainTab) {
  1714. // 财物信息
  1715. case 'material_finance':
  1716. await this.handleSaveFinance(data);
  1717. break;
  1718. // 利润中心信息
  1719. case 'profit_center':
  1720. await this.handleSaveCenter(data);
  1721. break;
  1722. // 采购信息
  1723. case 'material_purchase':
  1724. await this.handleSavePurchase(data);
  1725. break;
  1726. // 库存信息
  1727. case 'material_inventory':
  1728. await this.handleSaveInventoryEdit(data);
  1729. break;
  1730. // 计划信息
  1731. case 'material_plan':
  1732. await this.handleSavePlan(data);
  1733. break;
  1734. // 成本信息
  1735. case 'material_cost':
  1736. await this.handleSaveCost(data);
  1737. break;
  1738. default:
  1739. break;
  1740. }
  1741. // this.handleOtherRefresh();
  1742. },
  1743. // 其他页签详情弹窗关闭事件
  1744. handleCloseOtherDetails(done) {
  1745. console.log('其他页签详情弹窗关闭事件');
  1746. // 处于编辑状态
  1747. if (this.otherDeatils.isEdit) {
  1748. this.$notify({
  1749. title: '警告',
  1750. message: '请先退出编辑操作',
  1751. type: 'warning'
  1752. });
  1753. } else {
  1754. this.handleOtherListRefresh();
  1755. done();
  1756. }
  1757. },
  1758. // 折叠菜单改变
  1759. handleCollapseChange(val) {
  1760. console.log(val, '折叠菜单改变');
  1761. },
  1762. // 更新导入
  1763. handleUpdateImport() {
  1764. console.log('更新导入');
  1765. },
  1766. // 确认弹窗操作
  1767. async handleComfirmOption() {
  1768. console.log('确认弹窗操作');
  1769. this.optionDialog.show = false;
  1770. // 取消基本信息修改
  1771. if (this.updateButtonGroup) {
  1772. this.updateButtonGroup = false;
  1773. // this.handleRest();
  1774. await this.getMaterialDetails(this.materialId, 'material');
  1775. await this.getMedcineDetails(this.materialId, 'material_medcine');
  1776. this.$refs.basicMessageRef.clearValidate();
  1777. this.$refs.medcineRef.clearValidate();
  1778. }
  1779. // 取消其他主页签详情弹窗修改
  1780. if (this.otherDeatils.isEdit) {
  1781. this.otherDeatils.isEdit = false;
  1782. this.handleOtherRefresh();
  1783. }
  1784. // 取消维护新版本修改
  1785. if (this.maintainNewVersion) {
  1786. console.log('取消维护新版本修改');
  1787. this.maintainNewVersion = false;
  1788. this.handleRefresh();
  1789. }
  1790. },
  1791. // 参照弹窗过滤
  1792. handleFilterRefer() {
  1793. // this.MoreDataDialog.key =
  1794. console.log(this.MoreDataDialog.key, '查询关键字', this.MoreDataDialog.target);
  1795. this.handleQueryMore(this.MoreDataDialog.msg, this.MoreDataDialog.key, this.MoreDataDialog.target);
  1796. },
  1797. // 操作提示弹窗关闭
  1798. handleOptionCancal() {
  1799. this.optionDialog.show = false;
  1800. this.otherDeatils.isEdit = true;
  1801. },
  1802. // 树形节点选择
  1803. handleNodeClick(e) {
  1804. console.log(e, '树形节点选择', this.MoreDataDialog.target);
  1805. // let node = { ...e, name: e.label }
  1806. this.MoreDataDialog.value = e;
  1807. },
  1808. // 修改-更多数据表格——选择行
  1809. handleCurentRow(row) {
  1810. console.log(row, '修改-更多数据表格——选择行');
  1811. this.MoreDataDialog.value = row;
  1812. },
  1813. // 参照弹窗确认
  1814. handleConfirmRefer() {
  1815. let _this = this;
  1816. console.log('确认参照弹窗', `{this.${this.MoreDataDialog.target.name}:${this.MoreDataDialog.value.id}}`);
  1817. let confirm = true;
  1818. if (this.MoreDataDialog.target.name == 'basicData') {
  1819. // 基本信息
  1820. this.basicData.value[this.MoreDataDialog.target.prop] = this.MoreDataDialog.value.id;
  1821. this.basicData.value[`${this.MoreDataDialog.target.prop}Name`] = this.MoreDataDialog.value.name;
  1822. console.log(this.MoreDataDialog.target.prop, 'props-----------------', this.MoreDataDialog.value);
  1823. console.log(this.basicData.value[`${this.MoreDataDialog.target.prop}`], '值', this.basicData.value[`${this.MoreDataDialog.target.prop}Name`], '//////////基本信息///////////');
  1824. // 默认采购组织:purchasingOrganization 业务部门:businessDepartment
  1825. if (this.MoreDataDialog.target.prop == 'purchasingOrganization') {
  1826. this.basicData.value['businessDepartment'] = '';
  1827. this.basicData.value['businessDepartmentName'] = '';
  1828. }
  1829. } else if (this.MoreDataDialog.target.name == 'medcineData') {
  1830. // 医药信息
  1831. this.medcineData.value[this.MoreDataDialog.target.prop] = this.MoreDataDialog.value.id;
  1832. this.medcineData.value[`${this.MoreDataDialog.target.prop}Name`] = this.MoreDataDialog.value.name;
  1833. console.log(this.MoreDataDialog.target.prop, 'props-----------------', this.MoreDataDialog.value);
  1834. console.log(this.medcineData.value[`${this.MoreDataDialog.target.prop}Name`], '//////医药信息//////////');
  1835. } else if (this.MoreDataDialog.target.name == 'otherDeatils') {
  1836. // 其他页签
  1837. this.otherDeatils.value[this.MoreDataDialog.target.prop] = this.MoreDataDialog.value.id;
  1838. this.otherDeatils.value[`${this.MoreDataDialog.target.prop}Name`] = this.MoreDataDialog.value.name;
  1839. console.log(this.otherDeatils.value[`${this.MoreDataDialog.target.prop}Name`], '/////////其他页签///////');
  1840. } else if (this.MoreDataDialog.target.name == 'materialType') {
  1841. // 物料类别
  1842. console.log('确认时选择的数据', this.MoreDataDialog.value);
  1843. this.materialType.value = this.materialType.value.map(m => {
  1844. if ((m.id && m.id != '' && m.id == _this.MoreDataDialog.target.prop['id']) ||
  1845. (m.insertId && m.insertId == _this.MoreDataDialog.target.prop['insertId'])
  1846. ) {
  1847. let drug = _this.materialType.value.filter(d => d.drugId == _this.MoreDataDialog.value['id'])
  1848. console.log(drug, 'drug------------------------------------');
  1849. if (drug.length) {
  1850. _this.$notify({
  1851. title: '警告',
  1852. message: '不能维护相同的物料类别!',
  1853. type: 'warning'
  1854. });
  1855. confirm = false;
  1856. } else {
  1857. m.drugId = _this.MoreDataDialog.value['id'];
  1858. m.drugCode = _this.MoreDataDialog.value['code'];
  1859. m.drugName = _this.MoreDataDialog.value['name'];
  1860. }
  1861. }
  1862. return m;
  1863. })
  1864. console.log(this.materialType.value, '修改之后-----this.materialType.value');
  1865. }
  1866. if (confirm) {
  1867. // this.count++;
  1868. this.refer++;
  1869. this.MoreDataDialog.show = false;
  1870. this.MoreDataDialog.key = '';
  1871. this.MoreDataDialog.value = {};
  1872. }
  1873. },
  1874. // 取消-关闭参照弹窗
  1875. handleConcalRefer() {
  1876. console.log('关闭参照弹窗');
  1877. this.MoreDataDialog.show = false;
  1878. this.MoreDataDialog.key = '';
  1879. },
  1880. // 关闭参照弹窗前
  1881. handleCloseRefer(done) {
  1882. this.MoreDataDialog.key = '';
  1883. done();
  1884. },
  1885. // 删除利润中心信息
  1886. handledDelCenter(ids) {
  1887. console.log('删除利润中心信息');
  1888. materialApi.delCenter(ids).then(res => {
  1889. if (res.code == 200) {
  1890. this.handleOtherListRefresh();
  1891. }
  1892. })
  1893. },
  1894. // 删除库存信息
  1895. handleDelInventory(ids) {
  1896. console.log('删除库存信息');
  1897. materialApi.delInventory(ids).then(res => {
  1898. if (res.code == 200) {
  1899. this.handleOtherListRefresh();
  1900. }
  1901. })
  1902. },
  1903. // 删除成本信息
  1904. handleDelCost(ids) {
  1905. console.log('删除成本信息');
  1906. materialApi.delCost(ids).then(res => {
  1907. if (res.code == 200) {
  1908. this.handleOtherListRefresh();
  1909. }
  1910. })
  1911. },
  1912. // 删除计划信息
  1913. handleDelPlan(ids) {
  1914. console.log('删除计划信息');
  1915. materialApi.delPlan(ids).then(res => {
  1916. if (res.code == 200) {
  1917. this.handleOtherListRefresh();
  1918. }
  1919. })
  1920. },
  1921. // 删除财物信息
  1922. handleDelFinance(ids) {
  1923. console.log('删除财物信息');
  1924. materialApi.delFinance(ids).then(res => {
  1925. if (res.code == 200) {
  1926. this.handleOtherListRefresh();
  1927. }
  1928. })
  1929. },
  1930. // 删除采购信息
  1931. handledelPurchase(ids) {
  1932. console.log('删除采购信息');
  1933. materialApi.delPurchase(ids).then(res => {
  1934. if (res.code == 200) {
  1935. this.handleOtherListRefresh();
  1936. }
  1937. });
  1938. },
  1939. // 保存物料以及相关页签
  1940. handleSaveMaterial(cb) {
  1941. let param = {
  1942. ...this.basicData.value,
  1943. materialMedcine: this.medcineData.value,
  1944. materialMedcineItem: {}
  1945. };
  1946. // diCode
  1947. param.diCode = param.diCode.replace(/ /g, '');
  1948. console.log(param, '保存物料以及相关页签param');
  1949. materialApi.insertMaterialInfo(param).then(res => {
  1950. console.log(res, '保存物料以及相关页签');
  1951. if (res.code == 200) cb();
  1952. }).catch((error) => {
  1953. this.loading = false;
  1954. })
  1955. },
  1956. // 保存财务信息——单个数据
  1957. async handleSaveFinance(data) {
  1958. console.log(data, '保存财务信息——单个数据');
  1959. try {
  1960. this.otherDeatils.loading = true;
  1961. let {code,msg} = await materialApi.financeEdit(data);
  1962. if (code == 200) {
  1963. this.otherDeatils.isEdit = false;
  1964. this.handleOtherRefresh();
  1965. this.$notify({
  1966. title: '成功',
  1967. message: msg,
  1968. type: 'success'
  1969. });
  1970. }
  1971. } catch (error) {
  1972. }finally{
  1973. this.otherDeatils.loading = false;
  1974. }
  1975. // this.otherDeatils.loading = true;
  1976. // materialApi.financeEdit(data).then(res => {
  1977. // if (res.code == 200) {
  1978. // this.otherDeatils.isEdit = false;
  1979. // this.handleOtherRefresh();
  1980. // }
  1981. // this.otherDeatils.loading = false;
  1982. // })
  1983. },
  1984. // 保存利润中心信息
  1985. async handleSaveCenter(data) {
  1986. console.log(data, '保存利润中心信息');
  1987. try {
  1988. this.otherDeatils.loading = true;
  1989. let {code,msg} = await materialApi.centerEdit(data);
  1990. if (code == 200) {
  1991. this.otherDeatils.isEdit = false;
  1992. this.handleOtherRefresh();
  1993. this.$notify({
  1994. title: '成功',
  1995. message: msg,
  1996. type: 'success'
  1997. });
  1998. }
  1999. } catch (error) {}
  2000. finally{
  2001. this.otherDeatils.loading = false;
  2002. }
  2003. // materialApi.centerEdit(data).then(res => {
  2004. // if (res.code == 200) {
  2005. // this.otherDeatils.isEdit = false;
  2006. // this.handleOtherRefresh();
  2007. // }
  2008. // })
  2009. },
  2010. // 保存采购信息
  2011. async handleSavePurchase(data) {
  2012. console.log(data, '保存采购信息');
  2013. try {
  2014. this.otherDeatils.loading = true;
  2015. let {code,msg} = await materialApi.purchaseEdit(data);
  2016. if (code == 200) {
  2017. this.otherDeatils.isEdit = false;
  2018. this.handleOtherRefresh();
  2019. this.$notify({
  2020. title: '成功',
  2021. message: msg,
  2022. type: 'success'
  2023. });
  2024. }
  2025. } catch (error) {}
  2026. finally{
  2027. this.otherDeatils.loading = false;
  2028. }
  2029. // materialApi.purchaseEdit(data).then(res => {
  2030. // if (res.code == 200) {
  2031. // this.otherDeatils.isEdit = false;
  2032. // this.handleOtherRefresh();
  2033. // }
  2034. // })
  2035. },
  2036. // 保存库存信息
  2037. async handleSaveInventoryEdit(data) {
  2038. console.log(data, '保存库存信息');
  2039. try {
  2040. this.otherDeatils.loading = true;
  2041. let {code,msg} = await materialApi.inventoryEdit(data);
  2042. if (code == 200) {
  2043. this.otherDeatils.isEdit = false;
  2044. this.handleOtherRefresh();
  2045. this.$notify({
  2046. title: '成功',
  2047. message: msg,
  2048. type: 'success'
  2049. });
  2050. }
  2051. } catch (error) {}
  2052. finally{
  2053. this.otherDeatils.loading = false;
  2054. }
  2055. // materialApi.inventoryEdit(data).then(res => {
  2056. // if (res.code == 200) {
  2057. // this.otherDeatils.isEdit = false;
  2058. // this.handleOtherRefresh();
  2059. // }
  2060. // })
  2061. },
  2062. // 保存计划信息
  2063. async handleSavePlan(data) {
  2064. console.log(data, '保存计划信息');
  2065. try {
  2066. this.otherDeatils.loading = true;
  2067. let {code,msg} = await materialApi.planEdit(data);
  2068. if (code == 200) {
  2069. this.otherDeatils.isEdit = false;
  2070. this.handleOtherRefresh();
  2071. this.$notify({
  2072. title: '成功',
  2073. message: msg,
  2074. type: 'success'
  2075. });
  2076. }
  2077. } catch (error) {}
  2078. finally{
  2079. this.otherDeatils.loading = false;
  2080. }
  2081. // materialApi.planEdit(data).then(res => {
  2082. // if (res.code == 200) {
  2083. // this.otherDeatils.isEdit = false;
  2084. // this.handleOtherRefresh();
  2085. // }
  2086. // })
  2087. },
  2088. // 保存成本信息
  2089. async handleSaveCost(data) {
  2090. console.log(data, '保存成本信息');
  2091. try {
  2092. this.otherDeatils.loading = true;
  2093. let {code,msg} = await materialApi.costEdit(data);
  2094. if (code == 200) {
  2095. this.otherDeatils.isEdit = false;
  2096. this.handleOtherRefresh();
  2097. this.$notify({
  2098. title: '成功',
  2099. message: msg,
  2100. type: 'success'
  2101. });
  2102. }
  2103. } catch (error) {}
  2104. finally{
  2105. this.otherDeatils.loading = false;
  2106. }
  2107. // materialApi.costEdit(data).then(res => {
  2108. // if (res.code == 200) {
  2109. // this.otherDeatils.isEdit = false;
  2110. // this.handleOtherRefresh();
  2111. // }
  2112. // })
  2113. },
  2114. judgeIsRequriedByProps(message){
  2115. // condiition:条件,tergetNames:目标porps数组,formName:表单,formRef:表单ref名,
  2116. this[message.formName].form.forEach(formItem => {
  2117. let target = message.tergetNames.filter(t => t === formItem.prop);
  2118. if(target && target.length){
  2119. (formItem.required = message.condiition ? false : true);
  2120. }
  2121. })
  2122. this.rules = initRules(this[message.formName].form);
  2123. this.$nextTick( ()=> {
  2124. message.condiition && this.$refs[message.formRef].clearValidate(message.tergetNames);
  2125. })
  2126. },
  2127. // 重新加载
  2128. async handleRest() {
  2129. this.loading = true;
  2130. // 基本信息
  2131. await this.getTagList('material', (form) => {
  2132. this.basicData.form = [...form];
  2133. this.rules = initRules(form);
  2134. this.basicData.value = initParams(this.basicData.form,'prop')
  2135. this.getMaterialDetails(this.materialId, 'material');
  2136. })
  2137. // 医疗行业
  2138. await this.getTagList('material_medcine', (form) => {
  2139. form.forEach((item) => {
  2140. this.medcineData.value[item.prop] = ''
  2141. })
  2142. this.medcineData.form = form;
  2143. this.medcineData.value = initParams(this.medcineData.form,'prop')
  2144. this.medcineRules = initRules(form);
  2145. this.getMedcineDetails(this.materialId, 'material_medcine');
  2146. })
  2147. },
  2148. },
  2149. watch: {
  2150. // 监听主标签修改标识,控制其他标签是否禁止点击
  2151. 'updateButtonGroup': function (nVal, oVal) {
  2152. console.log(nVal, 'nVal', oVal, 'oVal');
  2153. this.detailsTabs = this.detailsTabs.map(item => {
  2154. item['disabled'] = nVal;
  2155. return item;
  2156. })
  2157. },
  2158. 'maintainNewVersion': function (nVal, oVal) {
  2159. console.log(nVal, 'nVal', oVal, 'oVal');
  2160. this.detailsTabs = this.detailsTabs.map(item => {
  2161. item['disabled'] = nVal;
  2162. return item;
  2163. })
  2164. },
  2165. "basicData.value.isMedicine": {
  2166. handler(nVal, oVal) {
  2167. this.basicData.form = this.basicData.form.map(formItem => {
  2168. if (formItem.prop === 'productionPermit') {
  2169. formItem.required = nVal == '0' ? true : false;
  2170. }
  2171. return formItem;
  2172. })
  2173. },
  2174. deep: true,
  2175. },
  2176. // 通过一级分类判断业务线是否必填
  2177. "basicData.value.oneClass": {
  2178. handler(nVal, oVal) {
  2179. this.basicData.form = this.basicData.form.map(formItem => {
  2180. if (formItem.prop === "businessLine" && nVal) {
  2181. if ( nVal.includes('介入耗材&5') || nVal.includes('骨科耗材&2') ||
  2182. nVal.includes('普通耗材&3') || nVal.includes('医用设备&1') ||
  2183. nVal.includes('体外诊断&4')) {
  2184. formItem.required = true
  2185. } else {
  2186. formItem.required = false
  2187. }
  2188. }
  2189. return formItem;
  2190. })
  2191. },
  2192. deep: true,
  2193. },
  2194. // 物料分类改变同时改变一二三级分类
  2195. "basicData.value.classifyId": {
  2196. async handler(nVal, oVal) {
  2197. if(nVal !== oVal){
  2198. try {
  2199. let {code, data } = await getDetail(nVal);
  2200. if( code == 200){
  2201. let {oneClass,twoClass,threeClass} = data;
  2202. this.basicData.value['oneClass'] = oneClass;
  2203. this.basicData.value['twoClass'] = twoClass;
  2204. this.basicData.value['threeClass'] = threeClass;
  2205. }
  2206. } catch (error) {}
  2207. }
  2208. },
  2209. deep: true,
  2210. },
  2211. // 效期管理 expiryDateManagerment 控制 expiryUnitId 效期单位 usefulLife 有效期 usefulLifeUnitId 有效期至单位 必填
  2212. "basicData.value.expiryDateManagerment":{
  2213. handler(nVal, oVal) {
  2214. this.judgeIsRequriedByProps({
  2215. condiition:(nVal === '2'),
  2216. tergetNames:['expiryUnitId','usefulLife','usefulLifeUnitId','recentWarningPeriod'],
  2217. formName:'basicData',
  2218. formRef:'basicMessageRef',
  2219. })
  2220. },
  2221. deep: true,
  2222. },
  2223. },
  2224. created() {
  2225. console.log(this, 'created');
  2226. // 基本信息
  2227. this.handleRest();
  2228. if (window.name === '') {
  2229. this.$route.query.isEdit && this.handleBasicEdit();
  2230. } else {
  2231. console.log('页面被刷新')
  2232. }
  2233. }
  2234. }
  2235. </script>
  2236. <style lang="scss">
  2237. .material-details {
  2238. padding: 12px;
  2239. height: 100%;
  2240. // height: calc(100vh - 158px);
  2241. box-sizing: border-box;
  2242. .el-card__body {
  2243. // height: calc(100vh - 160px);
  2244. height: 100%;
  2245. box-sizing: border-box;
  2246. padding: 12px;
  2247. overflow-y: auto;
  2248. overflow-x: auto;
  2249. .el-select {
  2250. width: 100%;
  2251. }
  2252. }
  2253. .md-content {
  2254. margin-top: 12px;
  2255. // height: calc(100vh - 260px);
  2256. height: calc(100vh - 228px);
  2257. box-sizing: border-box;
  2258. .md-basic {
  2259. overflow: auto;
  2260. .md-main {
  2261. // height: calc(100vh - 625px);
  2262. margin-bottom: 10px;
  2263. .el-table__body {
  2264. // height: calc(100vh - 300px);
  2265. }
  2266. .el-form {
  2267. max-height: 350px;
  2268. overflow-y: auto;
  2269. overflow-x: hidden;
  2270. .redSpan::before {
  2271. content: "* ";
  2272. color: red;
  2273. }
  2274. .el-checkbox {
  2275. padding: 0 58%;
  2276. }
  2277. }
  2278. }
  2279. .md-vice-content {
  2280. height: 140px;
  2281. overflow-y: auto;
  2282. overflow-x: hidden;
  2283. }
  2284. }
  2285. .md-auditInfo {
  2286. .el-divider--horizontal {
  2287. margin: 20px 0px 15px;
  2288. }
  2289. }
  2290. }
  2291. // .md-content>.el-tabs {
  2292. // height: calc(100vh - 280px);
  2293. // }
  2294. .otherDialog {
  2295. .el-collapse-item__content {
  2296. padding-bottom: 12px;
  2297. }
  2298. .el-form {
  2299. .el-checkbox {
  2300. width: 100%;
  2301. padding: 0 10%;
  2302. }
  2303. }
  2304. .el-dialog__body {
  2305. padding: 12px 20px;
  2306. height: 80%;
  2307. overflow: auto;
  2308. }
  2309. .od-msg {
  2310. max-height: 220px;
  2311. box-sizing: border-box;
  2312. overflow-y: auto;
  2313. overflow-x: hidden;
  2314. }
  2315. // .el-dialog__header {
  2316. // background-color: rgb(244, 244, 244);
  2317. // }
  2318. }
  2319. .el-dialog__header {
  2320. background-color: rgb(244, 244, 244);
  2321. }
  2322. .MoreDataDialog {
  2323. .el-dialog__body {
  2324. height: 500px;
  2325. padding: 20px 15px;
  2326. .el-table {
  2327. margin-top: 10px;
  2328. .el-table__body-wrapper {
  2329. height: 300px;
  2330. overflow-y: auto;
  2331. overflow-x: hidden;
  2332. }
  2333. }
  2334. .el-pagination {
  2335. text-align: right;
  2336. margin-top: 5px;
  2337. }
  2338. .referTree {
  2339. height: 390px;
  2340. overflow-x: hidden;
  2341. overflow-y: auto;
  2342. }
  2343. }
  2344. .more-button {
  2345. margin-top: 10px;
  2346. text-align: right;
  2347. }
  2348. }
  2349. }
  2350. // 修改下拉框样式
  2351. #selected {
  2352. /*很关键:将默认的select选择框样式清除*/
  2353. // appearance: none;
  2354. // -moz-appearance: none;
  2355. // -webkit-appearance: none;
  2356. // /*为下拉小箭头留出一点位置,避免被文字覆盖*/
  2357. // padding-right: 14px;
  2358. // /*自定义图片*/
  2359. // background: url("../images/search@2x.png") no-repeat scroll right center transparent;
  2360. // /*自定义图片的大小*/
  2361. // background-size: 16px 16px;
  2362. // /*将小箭头的样式去去掉*/
  2363. // .el-icon-arrow-up:before {
  2364. // content: '';
  2365. // }
  2366. // }
  2367. }
  2368. </style>
  2369. <style scoped>
  2370. .md-content >>> .el-form-item,
  2371. .otherDialog >>> .el-form-item {
  2372. margin-bottom: 10px;
  2373. }
  2374. .md-content >>> .el-tabs--border-card > .el-tabs__content {
  2375. padding-bottom: 8px;
  2376. }
  2377. .md-content .md-auditInfo >>> .el-form-item {
  2378. margin-bottom: 0px;
  2379. }
  2380. .md-main >>> .el-form-item,
  2381. .md-vice >>> .el-form-item,
  2382. .od-msg >>> .el-form-item {
  2383. width: 100%;
  2384. box-sizing: border-box;
  2385. }
  2386. .md-main >>> .el-form-item__label,
  2387. .md-vice >>> .el-form-item__label,
  2388. .od-msg >>> .el-form-item__label {
  2389. width: 40%;
  2390. }
  2391. .od-msg >>> .el-checkbox__input {
  2392. width: 15%;
  2393. }
  2394. .md-main >>> .el-form-item__content,
  2395. .md-vice >>> .el-form-item__content,
  2396. .od-msg >>> .el-form-item__content {
  2397. width: 60%;
  2398. box-sizing: border-box;
  2399. height: 36px;
  2400. }
  2401. .od-msg >>> .el-checkbox__label {
  2402. width: 85%;
  2403. box-sizing: border-box;
  2404. }
  2405. .od-msg-checkedbx >>> .el-form-item__content {
  2406. width: 80%;
  2407. box-sizing: border-box;
  2408. }
  2409. .od-msg-checkedbx >>> .el-checkbox {
  2410. width: 75%;
  2411. box-sizing: border-box;
  2412. }
  2413. .md-content >>> .el-form-item__label,
  2414. .otherDialog >>> .el-form-item__label,
  2415. .od-msg >>> .el-form-item__label,
  2416. .od-msg >>> .el-checkbox__label {
  2417. font-weight: normal;
  2418. /* text-align: left;
  2419. width: 28%; */
  2420. white-space: nowrap;
  2421. /* IE6 需要定义宽度 */
  2422. overflow: hidden;
  2423. -o-text-overflow: ellipsis;
  2424. /* Opera */
  2425. text-overflow: ellipsis;
  2426. /* IE, Safari (WebKit) */
  2427. /* -moz-binding: url('ellipsis.xml#ellipsis'); */
  2428. /* Firefox */
  2429. }
  2430. .otherDialog >>> .el-form-item__label {
  2431. font-size: 12px;
  2432. }
  2433. .md-main >>> .material-table {
  2434. height: 100%;
  2435. }
  2436. .md-vice >>> .material-table {
  2437. height: 140px;
  2438. overflow-y: auto;
  2439. overflow-x: auto;
  2440. }
  2441. >>> .referTree {
  2442. margin-top: 10px;
  2443. }
  2444. /* .md-main>>>.el-table .el-table__body {
  2445. height: calc(100vh - 300px);
  2446. } */
  2447. /* .otherDialog>>>.el-collapse-item__content {
  2448. padding-bottom: 12px;
  2449. }
  2450. .otherDialog>>>.el-dialog__body {
  2451. padding: 12px 20px;
  2452. } */
  2453. </style>