weighingManagementNew.vue 79 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101
  1. <template>
  2. <div class="center">
  3. <BaseHeaderLayout :leftSpan="12">
  4. <template slot="left">
  5. </template>
  6. <template slot="right">
  7. <el-select v-model="warehouseName" filterable placeholder="" @change="warehouseNameChange" :value="searchType">
  8. <el-option v-for="item in warehouseList" :key="item.value" :label="item.value" :value="item.value"
  9. style="color: #8890b1" />
  10. </el-select>
  11. </template>
  12. </BaseHeaderLayout>
  13. <div style="display: flex;">
  14. <div style="background: #f6f7fc; padding: 10px" class="grid-content bg-purple size_css">
  15. <BalanceAlert v-if="isShowBalance" ref="weightChild" :deptBudgetList="deptBudgetList" :information="information"
  16. v-on:balanceListen="setVal" class="zujian">
  17. </BalanceAlert>
  18. <div class="top">
  19. <div class="confirmWeight">
  20. <div class="titleWeight">确认重量</div>
  21. <div v-if="index == 0" class="weight">
  22. {{ weighingList.tare }} <span class="kg-style">kg</span>
  23. </div>
  24. <div v-else class="weight">
  25. {{ weighingList.grossWeight }} <span class="kg-style">kg</span>
  26. </div>
  27. </div>
  28. <div class="confirmInfo">
  29. <div class="car-type">车牌号</div>
  30. <div class="car-no">{{ weighingList.carNumber }}</div>
  31. </div>
  32. <!-- <el-button @click="weightweight" type="success" plain>确定</el-button> -->
  33. </div>
  34. <div class="bg-left titleup">
  35. <span class="word_css">实时监控</span>
  36. </div>
  37. <div class="bottom">
  38. <div v-if="!monitorUrl1" class="video1">
  39. <img src="../../../public/img/quesheng@2x.png" alt="" class="img1" />
  40. <div>监控视频未连接</div>
  41. </div>
  42. <div v-else class="video1">
  43. <iframe :src="monitorUrl1" width="440" height="360" allowfullscreen="true" webkitallowfullscreen="true"
  44. mozallowfullscreen="true" allow="autoplay; fullscreen; microphone;"></iframe>
  45. </div>
  46. <div v-if="!monitorUrl2" class="video1">
  47. <img src="../../../public/img/quesheng@2x.png" alt="" class="img1" />
  48. <div>监控视频未连接</div>
  49. </div>
  50. <div v-else class="video2">
  51. <iframe :src="monitorUrl2" width="440" height="360" allowfullscreen="true" webkitallowfullscreen="true"
  52. mozallowfullscreen="true" allow="autoplay; fullscreen; microphone;"></iframe>
  53. </div>
  54. </div>
  55. </div>
  56. <div>
  57. <el-row :gutter="20">
  58. <el-col :span="12">
  59. <div class="grid-content bg-purple">
  60. <div class="tab weigh_btn">
  61. <el-button :type="tpyeNo == 1 ? 'primary' : ''">
  62. <!-- <el-badge :value="mListTop.length" class="badge_item"> -->
  63. <div @click="tabClick(0)">称皮重</div>
  64. </el-button>
  65. <!-- </el-badge> -->
  66. <el-button :type="tpyeNo == 2 ? 'primary' : ''">
  67. <!-- <el-badge :value="pListTop.length" class="badge_item"> -->
  68. <div @click="tabClick(1)">称毛重</div>
  69. <!-- </el-badge> -->
  70. </el-button>
  71. </div>
  72. <ws-form class="right-content">
  73. <div class="left1">
  74. <div class="weightInfo">
  75. <ws-info-table>
  76. <ws-form-item label="任务编号" span="1" prop="inOutTaskNo">
  77. <el-select v-if="tpyeNo == 1" :disabled="recheck" filterable clearable
  78. v-model="weighingList.inOutTaskNo" placeholder="请选择任务编号" class="typeselect"
  79. @change="contractNoChange">
  80. <el-option v-for="item in taskNolist" :key="item.id" :label="item.inOutTaskNo"
  81. :value="item.inOutTaskNo" />
  82. </el-select>
  83. <ws-input v-else v-model="weighingList.inOutTaskNo" placeholder="自动获取,不可编辑" maxlength="100"
  84. disabled size="small" />
  85. </ws-form-item>
  86. <!-- <ws-form-item label="业务编号" span="1" prop="number">
  87. <ws-input v-model="weighingList.number" placeholder="自动获取,不可编辑" maxlength="100" disabled
  88. size="small" />
  89. </ws-form-item> -->
  90. <ws-form-item label="合同编号" span="1" prop="contractNo" v-show="inWarehouseType == 1"
  91. v-if="weighingList.contractNo && tpyeNo == 1">
  92. <ws-input v-model="weighingList.contractNo" placeholder="自动获取,不可编辑" maxlength="100" disabled
  93. size="small" />
  94. </ws-form-item>
  95. <ws-form-item label="移库编号" span="1" prop="moveTaskNo" v-show="inWarehouseType == 1"
  96. v-if="!weighingList.contractNo && tpyeNo == 1">
  97. <ws-input v-model="weighingList.moveTaskNo" placeholder="自动获取,不可编辑" maxlength="100" size="small"
  98. disabled />
  99. </ws-form-item>
  100. <ws-form-item v-if="tpyeNo == 1" label="提示" span="1" prop="tips">
  101. <ws-input v-model="weighingList.tips" placeholder="自动获取,不可编辑" maxlength="100" disabled
  102. size="small" />
  103. </ws-form-item>
  104. <ws-form-item label="货名" span="1" prop="goodsName">
  105. <ws-input v-model="weighingList.goodsName" placeholder="自动获取,不可编辑" maxlength="100" disabled
  106. size="small" />
  107. </ws-form-item>
  108. <ws-form-item v-if="tpyeNo == 1 && warehouseType == 1" label="仓位号" span="1" prop="inOutTaskNo">
  109. <el-select @change="binNumberchange" :disabled="recheck" filterable clearable
  110. v-model="weighingList.binNumber" placeholder="请选择仓位号" class="typeselect">
  111. <el-option v-for="item in positionInfos" :key="item.id" :label="item.binNumber"
  112. :value="item.binNumber" />
  113. </el-select>
  114. </ws-form-item>
  115. <ws-form-item v-if="tpyeNo == 1 && warehouseType == 1" label="囤位号" span="1" prop="storageNumber">
  116. <ws-input :disabled="recheck" v-model="weighingList.storageNumber" placeholder="选填,1-10个字符"
  117. maxlength="10" size="small" />
  118. </ws-form-item>
  119. <ws-form-item v-if="tpyeNo == 1" label="出库类型" span="1">
  120. <ws-input v-model="weighingList.inOutType" class="right-bottom" :disabled="isSelectType"
  121. placeholder="暂无" />
  122. </ws-form-item>
  123. <ws-form-item v-if="tpyeNo == 1" label="出库日期" span="1" prop="inOutDate" class="deliverydate">
  124. <ws-date-picker v-model="weighingList.inOutDate" type="date" placeholder="请选择出库日期"
  125. value-format="yyyy-MM-dd" />
  126. </ws-form-item>
  127. <ws-form-item label="运输方式" span="1" prop="outType">
  128. <el-select :disabled="tpyeNo == 2" v-model="weighingList.outType" placeholder="请选择运输方式">
  129. <el-option v-for="item in multiSelector" :key="item.value" :label="item.name"
  130. :value="item.name" />
  131. </el-select>
  132. </ws-form-item>
  133. <ws-form-item v-if="fleetNameList.length > 0 && tpyeNo == 1" label="车队" span="1" prop="fleetName">
  134. <el-select :disabled="recheck" v-model="deptBudgetList.fleet" placeholder="非车队车辆">
  135. <el-option v-for="item in fleetNameList" :key="item.value" :label="item.fleetName"
  136. :value="item.fleetName" />
  137. </el-select>
  138. </ws-form-item>
  139. <ws-form-item label="车牌号" span="1" prop="carNo" v-if="
  140. weighingList.outType == '汽运' ||
  141. weighingList.outType == '集装箱船'
  142. ">
  143. <ws-input v-if="!carstatus || carjudge" v-model="weighingList.carNo" placeholder="请输入车牌号"
  144. maxlength="7" size="small" />
  145. <el-select v-else filterable clearable v-model="weighingList.carNo" placeholder="请选择车牌号"
  146. class="typeselect" @change="carChange">
  147. <el-option v-for="item in options2" :key="item.constKey"
  148. :label="item.carNo + '(' + item.tranCarNo + ')'" :value="item.carNo" />
  149. </el-select>
  150. <el-button type="primary" @click="carNoTypeChange" v-if="carstatus">{{ carChange1 }}</el-button>
  151. </ws-form-item>
  152. <ws-form-item label="箱号-1" span="1" prop="boxNo" v-if="
  153. weighingList.outType == '汽运' ||
  154. weighingList.outType == '集装箱船'
  155. ">
  156. <ws-input v-model="weighingList.boxNo" placeholder="请输入箱号" maxlength="20" size="small" />
  157. </ws-form-item>
  158. <ws-form-item label="封号-1" span="1" prop="titleNo" v-if="
  159. weighingList.outType == '汽运' ||
  160. weighingList.outType == '集装箱船'
  161. ">
  162. <ws-input v-model="weighingList.titleNo" placeholder="请输入封号" maxlength="20" size="small" />
  163. </ws-form-item>
  164. <ws-form-item label="箱号-2" span="1" prop="boxNoOther" v-if="
  165. weighingList.outType == '汽运' ||
  166. weighingList.outType == '集装箱船'
  167. ">
  168. <ws-input v-model="weighingList.boxNoOther" placeholder="请输入箱号" maxlength="20" size="small" />
  169. </ws-form-item>
  170. <ws-form-item label="封号-2" span="1" prop="titleNoOther" v-if="
  171. weighingList.outType == '汽运' ||
  172. weighingList.outType == '集装箱船'
  173. ">
  174. <ws-input v-model="weighingList.titleNoOther" placeholder="请输入封号" maxlength="20" size="small" />
  175. </ws-form-item>
  176. <ws-form-item label="车厢号-1" span="1" prop="wingNumber" v-if="weighingList.outType == '火运'">
  177. <ws-input v-model="weighingList.wingNumber" placeholder="请输入车厢号" maxlength="20" size="small" />
  178. </ws-form-item>
  179. <ws-form-item label="车厢号-2" span="1" prop="wingNumberOther" v-if="weighingList.outType == '火运'">
  180. <ws-input v-model="weighingList.wingNumberOther" placeholder="请输入车厢号" maxlength="20"
  181. size="small" />
  182. </ws-form-item>
  183. <ws-form-item label="船名" span="1" prop="shipName" v-if="weighingList.outType == '散船'">
  184. <ws-input v-model="weighingList.shipName" placeholder="请输入船名" maxlength="20" size="small" />
  185. </ws-form-item>
  186. <ws-form-item label="航次" span="1" prop="shipNumber" v-if="weighingList.outType == '散船'">
  187. <ws-input v-model="weighingList.shipNumber" placeholder="请输入航次" maxlength="20" size="small" />
  188. </ws-form-item>
  189. <ws-form-item v-if="tpyeNo == 2" label="毛重(KG)" span="1" prop="grossWeight">
  190. <ws-input type="number" @mousewheel.native.prevent v-if="tpyeNo == 2"
  191. v-model="weighingList.grossWeight" @input="calculation" placeholder="未获取到毛重" maxlength="100"
  192. size="small" :disabled="disabled" />
  193. <el-button v-if="tpyeNo == 2 && warehouseType == 1" @click="openPort">重新获取</el-button>
  194. <el-button v-if="tpyeNo == 2 && warehouseType == 2" @click="disabled = false">编辑</el-button>
  195. </ws-form-item>
  196. <ws-form-item label="皮重(KG)" span="1" prop="tare" v-if="information == '毛重'">
  197. <ws-input type="number" @mousewheel.native.prevent v-model="weighingList.tare"
  198. @input="calculation" placeholder="未获取到皮重" maxlength="100" size="small" disabled />
  199. </ws-form-item>
  200. <ws-form-item label="皮重(KG)" span="1" prop="tare" v-if="information == '皮重'">
  201. <ws-input type="number" @mousewheel.native.prevent v-model="weighingList.tare"
  202. @input="calculation" placeholder="未获取到皮重" maxlength="100" size="small" :disabled="disabled" />
  203. <el-button v-if="tpyeNo == 1 && warehouseType == 1" @click="openPort">重新获取</el-button>
  204. <el-button v-if="tpyeNo == 1 && warehouseType == 2" @click="disabled = false">编辑</el-button>
  205. </ws-form-item>
  206. <div class="formItem">
  207. <!-- <ws-form-item label="扣重(KG)" span="1" prop="buckleMiscellaneous" v-if="
  208. information == '毛重' &&
  209. (paramType == '2' || inWarehouseType == 1)
  210. ">
  211. <ws-input type="number" @mousewheel.native.prevent v-model="weighingList.buckleMiscellaneous"
  212. @input="calculation" placeholder="请输入扣重" maxlength="100" size="small" />
  213. </ws-form-item> -->
  214. <ws-form-item label="净重(KG)" span="1" prop="netWeight" v-if="information == '毛重'">
  215. <ws-input type="number" @mousewheel.native.prevent v-model="weighingList.netWeight"
  216. placeholder="自动计算,不可编辑" maxlength="100" size="small" disabled />
  217. </ws-form-item>
  218. <!-- <ws-form-item label="应收卸车过磅费(元)" span="1" prop="receivableWeighingFee" v-if="index == 1">
  219. <ws-input type="number" v-model="weighingList.receivableWeighingFee" placeholder="未获取到卸车过磅费金额"
  220. maxlength="100" size="small" disabled />
  221. </ws-form-item>
  222. <ws-form-item label="实收卸车过磅费(元)" span="1" prop="actualWeighingFee" v-if="index == 1">
  223. <ws-input type="number" v-model="weighingList.actualWeighingFee" placeholder="输入卸车过磅费" maxlength="100"
  224. size="small" />
  225. </ws-form-item> -->
  226. </div>
  227. </ws-info-table>
  228. <div class="but">
  229. <!-- <el-button @click="print" type="primary" :disabled="submitAllow">提交</el-button> -->
  230. <el-button @click="print" v-if="information == '毛重'" type="primary">提交</el-button>
  231. <el-button @click="print" v-if="information == '皮重'" type="primary" :disabled="submitAllow">提交
  232. </el-button>
  233. </div>
  234. <!-- <div>
  235. <div>粮源</div>
  236. <div class='stocks' v-for='(item,index) in stocks'>
  237. <el-select v-model="item.warehouseName" filterable placeholder="选择所属仓库" @change="warehouseNameChange" :value="searchType">
  238. <el-option v-for="item in warehouseList" :key="item.value" :label="item.value" :value="item.value"
  239. style="color: #8890b1" />
  240. </el-select>
  241. <el-select v-model="item.warehouseName" filterable placeholder="选择货名" @change="warehouseNameChange" :value="searchType">
  242. <el-option v-for="item in warehouseList" :key="item.value" :label="item.value" :value="item.value"
  243. style="color: #8890b1" />
  244. </el-select>
  245. <ws-input v-model="item.cost" placeholder="输入重量" maxlength="100"
  246. size="small" />
  247. <img class='add' @click='addstocks(index)' style='width:20px;height:20px;' src="../../../public/img/add.png" alt="">
  248. <img class='del' @click='delstocks(index)' style='width:20px;height:20px;' src="../../../public/img/del.png" alt="">
  249. </div>
  250. </div> -->
  251. <!-- </div> -->
  252. </div>
  253. </div>
  254. </ws-form>
  255. </div>
  256. </el-col>
  257. <el-col :span="12">
  258. <div class="list-info">
  259. <div style="justify-content: space-between;" class="flex">
  260. <div style="min-width:146px;">
  261. <el-button v-if="tpyeNo == 1" @click="add" type="primary">新增</el-button>
  262. <el-button v-if="tpyeNo == 1" @click="deletelist" type="danger">删除</el-button>
  263. <el-button v-if="tpyeNo == 2" @click="statustypechangelist(3)"
  264. :type="statusType == 3 ? 'primary' : ''">未称毛重
  265. </el-button>
  266. <el-button v-if="tpyeNo == 2" @click="statustypechangelist(2)"
  267. :type="statusType == 2 ? 'primary' : ''">已称毛重
  268. </el-button>
  269. </div>
  270. <div style="display: flex;">
  271. <el-button @click='refreshClick(1)' type="primary">刷新</el-button>
  272. <el-button @click='refreshClick' type="primary">{{timer?refresh:'自动刷新'}}</el-button>
  273. <el-button @click="record" type="primary">记录</el-button>
  274. </div>
  275. </div>
  276. <el-table @cell-click="listclick" :data="deliveryList" style="width: 100%; margin-top: 20px"
  277. ref="deliveryList" border>
  278. <el-table-column prop="number" width="120" label="业务编号"></el-table-column>
  279. <el-table-column prop="carNumber" label="车牌号"></el-table-column>
  280. <el-table-column prop="status" label="状态"></el-table-column>
  281. </el-table>
  282. <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
  283. :current-page="currentPage" :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper"
  284. :total="deptBudgetTotal">
  285. </el-pagination>
  286. </div>
  287. </el-col>
  288. </el-row>
  289. </div>
  290. </div>
  291. <!-- @opened="opendBtn" -->
  292. <el-dialog width="70%" class="title_css" center :visible.sync="isShowPrint" title="出库检斤单" @close="closeDialog"
  293. :close-on-click-modal="false">
  294. <weightCheckPrint :tableData="inspect" ref="saveImg"></weightCheckPrint>
  295. <div style="text-align: center">
  296. <el-button type="primary" @click="closePrint">关闭</el-button>
  297. <el-button type="primary" @click="printSmall">打印小票</el-button>
  298. <el-button type="primary" @click="printBig">打印单据</el-button>
  299. </div>
  300. </el-dialog>
  301. </div>
  302. </template>
  303. <script>
  304. import {
  305. grossWeight,
  306. getbinNumber,
  307. contractListWeighing,
  308. tareAdd,
  309. tareEdit,
  310. getweighing,
  311. getweighingList,
  312. selectWarehouseSelf,
  313. delelteWeighing,
  314. newSubmit
  315. } from '@/model/outboundManagement/index'
  316. import {
  317. pullDown,
  318. addstorageputList,
  319. xialaNo,
  320. getstaff,
  321. getReceiptTaskNo,
  322. } from '@/model/warehouse/index'
  323. import axios from 'axios'
  324. import weightCheckPrint from './component/weightCheckPrint.vue'
  325. import inspectInfoPrint from './component/inspectInfoPrint.vue'
  326. import html2canvas from 'html2canvas'
  327. import WsUpload from '@/components/WsUpload'
  328. import BalanceAlert from '@/components/balanceAlert'
  329. import {
  330. EventBus
  331. } from 'base-core-lib'
  332. export default {
  333. components: {
  334. WsUpload,
  335. inspectInfoPrint,
  336. weightCheckPrint,
  337. BalanceAlert
  338. },
  339. data() {
  340. return {
  341. timer: '',
  342. refresh: 60,
  343. isShowBalance: false,
  344. isShowPrint: false,
  345. warehouseName: '',
  346. warehouseList: [],
  347. warehouseList1: [],
  348. currentPage: 1,
  349. pageSize: 50,
  350. submitAllow: false,
  351. deliveryList: [],
  352. positionInfos: [],
  353. searchKeyWord: '',
  354. paramType: '',
  355. deptBudgetTotal: 0,
  356. monitorUrl1: '',
  357. monitorUrl2: '',
  358. index: 0,
  359. inspect: {},
  360. stocks: [{
  361. warehouseName: '',
  362. weight: '',
  363. cost: ''
  364. }],
  365. id: 0,
  366. options2: [],
  367. isSelectType: false,
  368. recheck: false,
  369. disabled: true,
  370. pListTop: [],
  371. tpyeNo: 1,
  372. types: null,
  373. information: '皮重',
  374. carChange1: '手动填写',
  375. inWarehouseType: 1, //入库类型
  376. outContractNo: [],
  377. mListTop: [],
  378. searchType: '',
  379. taskNolist: [],
  380. storageType: [],
  381. fleetNameList: [],
  382. carstatus: false,
  383. carjudge: false,
  384. warehouseCount: '',
  385. warehouseCount1: 0,
  386. warehouseNo: '',
  387. statusType: '3',
  388. warehouseType: 1,
  389. weighingList: {
  390. grossWeight: 0,
  391. tare: 0,
  392. buckleMiscellaneous: 0,
  393. netWeight: 0,
  394. weight: '',
  395. tips: '',
  396. // contractNo:'',
  397. // inOutTaskNo:'',
  398. receivableWeighingFee: '',
  399. warehouseInOutDetail: {
  400. grade: '',
  401. imperfectGrain: '',
  402. impurity: '',
  403. jiaorenli: '',
  404. bulkDensity: '',
  405. mildewGrain: '',
  406. },
  407. qualityInspectionManagement: {
  408. boxNo: '暂无',
  409. boxNoOther: '暂无',
  410. titleNo: '暂无',
  411. titleNoOther: '暂无',
  412. },
  413. inOutDate: ''
  414. },
  415. carWeightInfo: {
  416. carNumber: '',
  417. type: '',
  418. weight: '',
  419. },
  420. deptBudgetList: {},
  421. multiSelector: [{
  422. name: '汽运',
  423. value: '0',
  424. },
  425. {
  426. name: '火运',
  427. value: '1',
  428. },
  429. {
  430. name: '集装箱船',
  431. value: '2',
  432. },
  433. {
  434. name: '散船',
  435. value: '3',
  436. },
  437. ],
  438. }
  439. },
  440. beforeDestroy() {
  441. if (this.timer) { //如果定时器还在运行 或者直接关闭,不用判断
  442. clearInterval(this.timer); //关闭
  443. }
  444. },
  445. mounted() {
  446. this.getNowTime()
  447. this.selectWarehouse()
  448. this.showType = this.isShow
  449. this.isShowBalance = true
  450. this.openPort()
  451. if (localStorage.getItem('houseSelfCollect_house1')) {
  452. if (localStorage.getItem('houseSelfCollect_house1').allowEdit == 1) {
  453. this.disabled = false
  454. } else {
  455. this.disabled = true
  456. }
  457. }
  458. },
  459. activated() {},
  460. methods: {
  461. addstocks(index) {
  462. this.stocks.push({
  463. warehouseName: '',
  464. cost: ''
  465. })
  466. },
  467. delstocks(index) {
  468. this.stocks.splice(index, 1)
  469. },
  470. refreshClick(type) {
  471. let that = this
  472. if (type == 1) {
  473. getweighingList({
  474. compId: localStorage.getItem('ws-pf_compId'),
  475. currentPage: that.currentPage,
  476. pageSize: that.pageSize,
  477. searchKeyWord: that.searchKeyWord,
  478. warehouseName: that.warehouseName,
  479. managementType: 3,
  480. statusType: that.statusType,
  481. // loadingstatus: 1,
  482. })
  483. .toPromise()
  484. .then((response) => {
  485. that.deliveryList = response.records
  486. that.deptBudgetTotal = response.total
  487. for (var i = 0; i < response.records.length; i++) {
  488. if (response.records[i].addressUrl != null) {
  489. if (response.records[i].addressUrl) {
  490. response.records[i].addressUrlArray =
  491. response.records[i].addressUrl.split(',')
  492. }
  493. } else {
  494. response.records[i].addressUrlArray = []
  495. }
  496. }
  497. for (var i = 0; i < response.records.length; i++) {
  498. var arr = new Array()
  499. that.addressUrls[i] = new Array()
  500. if (that.weighingList.records[i].addressUrl != null) {
  501. arr = that.weighingList.records[i].addressUrl.split(',')
  502. that.addressUrls[i] = arr
  503. }
  504. }
  505. })
  506. .catch((response) => {})
  507. } else {
  508. clearInterval(that.timer)
  509. that.refresh = 60
  510. that.timer = setInterval(function() {
  511. console.log(that.refresh)
  512. if (that.refresh == 0) {
  513. that.refresh = 60
  514. getweighingList({
  515. compId: localStorage.getItem('ws-pf_compId'),
  516. currentPage: that.currentPage,
  517. pageSize: that.pageSize,
  518. searchKeyWord: that.searchKeyWord,
  519. warehouseName: that.warehouseName,
  520. managementType: 3,
  521. statusType: that.statusType,
  522. loadingstatus: 1,
  523. })
  524. .toPromise()
  525. .then((response) => {
  526. that.deliveryList = response.records
  527. that.deptBudgetTotal = response.total
  528. for (var i = 0; i < response.records.length; i++) {
  529. if (response.records[i].addressUrl != null) {
  530. if (response.records[i].addressUrl) {
  531. response.records[i].addressUrlArray =
  532. response.records[i].addressUrl.split(',')
  533. }
  534. } else {
  535. response.records[i].addressUrlArray = []
  536. }
  537. }
  538. for (var i = 0; i < response.records.length; i++) {
  539. var arr = new Array()
  540. that.addressUrls[i] = new Array()
  541. if (that.weighingList.records[i].addressUrl != null) {
  542. arr = that.weighingList.records[i].addressUrl.split(',')
  543. that.addressUrls[i] = arr
  544. }
  545. }
  546. })
  547. .catch((response) => {})
  548. }
  549. that.refresh--
  550. }, 1000);
  551. }
  552. },
  553. statustypechangelist(status) {
  554. this.statusType = status
  555. this.getList()
  556. },
  557. getNowTime() {
  558. var now = new Date()
  559. var year = now.getFullYear() //得到年份
  560. var month = now.getMonth() //得到月份
  561. var date = now.getDate() //得到日期
  562. month = month + 1
  563. month = month.toString().padStart(2, '0')
  564. date = date.toString().padStart(2, '0')
  565. var defaultDate = `${year}-${month}-${date}`
  566. this.$set(this.weighingList, 'inOutDate', defaultDate)
  567. },
  568. record() {
  569. this.$router.push({
  570. path: 'weighingManagementrecord',
  571. query: {
  572. warehouseName: this.warehouseName
  573. },
  574. })
  575. },
  576. closePrint() {
  577. this.isShowPrint = false
  578. },
  579. printSmall() {
  580. // localStorage.setItem('inspect', JSON.stringify(this.inspect))
  581. // window.open('../../../static/weightChecknew.html?type=1')
  582. localStorage.setItem('ck_bd_printData1', JSON.stringify(this.inspect))
  583. window.open('../../../../static/outWeightPrint.html?type=1&other="true"')
  584. },
  585. printBig() {
  586. localStorage.setItem('ck_bd_printData1', JSON.stringify(this.inspect))
  587. window.open('../../../../static/outWeightPrint.html?type=2&other="true"')
  588. // window.open('../../../static/weightChecknew.html?type=2&dataList=' + JSON.stringify(this.inspect))
  589. },
  590. opendBtn() {
  591. html2canvas(this.$refs.saveImg.$el).then((canvas) => {
  592. let dataURL = canvas.toDataURL('image/png')
  593. this.imgUrl = dataURL
  594. if (this.imgUrl !== '') {
  595. let b = this.dataURLtoFile(this.imgUrl, 'printImg')
  596. let formdata = new FormData()
  597. formdata.append('file', b)
  598. axios({
  599. method: 'post',
  600. url: 'https://www.zthymaoyi.com/upload/admin',
  601. data: formdata,
  602. }).then((response) => {
  603. //编辑接口
  604. this.weighingList.pictureAddress = response.data.url
  605. console.log(this.types)
  606. if (this.types == 3) {
  607. this.weighingList.flag = 0
  608. } else if (this.types == 4) {
  609. this.weighingList.flag = 1
  610. }
  611. if (this.tpyeNo == 1) {
  612. tareEdit(this.weighingList)
  613. .toPromise()
  614. .then((response) => {
  615. this.types = ''
  616. this.weighingList = {
  617. grossWeight: 0,
  618. tare: 0,
  619. tips: '',
  620. // contractNo:'',
  621. // inOutTaskNo:'',
  622. buckleMiscellaneous: 0,
  623. netWeight: 0,
  624. receivableWeighingFee: '',
  625. warehouseInOutDetail: {
  626. grade: '',
  627. imperfectGrain: '',
  628. impurity: '',
  629. jiaorenli: '',
  630. bulkDensity: '',
  631. mildewGrain: '',
  632. },
  633. qualityInspectionManagement: {
  634. boxNo: '暂无',
  635. boxNoOther: '暂无',
  636. titleNo: '暂无',
  637. titleNoOther: '暂无',
  638. },
  639. }
  640. // this.inspect = []
  641. })
  642. } else {
  643. grossWeight(this.weighingList)
  644. .toPromise()
  645. .then((response) => {
  646. this.types = ''
  647. this.weighingList = {
  648. grossWeight: 0,
  649. tare: 0,
  650. tips: '',
  651. // contractNo:'',
  652. // inOutTaskNo:'',
  653. buckleMiscellaneous: 0,
  654. netWeight: 0,
  655. receivableWeighingFee: '',
  656. warehouseInOutDetail: {
  657. grade: '',
  658. imperfectGrain: '',
  659. impurity: '',
  660. jiaorenli: '',
  661. bulkDensity: '',
  662. mildewGrain: '',
  663. },
  664. qualityInspectionManagement: {
  665. boxNo: '暂无',
  666. boxNoOther: '暂无',
  667. titleNo: '暂无',
  668. titleNoOther: '暂无',
  669. },
  670. }
  671. // this.inspect = []
  672. })
  673. }
  674. })
  675. }
  676. })
  677. },
  678. closeDialog() {
  679. html2canvas(this.$refs.saveImg.$el).then((canvas) => {
  680. let dataURL = canvas.toDataURL('image/png')
  681. this.imgUrl = dataURL
  682. if (this.imgUrl !== '') {
  683. let b = this.dataURLtoFile(this.imgUrl, 'printImg')
  684. let formdata = new FormData()
  685. formdata.append('file', b)
  686. axios({
  687. method: 'post',
  688. url: 'https://www.zthymaoyi.com/upload/admin',
  689. data: formdata,
  690. }).then((response) => {
  691. //编辑接口
  692. this.weighingList.pictureAddress = response.data.url
  693. console.log(this.types)
  694. if (this.types == 3) {
  695. this.weighingList.flag = 0
  696. } else if (this.types == 4) {
  697. this.weighingList.flag = 1
  698. }
  699. if (this.tpyeNo == 1) {
  700. tareEdit(this.weighingList)
  701. .toPromise()
  702. .then((response) => {
  703. this.types = ''
  704. this.weighingList = {
  705. grossWeight: 0,
  706. tare: 0,
  707. tips: '',
  708. // contractNo:'',
  709. // inOutTaskNo:'',
  710. buckleMiscellaneous: 0,
  711. netWeight: 0,
  712. receivableWeighingFee: '',
  713. warehouseInOutDetail: {
  714. grade: '',
  715. imperfectGrain: '',
  716. impurity: '',
  717. jiaorenli: '',
  718. bulkDensity: '',
  719. mildewGrain: '',
  720. },
  721. qualityInspectionManagement: {
  722. boxNo: '暂无',
  723. boxNoOther: '暂无',
  724. titleNo: '暂无',
  725. titleNoOther: '暂无',
  726. },
  727. }
  728. // this.inspect = []
  729. })
  730. } else {
  731. grossWeight(this.weighingList)
  732. .toPromise()
  733. .then((response) => {
  734. this.types = ''
  735. this.weighingList = {
  736. grossWeight: 0,
  737. tare: 0,
  738. tips: '',
  739. // contractNo:'',
  740. // inOutTaskNo:'',
  741. buckleMiscellaneous: 0,
  742. netWeight: 0,
  743. receivableWeighingFee: '',
  744. warehouseInOutDetail: {
  745. grade: '',
  746. imperfectGrain: '',
  747. impurity: '',
  748. jiaorenli: '',
  749. bulkDensity: '',
  750. mildewGrain: '',
  751. },
  752. qualityInspectionManagement: {
  753. boxNo: '暂无',
  754. boxNoOther: '暂无',
  755. titleNo: '暂无',
  756. titleNoOther: '暂无',
  757. },
  758. }
  759. // this.inspect = []
  760. })
  761. }
  762. })
  763. this.dialogTableVisible = true
  764. }
  765. })
  766. },
  767. weightweight() {
  768. if (this.tpyeNo == 1) {
  769. this.weighingList.grossWeight = this.weighingList.weight
  770. } else {
  771. this.weighingList.tare = this.weighingList.weight
  772. }
  773. },
  774. handleSizeChange(val) {
  775. console.log(`每页 ${val} 条`)
  776. this.pageSize = val
  777. this.getList()
  778. },
  779. handleCurrentChange(val) {
  780. this.currentPage = val
  781. console.log(`当前页: ${val}`)
  782. this.getList()
  783. },
  784. setVal(data) {
  785. if (this.information == '毛重') {
  786. this.weighingList.grossWeight = data
  787. this.weighingList.netWeight = Number(this.weighingList.grossWeight) - Number(this.weighingList.tare)
  788. } else {
  789. this.weighingList.tare = data
  790. }
  791. },
  792. openPort() {
  793. this.$refs.weightChild.openPort()
  794. },
  795. listclick(row) {
  796. this.id = row.id
  797. getweighing({
  798. id: row.id,
  799. })
  800. .toPromise()
  801. .then((response) => {
  802. this.weighingList = response
  803. // this.weighingList.grossWeight = this.weighingList.grossWeight * 1000
  804. // this.weighingList.tare = this.weighingList.tare * 1000
  805. // this.weighingList.netWeight = this.weighingList.netWeight * 1000
  806. // this.weighingList.buckleMiscellaneous =
  807. // this.weighingList.buckleMiscellaneous * 1000
  808. this.weighingList.carNo =
  809. response.qualityInspectionManagement.carNumber
  810. this.weighingList.boxNo = response.boxNo
  811. this.weighingList.boxNoOther = response.boxNoOther
  812. this.weighingList.titleNo = response.titleNo
  813. this.weighingList.titleNoOther = response.titleNoOther
  814. this.weighingList.wingNumber =
  815. response.qualityInspectionManagement.wingNumber
  816. this.weighingList.wingNumberOther =
  817. response.qualityInspectionManagement.wingNumberOther
  818. this.weighingList.warehouseInOutDetail = {
  819. grade: '',
  820. imperfectGrain: '',
  821. impurity: '',
  822. jiaorenli: '',
  823. bulkDensity: '',
  824. mildewGrain: '',
  825. }
  826. })
  827. // if(){
  828. // }
  829. // this.deptBudgetList=row
  830. // console.log(row)
  831. },
  832. add() {
  833. this.information = '皮重'
  834. this.weighingList = {
  835. grossWeight: 0,
  836. tare: 0,
  837. tips: '',
  838. // contractNo:'',
  839. // inOutTaskNo:'',
  840. buckleMiscellaneous: 0,
  841. netWeight: 0,
  842. receivableWeighingFee: '',
  843. warehouseInOutDetail: {
  844. grade: '',
  845. imperfectGrain: '',
  846. impurity: '',
  847. jiaorenli: '',
  848. bulkDensity: '',
  849. mildewGrain: '',
  850. },
  851. qualityInspectionManagement: {
  852. boxNo: '暂无',
  853. boxNoOther: '暂无',
  854. titleNo: '暂无',
  855. titleNoOther: '暂无',
  856. },
  857. }
  858. },
  859. deletelist() {
  860. if (this.id) {
  861. delelteWeighing({
  862. id: this.id,
  863. })
  864. .toPromise()
  865. .then((response) => {
  866. this.$message({
  867. message: '删除成功!',
  868. type: 'success',
  869. })
  870. this.id = ''
  871. this.weighingList = {
  872. grossWeight: 0,
  873. tare: 0,
  874. tips: '',
  875. // contractNo:'',
  876. // inOutTaskNo:'',
  877. buckleMiscellaneous: 0,
  878. netWeight: 0,
  879. receivableWeighingFee: '',
  880. warehouseInOutDetail: {
  881. grade: '',
  882. imperfectGrain: '',
  883. impurity: '',
  884. jiaorenli: '',
  885. bulkDensity: '',
  886. mildewGrain: '',
  887. },
  888. qualityInspectionManagement: {
  889. boxNo: '暂无',
  890. boxNoOther: '暂无',
  891. titleNo: '暂无',
  892. titleNoOther: '暂无',
  893. },
  894. }
  895. this.getList()
  896. })
  897. }
  898. },
  899. binNumberchange(e) {
  900. for (let i = 0; i < this.positionInfos.length; i++) {
  901. if (this.positionInfos[i].binNumber == e) {
  902. this.weighingList.positionId = this.positionInfos[i].id
  903. }
  904. }
  905. },
  906. print() {
  907. // if(this.tpyeNo==2){
  908. // if(this.weighingList.qualityInspectionManagement.status != '已质检'){
  909. // this.$message.error("该条信息未质检!")
  910. // return
  911. // }
  912. // }
  913. this.weighingList.carNumber = this.weighingList.carNo
  914. if (this.types == 1 || this.types == 2) {
  915. if (!this.weighingList.contractNo) {
  916. this.$message({
  917. message: '合同编号不能为空',
  918. type: 'warning',
  919. })
  920. return
  921. }
  922. if (!this.weighingList.binNumber) {
  923. this.$message({
  924. message: '仓位号不能为空',
  925. type: 'warning',
  926. })
  927. return
  928. }
  929. if (!this.weighingList.storageNumber) {
  930. this.$message({
  931. message: '囤位号不能为空',
  932. type: 'warning',
  933. })
  934. return
  935. }
  936. if (
  937. this.weighingList.storageNumber.length < 1 ||
  938. this.weighingList.storageNumber.length > 10
  939. ) {
  940. this.$message({
  941. message: '囤位号不超过10个字符!',
  942. type: 'warning',
  943. })
  944. return
  945. }
  946. if (!this.weighingList.carNumber) {
  947. this.$message({
  948. message: '车牌号不能为空',
  949. type: 'warning',
  950. })
  951. return
  952. }
  953. if (this.weighingList.carNumber.length != 7) {
  954. this.$message({
  955. message: '车牌号输入错误',
  956. type: 'warning',
  957. })
  958. return
  959. }
  960. if (!this.weighingList.inOutType) {
  961. this.$message({
  962. message: '出库类型不能为空',
  963. type: 'warning',
  964. })
  965. return
  966. }
  967. }
  968. if (!this.weighingList.binNumber) {
  969. this.$message({
  970. message: '仓位号不能为空',
  971. type: 'warning',
  972. })
  973. return
  974. }
  975. if (this.tpyeNo == 1) {
  976. if (!this.weighingList.tare) {
  977. this.$message({
  978. message: '皮重不能为空',
  979. type: 'warning',
  980. })
  981. return
  982. }
  983. if (
  984. isNaN(this.weighingList.tare) ||
  985. (String(this.weighingList.tare).indexOf('.') != -1 &&
  986. String(this.weighingList.tare).length -
  987. (String(this.weighingList.tare).indexOf('.') + 1) >
  988. 1) ||
  989. this.weighingList.tare < 1 ||
  990. this.weighingList.tare > 100000
  991. ) {
  992. this.$message({
  993. message: '皮重输入错误!',
  994. type: 'warning',
  995. })
  996. return
  997. }
  998. }
  999. if (this.types == 2) {
  1000. if (!this.weighingList.grossWeight) {
  1001. this.$message({
  1002. message: '毛重不能为空',
  1003. type: 'warning',
  1004. })
  1005. return
  1006. }
  1007. if (
  1008. isNaN(this.weighingList.grossWeight) ||
  1009. (String(this.weighingList.grossWeight).indexOf('.') != -1 &&
  1010. String(this.weighingList.grossWeight).length -
  1011. (String(this.weighingList.grossWeight).indexOf('.') + 1) >
  1012. 1) ||
  1013. this.weighingList.grossWeight < 1 ||
  1014. this.weighingList.grossWeight > 100000
  1015. ) {
  1016. this.$message({
  1017. message: '毛重输入错误!',
  1018. type: 'warning',
  1019. })
  1020. return
  1021. }
  1022. if (this.weighingList.netWeight < 0) {
  1023. this.$message({
  1024. message: '净重不能为负',
  1025. type: 'warning',
  1026. })
  1027. return
  1028. }
  1029. }
  1030. this.weighingList.compId = localStorage.getItem('ws-pf_compId')
  1031. this.weighingList.warehouseName = this.warehouseName
  1032. this.weighingList.warehouseType = this.warehouseTyp
  1033. this.$confirm('确定保存检斤信息?', '提示', {
  1034. confirmButtonText: '确定',
  1035. cancelButtonText: '取消',
  1036. type: 'warning',
  1037. })
  1038. .then(() => {
  1039. this.weighingList.inOutFlag = 1
  1040. this.weighingList.statusFlag = 3
  1041. // if (this.weighingList.grossWeight) {
  1042. // this.weighingList.grossWeight = this.weighingList.grossWeight / 1000
  1043. // }
  1044. // if (this.weighingList.netWeight) {
  1045. // this.weighingList.netWeight = this.weighingList.netWeight / 1000
  1046. // }
  1047. // this.weighingList.tare = this.weighingList.tare / 1000
  1048. // if (this.weighingList.buckleMiscellaneous) {
  1049. // this.weighingList.buckleMiscellaneous = this.weighingList.buckleMiscellaneous / 1000
  1050. // }
  1051. if (this.tpyeNo == 1) {
  1052. // this.weighingList.serviceManagementType=2
  1053. this.weighingList.statusFlag = 1
  1054. this.weighingList.relationId = this.relationId
  1055. this.weighingList.warehouseId = this.warehouseId
  1056. this.weighingList.baseId = this.warehouseId
  1057. this.weighingList.skinInspector =
  1058. localStorage.getItem('ws-pf_staffName')
  1059. if (this.weighingList.id) { //修改皮重
  1060. var weighingList1 = JSON.parse(JSON.stringify(this.weighingList)) //为了解除双向绑定问题,不影响this.weighingList的数据
  1061. weighingList1.id = this.weighingList.warehouseInOutId
  1062. weighingList1.warehouseInOutDetail.id = this.weighingList.inOutDetailId
  1063. weighingList1.weighingManagement = this.weighingList
  1064. if (weighingList1.tare) {//为了解决出入库与检斤单位不一致(出入库单位吨,检斤公斤)
  1065. weighingList1.tare = weighingList1.tare / 1000
  1066. }
  1067. if (weighingList1.netWeight) {
  1068. weighingList1.netWeight = weighingList1.netWeight / 1000
  1069. }
  1070. newSubmit(weighingList1)
  1071. .toPromise()
  1072. .then((response) => {
  1073. getweighing({
  1074. id: this.weighingList.id
  1075. })
  1076. .toPromise().then((response) => {
  1077. if (this.reader) {
  1078. this.reader.cancel()
  1079. }
  1080. this.$notify({
  1081. title: '成功',
  1082. message: '提交成功',
  1083. type: 'success',
  1084. })
  1085. this.getList()
  1086. this.weighingList = response
  1087. // this.warehouseCount = Number(this.warehouseCount) + 1
  1088. // this.warehouseCount1 = Number(this.warehouseCount1) + 1
  1089. this.inspect = JSON.parse(
  1090. JSON.stringify(this.weighingList)
  1091. )
  1092. this.isShowPrint = true
  1093. this.weighingList = {
  1094. grossWeight: 0,
  1095. tare: 0,
  1096. tips: '',
  1097. // contractNo:'',
  1098. // inOutTaskNo:'',
  1099. buckleMiscellaneous: 0,
  1100. netWeight: 0,
  1101. receivableWeighingFee: '',
  1102. warehouseInOutDetail: {
  1103. grade: '',
  1104. imperfectGrain: '',
  1105. impurity: '',
  1106. jiaorenli: '',
  1107. bulkDensity: '',
  1108. mildewGrain: '',
  1109. },
  1110. qualityInspectionManagement: {
  1111. boxNo: '暂无',
  1112. boxNoOther: '暂无',
  1113. titleNo: '暂无',
  1114. titleNoOther: '暂无',
  1115. },
  1116. }
  1117. })
  1118. })
  1119. } else { //新增皮检信息
  1120. this.weighingList.relationId = this.relationId
  1121. this.weighingList.warehouseId = this.warehouseId
  1122. this.weighingList.baseId = this.warehouseId
  1123. this.weighingList.warehouseNo = this.warehouseNo
  1124. var weighingList1 = JSON.parse(JSON.stringify(this.weighingList)) //为了解除双向绑定问题,不影响this.weighingList的数据
  1125. weighingList1.id = this.weighingList.warehouseInOutId
  1126. weighingList1.warehouseInOutDetail.id = this.weighingList.inOutDetailId
  1127. weighingList1.weighingManagement = this.weighingList
  1128. if (weighingList1.tare) {//为了解决出入库与检斤单位不一致(出入库单位吨,检斤公斤)
  1129. weighingList1.tare = weighingList1.tare / 1000
  1130. }
  1131. if (weighingList1.netWeight) {
  1132. weighingList1.netWeight = weighingList1.netWeight / 1000
  1133. }
  1134. newSubmit(weighingList1)
  1135. .toPromise()
  1136. .then((response) => {
  1137. getweighing({
  1138. id: response
  1139. })
  1140. .toPromise().then((response) => {
  1141. if (this.reader) {
  1142. this.reader.cancel()
  1143. }
  1144. this.$notify({
  1145. title: '成功',
  1146. message: '提交成功',
  1147. type: 'success',
  1148. })
  1149. this.getList()
  1150. this.weighingList = response
  1151. // this.warehouseCount = Number(this.warehouseCount) + 1
  1152. // this.warehouseCount1 = Number(this.warehouseCount1) + 1
  1153. this.inspect = JSON.parse(
  1154. JSON.stringify(this.weighingList)
  1155. )
  1156. this.isShowPrint = true
  1157. this.weighingList = {
  1158. grossWeight: 0,
  1159. tare: 0,
  1160. tips: '',
  1161. // contractNo:'',
  1162. // inOutTaskNo:'',
  1163. buckleMiscellaneous: 0,
  1164. netWeight: 0,
  1165. receivableWeighingFee: '',
  1166. warehouseInOutDetail: {
  1167. grade: '',
  1168. imperfectGrain: '',
  1169. impurity: '',
  1170. jiaorenli: '',
  1171. bulkDensity: '',
  1172. mildewGrain: '',
  1173. },
  1174. qualityInspectionManagement: {
  1175. boxNo: '暂无',
  1176. boxNoOther: '暂无',
  1177. titleNo: '暂无',
  1178. titleNoOther: '暂无',
  1179. },
  1180. }
  1181. })
  1182. })
  1183. }
  1184. } else if (this.tpyeNo == 2) {
  1185. this.weighingList.secretaryWeigher =
  1186. localStorage.getItem('ws-pf_staffName')
  1187. this.weighingList.warehouseId = this.warehouseId
  1188. this.weighingList.baseId = this.warehouseId
  1189. var weighingList1 = JSON.parse(JSON.stringify(this.weighingList)) //为了解除双向绑定问题,不影响this.weighingList的数据
  1190. weighingList1.id = this.weighingList.warehouseInOutId
  1191. weighingList1.warehouseInOutDetail.id = this.weighingList.inOutDetailId
  1192. weighingList1.weighingManagement = this.weighingList
  1193. if (weighingList1.grossWeight) {//为了解决出入库与检斤单位不一致(出入库单位吨,检斤公斤)
  1194. weighingList1.grossWeight = weighingList1.grossWeight / 1000
  1195. }
  1196. if (weighingList1.netWeight) {
  1197. weighingList1.netWeight = weighingList1.netWeight / 1000
  1198. }
  1199. if (weighingList1.tare) {
  1200. weighingList1.tare = weighingList1.tare / 1000
  1201. }
  1202. newSubmit(weighingList1)
  1203. .toPromise()
  1204. .then((response) => {
  1205. getweighing({
  1206. id: response
  1207. })
  1208. .toPromise().then((response) => {
  1209. this.weighingList = response
  1210. this.inspect = JSON.parse(
  1211. JSON.stringify(this.weighingList)
  1212. )
  1213. this.isShowPrint = true
  1214. })
  1215. if (this.reader) {
  1216. this.reader.cancel()
  1217. }
  1218. // this.$notify.success({
  1219. // title: '成功',
  1220. // message: '提交成功',
  1221. // })
  1222. this.$notify({
  1223. title: '成功',
  1224. message: '提交成功',
  1225. type: 'success',
  1226. })
  1227. this.inspect = JSON.parse(JSON.stringify(this.weighingList))
  1228. this.isShowPrint = true
  1229. this.weighingList = {
  1230. grossWeight: 0,
  1231. selfLoading: 0,
  1232. tare: 0,
  1233. tips: '',
  1234. // contractNo:'',
  1235. // inOutTaskNo:'',
  1236. buckleMiscellaneous: 0,
  1237. netWeight: 0,
  1238. receivableWeighingFee: '',
  1239. warehouseInOutDetail: {
  1240. grade: '',
  1241. imperfectGrain: '',
  1242. impurity: '',
  1243. jiaorenli: '',
  1244. bulkDensity: '',
  1245. mildewGrain: '',
  1246. },
  1247. qualityInspectionManagement: {
  1248. boxNo: '暂无',
  1249. boxNoOther: '暂无',
  1250. titleNo: '暂无',
  1251. titleNoOther: '暂无',
  1252. },
  1253. }
  1254. this.getList()
  1255. })
  1256. // addstorageputList(weighingList1)
  1257. // .toPromise()
  1258. // .then((response) => {
  1259. // this.weighingList.grossWeight =
  1260. // this.weighingList.grossWeight * 1000
  1261. // this.weighingList.tare = this.weighingList.tare * 1000
  1262. // this.weighingList.netWeight =
  1263. // this.weighingList.netWeight * 1000
  1264. // this.weighingList.buckleMiscellaneous =
  1265. // this.weighingList.buckleMiscellaneous * 1000
  1266. // this.weighingList.warehouseInOutId = response
  1267. // grossWeight(this.weighingList)
  1268. // .toPromise()
  1269. // .then((response) => {
  1270. // getweighing({
  1271. // id: response
  1272. // })
  1273. // .toPromise()
  1274. // .then((response) => {
  1275. // this.weighingList = response
  1276. // this.inspect = JSON.parse(
  1277. // JSON.stringify(this.weighingList)
  1278. // )
  1279. // this.isShowPrint = true
  1280. // })
  1281. // if (this.reader) {
  1282. // this.reader.cancel()
  1283. // }
  1284. // // this.$notify.success({
  1285. // // title: '成功',
  1286. // // message: '提交成功',
  1287. // // })
  1288. // this.$notify({
  1289. // title: '成功',
  1290. // message: '提交成功',
  1291. // type: 'success',
  1292. // })
  1293. // this.inspect = JSON.parse(JSON.stringify(this.weighingList))
  1294. // this.isShowPrint = true
  1295. // this.weighingList = {
  1296. // grossWeight: 0,
  1297. // selfLoading: 0,
  1298. // tare: 0,
  1299. // tips: '',
  1300. // // contractNo:'',
  1301. // // inOutTaskNo:'',
  1302. // buckleMiscellaneous: 0,
  1303. // netWeight: 0,
  1304. // receivableWeighingFee: '',
  1305. // warehouseInOutDetail: {
  1306. // grade: '',
  1307. // imperfectGrain: '',
  1308. // impurity: '',
  1309. // jiaorenli: '',
  1310. // bulkDensity: '',
  1311. // mildewGrain: '',
  1312. // },
  1313. // qualityInspectionManagement: {
  1314. // boxNo: '暂无',
  1315. // boxNoOther: '暂无',
  1316. // titleNo: '暂无',
  1317. // titleNoOther: '暂无',
  1318. // },
  1319. // }
  1320. // this.getList()
  1321. // })
  1322. // })
  1323. // .catch((response) => {})
  1324. }
  1325. })
  1326. .catch(() => {
  1327. return false
  1328. })
  1329. },
  1330. carNoTypeChange() {
  1331. this.carjudge = !this.carjudge
  1332. if (this.carjudge) {
  1333. this.weighingList.selfLoading = '1'
  1334. this.carChange1 = '识别下拉'
  1335. } else {
  1336. this.weighingList.selfLoading = '0'
  1337. this.carChange1 = '手动填写'
  1338. }
  1339. },
  1340. tabClick(val) {
  1341. this.weighingList = {
  1342. grossWeight: 0,
  1343. tare: 0,
  1344. tips: '',
  1345. buckleMiscellaneous: 0,
  1346. netWeight: 0,
  1347. receivableWeighingFee: '',
  1348. warehouseInOutDetail: {
  1349. grade: '',
  1350. imperfectGrain: '',
  1351. impurity: '',
  1352. jiaorenli: '',
  1353. bulkDensity: '',
  1354. mildewGrain: '',
  1355. },
  1356. qualityInspectionManagement: {
  1357. boxNo: '暂无',
  1358. boxNoOther: '暂无',
  1359. titleNo: '暂无',
  1360. titleNoOther: '暂无',
  1361. },
  1362. }
  1363. this.index = val
  1364. // this.disabled=true
  1365. if (val == 0) {
  1366. this.statusType = '3'
  1367. this.information = '皮重'
  1368. this.tpyeNo = '1'
  1369. } else {
  1370. this.statusType = 3
  1371. this.tpyeNo = '2'
  1372. this.information = '毛重'
  1373. }
  1374. this.getList()
  1375. },
  1376. warehouseNameChange(e) {
  1377. for (let i = 0; i < this.warehouseList.length; i++) {
  1378. if (this.warehouseList[i].value == e) {
  1379. this.warehouseId = this.warehouseList[i].warehouseId
  1380. // this.warehouseCount = this.warehouseList[i].ouCount
  1381. }
  1382. }
  1383. for (let i = 0; i < this.warehouseList1.length; i++) {
  1384. if (this.warehouseList1[i].warehouseName == e) {
  1385. localStorage.setItem(
  1386. 'houseSelfCollect_house1',
  1387. JSON.stringify({
  1388. No: this.warehouseList1[i].commonWarehouseNo,
  1389. allowEdit: this.warehouseList1[i].allowEdit,
  1390. value: this.warehouseList1[i].warehouseName,
  1391. count: this.warehouseList1[i].count,
  1392. warehouseId: this.warehouseList1[i].id,
  1393. })
  1394. )
  1395. if (this.warehouseList1[i].allowEdit == 1) {
  1396. this.disabled = false
  1397. } else {
  1398. this.disabled = true
  1399. }
  1400. this.positionInfos = this.warehouseList1[i].positionInfos
  1401. this.warehouseCount = this.warehouseList1[i].outCount
  1402. this.warehouseNo = this.warehouseList1[i].commonWarehouseNo
  1403. this.warehouseType = this.warehouseList1[i].warehouseType
  1404. }
  1405. }
  1406. this.getList()
  1407. this.weighingList = {
  1408. grossWeight: 0,
  1409. selfLoading: 0,
  1410. tare: 0,
  1411. tips: '',
  1412. // contractNo:'',
  1413. // inOutTaskNo:'',
  1414. buckleMiscellaneous: 0,
  1415. netWeight: 0,
  1416. receivableWeighingFee: '',
  1417. warehouseInOutDetail: {
  1418. grade: '',
  1419. imperfectGrain: '',
  1420. impurity: '',
  1421. jiaorenli: '',
  1422. bulkDensity: '',
  1423. mildewGrain: '',
  1424. },
  1425. qualityInspectionManagement: {
  1426. boxNo: '暂无',
  1427. boxNoOther: '暂无',
  1428. titleNo: '暂无',
  1429. titleNoOther: '暂无',
  1430. },
  1431. }
  1432. },
  1433. // async openPort() {
  1434. // console.log('openPort', navigator)
  1435. // if ('serial' in navigator) {
  1436. // // if (!this.$store.state.app.reader) {
  1437. // // The Web Serial API is supported.
  1438. // console.log('the Web Serial API is supported.')
  1439. // console.log(this.param)
  1440. // const port = await navigator.serial.requestPort()
  1441. // await port.open({
  1442. // baudRate: this.param,
  1443. // }) // set baud rate
  1444. // this.reader = port.readable.getReader()
  1445. // console.log('beforeReader', port)
  1446. // console.log('beforeReader', this.reader)
  1447. // this.$store.dispatch('app/setReader', this.reader)
  1448. // // } else {
  1449. // // console.log('afterport', this.$store.state.app.reader)
  1450. // // this.reader = this.$store.state.app.reader
  1451. // // }
  1452. // // 监听来自串行设备的数据
  1453. // while (true) {
  1454. // const {
  1455. // value,
  1456. // done
  1457. // } = await this.reader.read()
  1458. // // console.log("value",value);
  1459. // if (done) {
  1460. // // 允许稍后关闭串口。
  1461. // this.reader.releaseLock()
  1462. // break
  1463. // }
  1464. // var result = ''
  1465. // //2。获取16进制字符串
  1466. // // var receData = HexConvert.ByteToString(value);
  1467. // // console.log("receData",receData);
  1468. // var flag = false
  1469. // // for(var i=0;i<value.length;i++){
  1470. // // var tmp = String.fromCharCode(value[i])
  1471. // // if(tmp == '+'){
  1472. // // flag = true
  1473. // // }
  1474. // // if(flag && result.length <6 && tmp != '+'){
  1475. // // result += tmp
  1476. // // }
  1477. // // }
  1478. // // if(this.tpyeNo != 2){
  1479. // // this.weighingList.grossWeight = parseInt(result)
  1480. // // }
  1481. // // else{
  1482. // // this.weighingList.tare = parseInt(result)
  1483. // // }
  1484. // if (
  1485. // (this.warehouseName &&
  1486. // (this.warehouseName == '山东诸城迈饶库' ||
  1487. // this.warehouseName == '克东千红库')) ||
  1488. // this.warehouseName == '鲅鱼圈祥腾库' ||
  1489. // this.warehouseName == '哈尔滨依兰库' ||
  1490. // this.warehouseName == '龙江金信库'
  1491. // ) {
  1492. // for (var i = 0; i < value.length; i++) {
  1493. // var tmp = String.fromCharCode(value[i])
  1494. // if (tmp == '+') {
  1495. // flag = true
  1496. // }
  1497. // if (flag && result.length < 6 && tmp != '+') {
  1498. // result += tmp
  1499. // }
  1500. // }
  1501. // if (this.tpyeNo != 2) {
  1502. // if (parseInt(result) || parseInt(result) == 0) {
  1503. // this.weighingList.weight = parseInt(result)
  1504. // }
  1505. // } else {
  1506. // if (parseInt(result) || parseInt(result) == 0) {
  1507. // this.weighingList.weight = parseInt(result)
  1508. // }
  1509. // }
  1510. // } else if (
  1511. // this.warehouseName &&
  1512. // (this.warehouseName == '顺诚粮库' ||
  1513. // this.warehouseName == '鲅鱼圈金信库')
  1514. // ) {
  1515. // for (var i = value.length - 1; i >= 0; i--) {
  1516. // var tmp = String.fromCharCode(value[i])
  1517. // console.log(tmp)
  1518. // if (String.fromCharCode(value[0]) == '.') {
  1519. // flag = true
  1520. // }
  1521. // if (flag && result.length < 9 && tmp != '=' && tmp != '.') {
  1522. // result += tmp
  1523. // }
  1524. // }
  1525. // if (this.tpyeNo != 2) {
  1526. // if (parseInt(result) || parseInt(result) == 0) {
  1527. // this.weighingList.weight = parseInt(result)
  1528. // }
  1529. // } else {
  1530. // if (parseInt(result) || parseInt(result) == 0) {
  1531. // this.weighingList.weight = parseInt(result)
  1532. // }
  1533. // }
  1534. // } else {
  1535. // for (var i = 0; i < value.length; i++) {
  1536. // var tmp = String.fromCharCode(value[i])
  1537. // if (value[0] != 49 && value[0] != 2) {
  1538. // break
  1539. // }
  1540. // if (tmp == String.fromCharCode(32)) {
  1541. // flag = true
  1542. // }
  1543. // if (flag && result.length < 7 && tmp != String.fromCharCode(32)) {
  1544. // // if(i-1 >=0 &&tmp == String.fromCharCode(48) && value[i-1] == 32){
  1545. // // continue
  1546. // // }
  1547. // // if(i-2 >=0 &&tmp == String.fromCharCode(48) && value[i-2] == 32){
  1548. // // continue
  1549. // // }
  1550. // result += tmp
  1551. // }
  1552. // }
  1553. // if (this.tpyeNo != 2) {
  1554. // if (parseInt(result) || parseInt(result) == 0) {
  1555. // this.weighingList.weight = parseInt(result) * 100
  1556. // }
  1557. // } else {
  1558. // if (parseInt(result) || parseInt(result) == 0) {
  1559. // this.weighingList.weight = parseInt(result) * 100
  1560. // }
  1561. // }
  1562. // }
  1563. // // setTimeout(1000)
  1564. // // value 是一个 Uint8Array
  1565. // }
  1566. // await port.close()
  1567. // } else {
  1568. // console.log('the Web Serial API is not supported.', navigator)
  1569. // }
  1570. // },
  1571. find() {
  1572. this.getList()
  1573. },
  1574. calculation() {
  1575. if (this.weighingList.grossWeight && this.weighingList.tare) {
  1576. let count = 0
  1577. this.weighingList.netWeight =
  1578. this.weighingList.grossWeight -
  1579. this.weighingList.tare -
  1580. Number(
  1581. this.weighingList.buckleMiscellaneous ?
  1582. this.weighingList.buckleMiscellaneous :
  1583. 0
  1584. )
  1585. }
  1586. },
  1587. carChange(e) {
  1588. for (let i = 0; i < this.tranCarInfoList.length; i++) {
  1589. if (this.tranCarInfoList[i].carNo == this.weighingList.carNo) {
  1590. this.weighingList.carNumber = this.tranCarInfoList[i].carNo
  1591. this.weighingList.tranCarNo = this.tranCarInfoList[i].tranCarNo
  1592. this.weighingList.carId = this.tranCarInfoList[i].id
  1593. }
  1594. }
  1595. },
  1596. // 获取当前年月日
  1597. getTime() {
  1598. var date = new Date()
  1599. var mouth = date.getMonth() + 1
  1600. var day = date.getDate()
  1601. if (mouth < 10) {
  1602. mouth = '0' + mouth
  1603. }
  1604. if (day < 10) {
  1605. day = '0' + day
  1606. }
  1607. return date.getFullYear() + mouth + day
  1608. },
  1609. contractNoChange(e) {
  1610. this.warehouseCount = this.warehouseCount1
  1611. for (let i = 0; i < this.taskNolist.length; i++) {
  1612. if (this.taskNolist[i].inOutTaskNo == e) {
  1613. // this.weighingList.number = this.taskNolist[i].inOutTaskNo
  1614. // this.warehouseCount = '000' + (Number(this.warehouseCount) + 1)
  1615. this.weighingList.numberLetter = 'XSCK'
  1616. this.weighingList.goodsName = this.taskNolist[i].goodsName
  1617. this.weighingList.tips = this.taskNolist[i].businessDescribe
  1618. var data = this.taskNolist[i]
  1619. if (this.taskNolist[i].contractNo) {
  1620. // console.log(this.taskNolist[i])
  1621. this.weighingList.contractNo = this.taskNolist[i].contractNo
  1622. } else {
  1623. this.weighingList.contractNo = this.taskNolist[i].moveTaskNo
  1624. }
  1625. }
  1626. }
  1627. if (!data) return
  1628. for (var i = 0; i < this.outContractNo.length; i++) {
  1629. if (this.outContractNo[i].contractNo == this.weighingList.contractNo) {
  1630. this.weighingList.goodsName = this.outContractNo[i].goodsName
  1631. if (this.weighingList.goodsName == '玉米(潮粮)') {
  1632. this.weighingList.type = '潮粮'
  1633. } else {
  1634. this.weighingList.type = '干粮'
  1635. }
  1636. this.weighingList.goodsNameKey = this.outContractNo[i].goodsNameKey
  1637. this.weighingList.grade = this.outContractNo[i].grade
  1638. this.weighingList.inOutType = this.outContractNo[i].inOutType
  1639. if (this.outContractNo[i].inOutType == '销售出库') {
  1640. this.warehouseCount = '000' + (Number(this.warehouseCount) + 1)
  1641. this.weighingList.numberLetter = 'XSCK'
  1642. this.weighingList.buyer = this.outContractNo[i].buyer
  1643. this.weighingList.seller = localStorage.getItem('ws-pf_compName')
  1644. if (!this.outContractNo[i].unitContractPrice) {
  1645. this.weighingList.tips = '买方' + this.outContractNo[i].buyer
  1646. } else {
  1647. this.weighingList.tips =
  1648. '买方' +
  1649. this.outContractNo[i].buyer +
  1650. '( ' +
  1651. this.outContractNo[i].unitContractPrice +
  1652. '元/吨)'
  1653. }
  1654. this.weighingList.inOutTypeKey = 1
  1655. } else if (this.outContractNo[i].inOutType == '移库出库') {
  1656. this.warehouseCount = '000' + (Number(this.warehouseCount) + 1)
  1657. this.weighingList.numberLetter = 'YKCK'
  1658. this.weighingList.buyer = this.outContractNo[i].receiveWarehouse
  1659. this.weighingList.seller = this.outContractNo[i].sendWarehouse
  1660. this.weighingList.goodsName = data.goodsName
  1661. this.weighingList.goodsNameKey = data.goodsNameKey
  1662. this.weighingList.grade = data.grade
  1663. if (this.outContractNo[i].unitContractPrice) {
  1664. this.weighingList.tips =
  1665. '入货库' +
  1666. data.receiveWarehouse +
  1667. '( ' +
  1668. this.outContractNo[i].unitContractPrice +
  1669. '元/吨)'
  1670. } else {
  1671. this.weighingList.tips = '入货库' + data.receiveWarehouse
  1672. }
  1673. this.weighingList.inOutTypeKey = 3
  1674. } else if (this.outContractNo[i].inOutType == '暂存入库') {
  1675. this.weighingList.inOutTypeKey = 4
  1676. } else if (this.outContractNo[i].inOutType == '贸易服务出库') {
  1677. this.weighingList.inOutTypeKey = 5
  1678. } else if (this.outContractNo[i].inOutType == '采购出库') {
  1679. this.weighingList.inOutTypeKey = 6
  1680. }
  1681. if (this.outContractNo[i].deliverType == '1') {
  1682. this.carstatus = true
  1683. } else {
  1684. this.carstatus = false
  1685. }
  1686. if (this.outContractNo[i].tranCarInfoList) {
  1687. this.options2 = this.outContractNo[i].tranCarInfoList
  1688. this.tranCarInfoList = this.outContractNo[i].tranCarInfoList
  1689. this.carstatus = true
  1690. }
  1691. if (this.outContractNo[i].tranCarInfoList1) {
  1692. this.fleetNameList = this.outContractNo[i].tranCarInfoList1
  1693. }
  1694. }
  1695. }
  1696. },
  1697. selectWarehouse() {
  1698. selectWarehouseSelf({
  1699. compId: localStorage.getItem('ws-pf_compId'),
  1700. })
  1701. .toPromise()
  1702. .then((response) => {
  1703. this.warehouseList = []
  1704. for (let i = 0; i < response.length; i++) {
  1705. this.warehouseList.push({
  1706. value: response[i].warehouseName,
  1707. warehouseId: response[i].id,
  1708. })
  1709. }
  1710. let _wareHouse = localStorage.getItem('houseSelfCollect_house1')
  1711. _wareHouse = JSON.parse(_wareHouse)
  1712. for (let i = 0; i < response.length; i++) {
  1713. if (_wareHouse && response[i].warehouseName == _wareHouse.value) {
  1714. this.warehouseName = response[i].warehouseName
  1715. this.warehouseId = response[i].id
  1716. this.positionInfos = response[i].positionInfos
  1717. this.warehouseCount = response[i].outCount
  1718. this.warehouseCount1 = response[i].outCount
  1719. this.warehouseNo = response[i].commonWarehouseNo
  1720. this.warehouseType = response[i].warehouseType
  1721. if (response[i].allowEdit == 1) {
  1722. this.disabled = false
  1723. } else {
  1724. this.disabled = true
  1725. }
  1726. }
  1727. if (!_wareHouse) {
  1728. this.warehouseName = this.warehouseList[0].value
  1729. this.warehouseId = this.warehouseList[0].warehouseId
  1730. this.positionInfos = response[0].positionInfos
  1731. this.warehouseCount = response[0].outCount
  1732. this.warehouseCount1 = response[0].outCount
  1733. this.warehouseNo = response[0].commonWarehouseNo
  1734. this.warehouseType = response[0].warehouseType
  1735. if (response[0].allowEdit == 1) {
  1736. this.disabled = false
  1737. } else {
  1738. this.disabled = true
  1739. }
  1740. console.log()
  1741. }
  1742. }
  1743. this.warehouseList1 = response
  1744. this.deptBudgetList.warehouseName = this.warehouseName
  1745. this.getList()
  1746. })
  1747. },
  1748. getList() {
  1749. // pullDown({
  1750. // constId: 'CON6',
  1751. // })
  1752. // .toPromise()
  1753. // .then((response) => {
  1754. // this.storageType = response
  1755. // })
  1756. getReceiptTaskNo({
  1757. flag: 1,
  1758. warehouseName: this.warehouseName,
  1759. agentKey: localStorage.getItem('ws-pf_userId'),
  1760. })
  1761. .toPromise()
  1762. .then((response) => {
  1763. this.taskNolist = response
  1764. })
  1765. //合同编号
  1766. xialaNo({
  1767. compId: localStorage.getItem('ws-pf_compId'),
  1768. flag: 5,
  1769. })
  1770. .toPromise()
  1771. .then((response) => {
  1772. this.outContractNo = response
  1773. })
  1774. // this.refreshClick(1)
  1775. getweighingList({
  1776. compId: localStorage.getItem('ws-pf_compId'),
  1777. currentPage: this.currentPage,
  1778. pageSize: this.pageSize,
  1779. searchKeyWord: this.searchKeyWord,
  1780. warehouseName: this.warehouseName,
  1781. managementType: 3,
  1782. statusType: this.statusType,
  1783. })
  1784. .toPromise()
  1785. .then((response) => {
  1786. this.deliveryList = response.records
  1787. this.deptBudgetTotal = response.total
  1788. for (var i = 0; i < response.records.length; i++) {
  1789. if (response.records[i].addressUrl != null) {
  1790. if (response.records[i].addressUrl) {
  1791. response.records[i].addressUrlArray =
  1792. response.records[i].addressUrl.split(',')
  1793. }
  1794. } else {
  1795. response.records[i].addressUrlArray = []
  1796. }
  1797. }
  1798. for (var i = 0; i < response.records.length; i++) {
  1799. var arr = new Array()
  1800. this.addressUrls[i] = new Array()
  1801. if (this.weighingList.records[i].addressUrl != null) {
  1802. arr = this.weighingList.records[i].addressUrl.split(',')
  1803. this.addressUrls[i] = arr
  1804. }
  1805. }
  1806. })
  1807. .catch((response) => {})
  1808. },
  1809. },
  1810. }
  1811. </script>
  1812. <style lang="scss" scoped>
  1813. .center {
  1814. background: #fff;
  1815. }
  1816. .size_css {
  1817. width: 540px;
  1818. min-width: 540px;
  1819. overflow-x: scroll;
  1820. position: relative;
  1821. }
  1822. .ws-info-table {
  1823. border: none;
  1824. }
  1825. .base_header_layout {
  1826. padding: 10px;
  1827. margin-bottom: 10px;
  1828. }
  1829. .ws-info-table .el-form-item {
  1830. width: 50%;
  1831. border: none;
  1832. }
  1833. .formItem {
  1834. width: 100%;
  1835. display: inline;
  1836. }
  1837. .ws-info-table {
  1838. border: none;
  1839. }
  1840. .ws-info-table .el-form-item {
  1841. width: 100%;
  1842. border: none;
  1843. }
  1844. /deep/.ws-info-table .el-form-item .el-form-item__label {
  1845. width: 30%;
  1846. text-align: center;
  1847. background: #ffffff;
  1848. color: #8890b1;
  1849. }
  1850. /deep/.ws-info-table .el-form-item .el-form-item__content {
  1851. border: none;
  1852. }
  1853. /deep/.el-textarea__inner {
  1854. width: 92%;
  1855. }
  1856. /deep/.ws-info-table .el-form-item.rememo .el-form-item__content {
  1857. height: 76px;
  1858. }
  1859. .title {
  1860. font-size: 16px;
  1861. font-weight: 600;
  1862. margin: 10px;
  1863. }
  1864. .titleup {
  1865. position: relative;
  1866. }
  1867. .title::before {
  1868. content: '';
  1869. display: inline-block;
  1870. width: 5px;
  1871. height: 15px;
  1872. background: #8890b1;
  1873. margin-right: 5px;
  1874. }
  1875. .substance {
  1876. background: #ffffff;
  1877. width: 100%;
  1878. border-radius: 4px;
  1879. margin: 0 auto;
  1880. padding-top: 20px;
  1881. }
  1882. /deep/.el-table .el-table__header .cell,
  1883. .el-table .el-table__body .cell {
  1884. text-align: center;
  1885. }
  1886. /deep/.el-table--enable-row-transition .el-table__body td {
  1887. text-align: center;
  1888. }
  1889. .bg-left {
  1890. padding-left: 30px;
  1891. }
  1892. .bg-right {
  1893. padding-right: 10px;
  1894. text-align: right;
  1895. }
  1896. .bg-bottom {
  1897. margin: 15px 0px;
  1898. }
  1899. .titleup {
  1900. position: relative;
  1901. }
  1902. /deep/ .substance .bangdan {
  1903. width: 100%;
  1904. padding-top: 6%;
  1905. padding-bottom: 6%;
  1906. }
  1907. // // .photo2{
  1908. // // margin-top: 10px;
  1909. // // }
  1910. .el-upload--picture-card {
  1911. background-color: #fbfdff;
  1912. border: 1px dashed #c0ccda;
  1913. border-radius: 6px;
  1914. box-sizing: border-box;
  1915. width: 148px;
  1916. height: 148px;
  1917. line-height: 146px;
  1918. vertical-align: top;
  1919. margin-left: -289px;
  1920. }
  1921. // .titleup::before {
  1922. // content: '';
  1923. // display: inline-block;
  1924. // width: 5px;
  1925. // height: 30px;
  1926. // background: #5473e8;
  1927. // position: absolute;
  1928. // left: 0;
  1929. // }
  1930. .but {
  1931. text-align: center;
  1932. margin: 20px auto;
  1933. }
  1934. .stocks {
  1935. position: relative;
  1936. /deep/.el-select>.el-input {
  1937. display: inline-block;
  1938. }
  1939. /deep/>.el-input {
  1940. width: 33.3333%;
  1941. }
  1942. .add,
  1943. .del {
  1944. position: absolute;
  1945. right: -16px;
  1946. transform: translateY(20%);
  1947. }
  1948. .del {
  1949. right: -40px;
  1950. }
  1951. }
  1952. .butCss {
  1953. opacity: 0;
  1954. color: #000;
  1955. }
  1956. .center {
  1957. overflow-y: scroll;
  1958. }
  1959. .el-button--success.is-plain {
  1960. border: 1px solid #2aff7c;
  1961. background: black;
  1962. color: #2aff7c;
  1963. width: 50%;
  1964. }
  1965. .call-show {
  1966. width: 540px;
  1967. }
  1968. .top {
  1969. background: black;
  1970. color: #2aff7c;
  1971. font-size: 32px;
  1972. text-align: right;
  1973. padding: 0 10px 0 20px;
  1974. border-radius: 10px;
  1975. margin: 0 20px 20px 21px;
  1976. position: absolute;
  1977. top: 140px;
  1978. width: 465px;
  1979. .zujian {
  1980. position: relative;
  1981. }
  1982. .kg-style {
  1983. font-size: 30px;
  1984. color: red;
  1985. }
  1986. .confirmInfo {
  1987. display: flex;
  1988. // line-height: 90px;
  1989. .car-type {
  1990. text-align: left;
  1991. width: 50%;
  1992. min-width: 200px;
  1993. }
  1994. .car-no {
  1995. width: 50%;
  1996. text-align: right;
  1997. }
  1998. }
  1999. .confirmWeight {
  2000. display: flex;
  2001. align-items: center;
  2002. .titleWeight {
  2003. width: 35%;
  2004. min-width: 200px;
  2005. text-align: left;
  2006. line-height: 90px;
  2007. color: red;
  2008. }
  2009. .weight {
  2010. width: 65%;
  2011. text-align: right;
  2012. color: red;
  2013. }
  2014. }
  2015. }
  2016. .bottom {
  2017. // text-align: center;
  2018. background: white;
  2019. margin: 20px 20px 0 20px;
  2020. // border-radius: 10px;
  2021. padding-bottom: 20px;
  2022. .img1,
  2023. .img2 {
  2024. width: 200px;
  2025. padding: 20px;
  2026. }
  2027. .video-content {
  2028. width: 100%;
  2029. }
  2030. .video1 {
  2031. text-align: center;
  2032. }
  2033. }
  2034. /deep/.title_css .el-dialog__header {
  2035. text-align: center !important;
  2036. }
  2037. </style>