weightCheck.vue 52 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554
  1. <template>
  2. <div class="center">
  3. <el-row>
  4. <el-col :span="12">
  5. <h2 class="bg-left titleup">{{ information }}信息</h2>
  6. </el-col>
  7. <el-col :span="12" class="bg-right">
  8. <el-button class="bg-bottom" type="primary" size="small" @click="cancel"><img width="6" height="10"
  9. style="vertical-align: bottom; margin-right: 3px" src="../../../public/img/lujing.png" alt="" />返回
  10. </el-button>
  11. </el-col>
  12. </el-row>
  13. <div class="substance">
  14. <div class="left">
  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.grossWeight }} <span class="kg-style">kg</span>
  23. </div>
  24. <div v-else class="weight">
  25. {{ weighingList.tare }} <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">{{ carWeightInfo.carNumber }}</div>
  31. </div>
  32. </div>
  33. <h2 class="bg-left titleup">实时监控</h2>
  34. <div class="bottom">
  35. <div v-if="!monitorUrl1" class="video1">
  36. <img src="../../../public/img/quesheng@2x.png" alt="" class="img1" />
  37. <div>监控视频未连接</div>
  38. </div>
  39. <div v-else class="video1">
  40. <iframe :src="monitorUrl1" width="440" height="360" allowfullscreen="true" webkitallowfullscreen="true"
  41. mozallowfullscreen="true" allow="autoplay; fullscreen; microphone;"></iframe>
  42. </div>
  43. <div v-if="!monitorUrl2" class="video1">
  44. <img src="../../../public/img/quesheng@2x.png" alt="" class="img1" />
  45. <div>监控视频未连接</div>
  46. </div>
  47. <div v-else class="video2">
  48. <iframe :src="monitorUrl2" width="440" height="360" allowfullscreen="true" webkitallowfullscreen="true"
  49. mozallowfullscreen="true" allow="autoplay; fullscreen; microphone;"></iframe>
  50. </div>
  51. </div>
  52. </div>
  53. <div class="right">
  54. <ws-form class="right-content">
  55. <div class="left">
  56. <div class="tab">
  57. <div class="tab-item" :class="index == 0 ? 'active' : ''" @click="tabClick(0)">
  58. 待称毛重({{ mListTop.length }})
  59. </div>
  60. <div class="tab-item" :class="index == 1 ? 'active' : ''" @click="tabClick(1)">
  61. 待称皮重({{ pListTop.length }})
  62. </div>
  63. </div>
  64. <ws-info-table>
  65. <ws-form-item label="编号" span="1" prop="number">
  66. <ws-input v-model="weighingList.number" placeholder="请输入编号" maxlength="100" disabled size="small" />
  67. </ws-form-item>
  68. <ws-form-item label="仓位号" span="1" prop="binNumber">
  69. <ws-input v-model="weighingList.binNumber" placeholder="请输入仓位号" maxlength="100" disabled size="small" />
  70. </ws-form-item>
  71. <ws-form-item label="客户" span="1" prop="customer">
  72. <ws-input v-model="weighingList.customer" placeholder="请输入客户" maxlength="100" disabled size="small" />
  73. </ws-form-item>
  74. <ws-form-item label="囤位号" span="1" prop="storageNumber">
  75. <ws-input v-model="weighingList.storageNumber" placeholder="请输入囤位号" maxlength="100" size="small"
  76. disabled />
  77. </ws-form-item>
  78. <ws-form-item label="车牌号" span="1" prop="carNumber">
  79. <ws-input v-model="weighingList.carNumber" placeholder="请输入车牌号" maxlength="100" size="small" disabled />
  80. </ws-form-item>
  81. <ws-form-item label="箱号-1" span="1" prop="boxNo">
  82. <ws-input disabled v-model="inspect.boxNo" placeholder="请输入箱号" maxlength="20" size="small" />
  83. </ws-form-item>
  84. <ws-form-item label="箱号-2" span="1" prop="boxNoOther">
  85. <ws-input disabled v-model="inspect.boxNoOther" placeholder="请输入箱号" maxlength="20" size="small" />
  86. </ws-form-item>
  87. <ws-form-item label="封号-1" span="1" prop="titleNo">
  88. <ws-input disabled v-model="inspect.titleNo" placeholder="请输入封号" maxlength="20" size="small" />
  89. </ws-form-item>
  90. <ws-form-item label="封号-2" span="1" prop="titleNoOther">
  91. <ws-input disabled v-model="inspect.titleNoOther" placeholder="请输入封号" maxlength="20" size="small" />
  92. </ws-form-item>
  93. <ws-form-item label="货名" span="1" prop="goodsName">
  94. <ws-input v-model="weighingList.goodsName" placeholder="请输入货名" maxlength="100" size="small" disabled />
  95. </ws-form-item>
  96. <ws-form-item label="毛重(公斤)" span="1" prop="grossWeight">
  97. <ws-input type="number" @mousewheel.native.prevent v-if="this.index == 0"
  98. v-model="weighingList.grossWeight" @input="calculation(status)" placeholder="未获取到毛重" maxlength="100"
  99. size="small" :disabled="disabled" />
  100. <ws-input type="number" @mousewheel.native.prevent v-else v-model="weighingList.grossWeight"
  101. @input="calculation" placeholder="未获取到毛重" maxlength="100" size="small" disabled />
  102. <el-button type="primary" :class="index == 0 ? '' : 'butCss'" @click="openPort">重新获取</el-button>
  103. </ws-form-item>
  104. <ws-form-item label="皮重(公斤)" span="1" prop="tare" v-if="information == '皮重'">
  105. <ws-input type="number" @mousewheel.native.prevent v-model="weighingList.tare" @input="calculation"
  106. placeholder="未获取到皮重" maxlength="100" size="small" :disabled="disabled" />
  107. <el-button type="primary" v-if="index != 0" @click="openPort">重新获取</el-button>
  108. </ws-form-item>
  109. <div class="formItem">
  110. <ws-form-item label="扣重(公斤)" span="1" prop="buckleWeightRatio"
  111. v-if="information == '皮重' && paramType == '2'">
  112. <ws-input type="number" @mousewheel.native.prevent v-model="weighingList.buckleMiscellaneous"
  113. @input="calculation" placeholder="请输入扣重" maxlength="100" size="small" />
  114. </ws-form-item>
  115. <ws-form-item label="净重(公斤)" span="1" prop="netWeight" v-if="information == '皮重'">
  116. <ws-input type="number" @mousewheel.native.prevent v-model="weighingList.netWeight"
  117. placeholder="请输入净重" maxlength="100" size="small" disabled />
  118. </ws-form-item>
  119. <ws-form-item label="应收卸车过磅费(元)" span="1" prop="receivableWeighingFee" v-if="index == 1">
  120. <ws-input type="number" v-model="weighingList.receivableWeighingFee" placeholder="未获取到卸车过磅费金额"
  121. maxlength="100" size="small" disabled />
  122. </ws-form-item>
  123. <ws-form-item label="实收卸车过磅费(元)" span="1" prop="actualWeighingFee" v-if="index == 1">
  124. <ws-input type="number" v-model="weighingList.actualWeighingFee" placeholder="输入卸车过磅费" maxlength="100"
  125. size="small" />
  126. </ws-form-item>
  127. </div>
  128. </ws-info-table>
  129. <div class="but">
  130. <el-button @click="cancel" type="primary">关闭</el-button>
  131. <el-button @click="print" v-if="this.information == '毛重'" type="primary">保存</el-button>
  132. <el-button @click="print" v-if="this.information == '皮重'" type="primary">保存并打印</el-button>
  133. </div>
  134. </div>
  135. <div class="car-right">
  136. <div class="tab-item" :class="status == 1 ? 'active' : ''" @click="cutstatus(1)">
  137. 已称重
  138. </div>
  139. <div class="tab-item" :class="status == 2 ? 'active' : ''" @click="cutstatus(2)">
  140. 未称重
  141. </div>
  142. <!-- <el-button :type="status==1?'primary':''">已称重</el-button>
  143. <el-button @click="cutstatus(2)" :type="status==2?'primary':''">未称重</el-button> -->
  144. <el-table ref="singleTable" :data="carList" highlight-current-row @current-change="handleCurrentChange"
  145. style="width: 100%; overflow: auto; height: 640px">
  146. <el-table-column property="number" label="编号">
  147. </el-table-column>
  148. <el-table-column property="carNumber" label="车牌号">
  149. </el-table-column>
  150. <el-table-column property="status" label="状态">
  151. </el-table-column>
  152. </el-table>
  153. <div style="text-align: center">
  154. <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
  155. :current-page="currentPage" :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper"
  156. :total="deptBudgetTotal">
  157. </el-pagination>
  158. </div>
  159. <!-- <div class="table-title">
  160. <div class="top">
  161. <div class="top-item first"></div>
  162. <div class="top-item">编号</div>
  163. <div class="top-item">车牌号</div>
  164. </div>
  165. <div class="top">
  166. <div></div>
  167. <div class="top-item"></div>
  168. <div class="top-item">编号</div>
  169. <div class="top-item">车牌号</div>
  170. </div>
  171. </div>
  172. <div class="table">
  173. <div class="table-content" v-for="(item,index) in 30" :key="index">
  174. <div class="table-content-item"><input type="radio"></div>
  175. <div class="table-content-item">xxxxxxxxxxxxx</div>
  176. <div class="table-content-item">辽A11111</div>
  177. </div>
  178. </div> -->
  179. </div>
  180. </ws-form>
  181. </div>
  182. </div>
  183. <div class="mask" v-show="isShowPrintType"></div>
  184. <div class="print-type" v-show="isShowPrintType">
  185. <div class="print-type-content">
  186. <div class="print-type-title">请选择打印纸张类型</div>
  187. <div class="print-type-checkbox">
  188. <!-- <el-radio-group v-model="radio">
  189. <el-radio label="A4" class="label-width" @change="selectType">A4</el-radio>
  190. <el-radio label="A5" class="label-width" @change="selectType">A5</el-radio>
  191. </el-radio-group> -->
  192. </div>
  193. <div class="shdw-style" v-if="checked||(!ddchecked&&!checked)">
  194. <div>收货单位:</div>
  195. <!-- <div>{{companyName}}</div> -->
  196. <el-select v-model="companyName" placeholder="请选择" style="width: 75%;">
  197. <el-option v-for="item in companyNameOptions" :key="item.value" :label="item.label" :value="item.value">
  198. </el-option>
  199. </el-select>
  200. </div>
  201. <div v-if="warehouseName=='鲅鱼圈金信库'||warehouseName=='白城内陆港'||warehouseName=='哈尔滨依兰库'">
  202. <div class="print-type-ew">
  203. <el-checkbox v-model="checked" @change="changeEw">打印额外票据</el-checkbox>
  204. <el-checkbox v-model="ddchecked" @change="changeEwDD">单独打印额外票据</el-checkbox>
  205. </div>
  206. <div class="ew-print" v-if="printSeparately">
  207. <div class="row">
  208. <div>额外客户姓名:</div>
  209. <!-- <div>{{companyName}}</div> -->
  210. <el-select v-model="ewCustomer" placeholder="请选择" style="width: 75%;">
  211. <el-option v-for="item in ewCustomerOptions" :key="item.value" :label="item.label" :value="item.value">
  212. </el-option>
  213. </el-select>
  214. </div>
  215. <div class="row">
  216. <div>额外收货单位:</div>
  217. <!-- <div>{{companyNameEW}}</div> -->
  218. <el-select v-model="companyNameEW" placeholder="请选择" style="width: 75%;">
  219. <el-option v-for="item in companyNameEWOptions" :key="item.value" :label="item.label"
  220. :value="item.value">
  221. </el-option>
  222. </el-select>
  223. </div>
  224. </div>
  225. </div>
  226. </div>
  227. <div class="bottom-btn">
  228. <el-button @click="typePrintClick">确定</el-button>
  229. <el-button @click="isShowPrintType = false">取消</el-button>
  230. </div>
  231. </div>
  232. <el-dialog width="70%" class="table-content" center :visible.sync="isShowPrint" title="粮食检斤单" @opened="opendBtn"
  233. @close="closeDialog" :close-on-click-modal="false">
  234. <weightCheckPrint :tableData="inspect" ref="saveImg"></weightCheckPrint>
  235. <div style="text-align: center">
  236. <el-button type="primary" @click="closePrint">关闭</el-button>
  237. <el-button type="primary" @click="printSmall">打印小票</el-button>
  238. <el-button type="primary" @click="printBig">打印单据</el-button>
  239. </div>
  240. </el-dialog>
  241. </div>
  242. </template>
  243. <script>
  244. import {
  245. tare,
  246. grossWeight,
  247. getamount,
  248. getPrint,
  249. getweighingList,
  250. getinspectLookGoods,
  251. } from '@/model/houseSelfCollect/index'
  252. import weightCheckPrint from './component/weightCheckPrint.vue'
  253. import BalanceAlert from '@/components/balanceAlert'
  254. import html2canvas from 'html2canvas'
  255. import axios from 'axios'
  256. export default {
  257. components: {
  258. weightCheckPrint,
  259. BalanceAlert,
  260. },
  261. watch: {
  262. weighingList: {
  263. //深度监听,可监听到对象、数组的变化
  264. handler(val, oldVal) {
  265. if (val.tare) {
  266. if (this.weighingList.buckleMiscellaneous) {
  267. this.weighingList.netWeight =
  268. this.weighingList.grossWeight -
  269. val.tare -
  270. this.weighingList.buckleMiscellaneous
  271. } else {
  272. this.weighingList.netWeight =
  273. this.weighingList.grossWeight - val.tare
  274. }
  275. }
  276. },
  277. deep: true, //true 深度监听
  278. },
  279. },
  280. data() {
  281. return {
  282. isShowBalance: false,
  283. currentPage: 1,
  284. pageSize: 100,
  285. deptCircularPage: {},
  286. deptBudgetTotal: 0,
  287. pList: [],
  288. mList: [],
  289. index: 0,
  290. status: 1,
  291. carList: [],
  292. carWeightInfo: {
  293. carNumber: '',
  294. type: '',
  295. weight: '',
  296. },
  297. currentRow: null,
  298. inspect: {},
  299. types: 1,
  300. information: '',
  301. weighingList: {
  302. grossWeight: 0,
  303. tare: 0,
  304. buckleMiscellaneous: 0,
  305. netWeight: 0,
  306. receivableWeighingFee: '',
  307. },
  308. deptBudgetList: {},
  309. tpyeNo: 1,
  310. disabled: true,
  311. relationId: '',
  312. warehouseId: '',
  313. purchasePriceList: [],
  314. isShowPrint: false,
  315. tableData: {},
  316. reader: null,
  317. param: 9600,
  318. monitorUrl1: '',
  319. monitorUrl2: '',
  320. cangid: '',
  321. paramType: '1',
  322. warehouseName: '',
  323. result1: '00',
  324. allowEdit: 0,
  325. mListTop: [],
  326. mListBottom: [],
  327. pListTop: [],
  328. carList1: [],
  329. pListBottom: [],
  330. checked: false,
  331. ddchecked: false,
  332. isShowPrintType: false,
  333. ewCustomerOptions: [{
  334. value: '黑龙江利润元粮食贸易有限公司',
  335. label: '黑龙江利润元粮食贸易有限公司'
  336. }, {
  337. value: '黑龙江众利合粮食贸易有限公司',
  338. label: '黑龙江众利合粮食贸易有限公司'
  339. }, {
  340. value: '黑龙江鑫满仓粮食贸易有限公司',
  341. label: '黑龙江鑫满仓粮食贸易有限公司'
  342. }, {
  343. value: '黑龙江中天昊元贸易有限公司',
  344. label: '黑龙江中天昊元贸易有限公司'
  345. }],
  346. companyNameOptions: [{
  347. value: '黑龙江利润元粮食贸易有限公司',
  348. label: '黑龙江利润元粮食贸易有限公司'
  349. }, {
  350. value: '黑龙江众利合粮食贸易有限公司',
  351. label: '黑龙江众利合粮食贸易有限公司'
  352. }, {
  353. value: '黑龙江鑫满仓粮食贸易有限公司',
  354. label: '黑龙江鑫满仓粮食贸易有限公司'
  355. }, {
  356. value: '黑龙江中天昊元贸易有限公司',
  357. label: '黑龙江中天昊元贸易有限公司'
  358. }, ],
  359. companyNameEWOptions: [{
  360. value: '厦门建发物产有限公司',
  361. label: '厦门建发物产有限公司'
  362. }],
  363. companyName: '黑龙江利润元粮食贸易有限公司',
  364. companyNameEW: '厦门建发物产有限公司',
  365. ewCustomer: '黑龙江利润元粮食贸易有限公司',
  366. ewradio: '',
  367. dialogDataList: [],
  368. printSeparately: false,
  369. idprint: '' //打印id
  370. }
  371. },
  372. mounted() {},
  373. activated() {
  374. console.log(this.common.name)
  375. this.cangid = this.$route.query.cangid
  376. this.paramType = this.$route.query.paramType
  377. this.tpyeNo = this.$route.query.tpyeNo
  378. this.warehouseName = this.$route.query.warehouseName
  379. localStorage.setItem('ck', this.warehouseName)
  380. this.weighingList.warehouseName = this.$route.query.warehouseName
  381. this.deptBudgetList.warehouseName = this.$route.query.warehouseName
  382. this.weighingList.number = this.$route.query.number
  383. this.weighingList.binNumber = this.$route.query.binNumber
  384. this.weighingList.customerNumberCard = this.$route.query.customerNumberCard
  385. this.weighingList.customer = this.$route.query.customer
  386. this.weighingList.storageNumber = this.$route.query.storageNumber
  387. this.weighingList.carNumber = this.$route.query.carNumber
  388. this.weighingList.goodsName = this.$route.query.goodsName
  389. this.weighingList.id = this.$route.query.id
  390. this.weighingList.carModel = this.$route.query.carModel
  391. // this.relationId = this.$route.query.relationId
  392. this.monitorUrl1 = this.$route.query.monitorUrl1
  393. this.monitorUrl2 = this.$route.query.monitorUrl2
  394. this.warehouseId = this.$route.query.warehouseId
  395. if (!this.$route.query.grossWeight) {
  396. this.$route.query.grossWeight = 0
  397. } else {
  398. this.weighingList.grossWeight = this.$route.query.grossWeight
  399. }
  400. // this.purchasePriceList = this.$route.query.purchasePriceList
  401. // console.log(this.purchasePriceList, '上限')
  402. this.allowEdit = this.$route.query.allowEdit
  403. if (this.allowEdit == 0) {
  404. this.disabled = true
  405. } else if (this.allowEdit == 1) {
  406. this.disabled = false
  407. }
  408. if (this.tpyeNo == 1) {
  409. this.information = '毛重'
  410. this.weighingList.tare = 0
  411. } else if (this.tpyeNo == 2) {
  412. this.information = '皮重'
  413. }
  414. // this.$route.query.automaticWeightAcquisition = 0
  415. // if(this.$route.query.automaticWeightAcquisition == '1'){
  416. // this.openPort()
  417. // this.isShowBalance = true
  418. // }
  419. // if (this.$route.query.automaticWeightAcquisition == '1') {
  420. this.isShowBalance = true
  421. // }
  422. console.log(this.weighingList)
  423. this.getList()
  424. },
  425. deactivated() {
  426. // this.closePort()
  427. },
  428. methods: {
  429. changeEwDD(e) {
  430. this.checked = false
  431. if (e) {
  432. this.printSeparately = true
  433. } else {
  434. this.printSeparately = false
  435. }
  436. },
  437. changeEw(e) {
  438. this.ddchecked = false
  439. if (e) {
  440. this.printSeparately = true
  441. } else {
  442. this.printSeparately = false
  443. }
  444. },
  445. typePrintClick() {
  446. this.dialogDataList = []
  447. getPrint({
  448. id: this.idprint,
  449. })
  450. .toPromise()
  451. .then((response) => {
  452. // this.isShowPrint = true
  453. // this.inspect = response
  454. if (response.compName == '黑龙江秋收有限公司') {
  455. this.inspect.compName = '黑龙江中天昊元贸易有限公司'
  456. }
  457. var dialogData = response
  458. if (this.checked) {
  459. this.dialogDataList.push(dialogData)
  460. var _datas = JSON.stringify(dialogData)
  461. _datas = JSON.parse(_datas)
  462. _datas.compName = this.companyNameEW;
  463. _datas.customer = this.ewCustomer
  464. this.dialogDataList.push(_datas)
  465. } else if (this.ddchecked) {
  466. _datas = dialogData
  467. _datas.compName = this.companyNameEW;
  468. _datas.customer = this.ewCustomer
  469. this.dialogDataList.push(_datas)
  470. } else {
  471. dialogData.companyName = this.companyName
  472. this.dialogDataList.push(dialogData)
  473. }
  474. console.log('保存打印', this.dialogDataList)
  475. window.open(
  476. '../../../../static/weightCheck.html?type=2&tableData=' +
  477. JSON.stringify(this.dialogDataList)
  478. )
  479. })
  480. .catch((response) => {
  481. // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
  482. })
  483. },
  484. setVal(data) {
  485. if (this.information == '毛重') {
  486. this.weighingList.grossWeight = data
  487. } else {
  488. this.weighingList.tare = data
  489. }
  490. },
  491. openPort() {
  492. this.$refs.weightChild.openPort()
  493. },
  494. cutstatus(status) {
  495. this.status = status
  496. if (status == 1) {
  497. this.carList = this.carList1.filter(function(item) {
  498. return item.status == '已质检'
  499. })
  500. } else {
  501. this.carList = this.carList1.filter(function(item) {
  502. return item.status == '已称毛重'
  503. })
  504. }
  505. },
  506. handleSizeChange(val) {
  507. console.log(`每页 ${val} 条`)
  508. this.pageSize = val
  509. this.getList()
  510. },
  511. getList() {
  512. // 货名
  513. getinspectLookGoods({
  514. warehouseId: this.cangid,
  515. })
  516. .toPromise()
  517. .then((response) => {
  518. this.purchasePriceList = response
  519. })
  520. getweighingList({
  521. compId: localStorage.getItem('ws-pf_compId'),
  522. currentPage: this.currentPage,
  523. pageSize: this.pageSize,
  524. searchKeyWord: '',
  525. warehouseName: localStorage.getItem('ck'),
  526. managementType: 1,
  527. // viewFlag:'1'
  528. })
  529. .toPromise()
  530. .then((response) => {
  531. // for (let i = 0; i < response.records.length; i++) {
  532. // if (response.records[i].paymentManagement) {
  533. // if (response.records[i].paymentManagement.status == '待结算' && !response.records[i].paymentManagement
  534. // .approveStatus) {
  535. // response.records[i].allow = 1
  536. // } else {
  537. // response.records[i].allow = 2
  538. // }
  539. // } else {
  540. // response.records[i].allow = 1
  541. // }
  542. // }
  543. this.weighingList = response.records
  544. this.common.commonWeighingList = response.records
  545. this.makeData()
  546. })
  547. .catch((response) => {
  548. // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
  549. })
  550. },
  551. makeData() {
  552. this.mList = []
  553. this.pList = []
  554. this.mListTop = []
  555. this.mListBottom = []
  556. this.pListTop = []
  557. this.pListBottom = []
  558. this.carWeightInfo.carNumber = ''
  559. this.weighingList = []
  560. let that = this
  561. console.log(this.common.commonWeighingList, 'commonWeighingList')
  562. let _list = this.common.commonWeighingList
  563. for (let i = 0; i < _list.length; i++) {
  564. if (_list[i].paymentManagement) {
  565. if (
  566. _list[i].paymentManagement.status != '待结算' ||
  567. _list[i].paymentManagement.approveStatus
  568. ) {
  569. continue
  570. }
  571. }
  572. if (_list[i].status == '已质检') {
  573. this.mListTop.push(_list[i])
  574. }
  575. if (_list[i].status == '已称毛重') {
  576. this.mListBottom.push(_list[i])
  577. }
  578. if (_list[i].status == '已称皮重') {
  579. this.pListBottom.push(_list[i])
  580. }
  581. if (_list[i].status == '已称毛重') {
  582. this.pListTop.push(_list[i])
  583. }
  584. }
  585. this.mList = this.mListTop.concat(this.mListBottom)
  586. this.pList = this.pListTop.concat(this.pListBottom)
  587. if (this.information == '毛重') {
  588. this.index = 0
  589. this.carList = this.mList
  590. this.carList1 = this.mList
  591. if (this.mList.length != 0) {
  592. let _item = this.mList.filter(function(val) {
  593. console.log(that.$route.query.id)
  594. if (val.id == that.$route.query.id) {
  595. return val
  596. }
  597. })
  598. if (_item.length != 0) {
  599. this.setCurrent(_item[0])
  600. this.weighingList = _item[0]
  601. this.carWeightInfo = {
  602. carNumber: _item[0].carNumber,
  603. type: this.information,
  604. weight: this.weighingList.grossWeight,
  605. }
  606. this.weighingList = _item[0]
  607. } else {
  608. this.setCurrent(this.mList[0])
  609. this.weighingList = this.mList[0]
  610. this.carWeightInfo = {
  611. carNumber: this.mList[0].carNumber,
  612. type: this.information,
  613. weight: this.weighingList.grossWeight,
  614. }
  615. }
  616. }
  617. } else {
  618. this.index = 1
  619. this.carList = this.pList
  620. this.carList1 = this.pList
  621. if (this.pList.length != 0) {
  622. let _item = this.pList.filter(function(val1) {
  623. if (val1.id == that.$route.query.id) {
  624. return val1
  625. }
  626. })
  627. if (_item.length != 0) {
  628. this.setCurrent(_item[0])
  629. this.weighingList = _item[0]
  630. this.carWeightInfo = {
  631. carNumber: _item[0].carNumber,
  632. type: this.information,
  633. weight: this.weighingList.tare
  634. }
  635. } else {
  636. this.setCurrent(this.pList[0])
  637. this.weighingList = this.pList[0]
  638. this.carWeightInfo = {
  639. carNumber: this.pList[0].carNumber,
  640. type: this.information,
  641. weight: this.weighingList.tare
  642. }
  643. }
  644. }
  645. if (_item.length != 0) {
  646. this.setCurrent(_item[0])
  647. this.weighingList = _item[0]
  648. this.carWeightInfo = {
  649. carNumber: _item[0].carNumber,
  650. type: this.information,
  651. weight: this.weighingList.tare,
  652. }
  653. } else {
  654. this.setCurrent(this.pList[0])
  655. this.weighingList = this.pList[0]
  656. this.carWeightInfo = {
  657. carNumber: this.pList[0].carNumber,
  658. type: this.information,
  659. weight: this.weighingList.tare,
  660. }
  661. }
  662. this.deptBudgetTotal = this.pList.length
  663. }
  664. this.weighingList.carModel =
  665. this.weighingList.qualityInspectionManagement.carModel
  666. if (this.weighingList.carModel == '单拖小柜') {
  667. this.weighingList.receivableWeighingFee = 80
  668. this.weighingList.actualWeighingFee = 80
  669. } else if (this.weighingList.carModel == '双拖小柜') {
  670. this.weighingList.receivableWeighingFee = 160
  671. this.weighingList.actualWeighingFee = 160
  672. } else if (this.weighingList.carModel == '大柜') {
  673. if (this.weighingList.grossWeight / 1000 < 50) {
  674. this.$set(this.weighingList, 'receivableWeighingFee', 120)
  675. this.weighingList.actualWeighingFee = 120
  676. this.$forceUpdate()
  677. } else if (
  678. this.weighingList.grossWeight / 1000 > 50 ||
  679. this.weighingList.grossWeight / 1000 < 65
  680. ) {
  681. this.weighingList.receivableWeighingFee = 150
  682. this.weighingList.actualWeighingFee = 150
  683. } else if (
  684. this.weighingList.grossWeight / 1000 > 65 ||
  685. this.weighingList.grossWeight / 1000 < 75
  686. ) {
  687. this.weighingList.receivableWeighingFee = 170
  688. this.weighingList.actualWeighingFee = 170
  689. } else if (
  690. this.weighingList.grossWeight / 1000 > 75 ||
  691. this.weighingList.grossWeight / 1000 < 80
  692. ) {
  693. this.weighingList.receivableWeighingFee = 190
  694. this.weighingList.actualWeighingFee = 190
  695. } else if (
  696. this.weighingList.grossWeight / 1000 > 80 ||
  697. this.weighingList.grossWeight / 1000 < 85
  698. ) {
  699. this.weighingList.receivableWeighingFee = 210
  700. this.weighingList.actualWeighingFee = 210
  701. } else if (
  702. this.weighingList.grossWeight / 1000 > 85 ||
  703. this.weighingList.grossWeight / 1000 < 95
  704. ) {
  705. this.weighingList.receivableWeighingFee = 240
  706. this.weighingList.actualWeighingFee = 240
  707. } else if (
  708. this.weighingList.grossWeight / 1000 > 95 ||
  709. this.weighingList.grossWeight / 1000 < 105
  710. ) {
  711. this.weighingList.receivableWeighingFee = 260
  712. this.weighingList.actualWeighingFee = 260
  713. } else if (
  714. this.weighingList.grossWeight / 1000 > 105 ||
  715. this.weighingList.grossWeight / 1000 < 150
  716. ) {
  717. this.weighingList.receivableWeighingFee = 300
  718. this.weighingList.actualWeighingFee = 300
  719. }
  720. } else if (this.weighingList.carModel == '挂车') {
  721. if (this.weighingList.grossWeight / 1000 < 50) {
  722. this.weighingList.receivableWeighingFee = 180
  723. this.weighingList.actualWeighingFee = 180
  724. } else if (
  725. this.weighingList.grossWeight / 1000 > 50 ||
  726. this.weighingList.grossWeight / 1000 < 65
  727. ) {
  728. this.weighingList.receivableWeighingFee = 200
  729. this.weighingList.actualWeighingFee = 200
  730. } else if (
  731. this.weighingList.grossWeight / 1000 > 65 ||
  732. this.weighingList.grossWeight / 1000 < 75
  733. ) {
  734. this.weighingList.receivableWeighingFee = 250
  735. this.weighingList.actualWeighingFee = 250
  736. } else if (
  737. this.weighingList.grossWeight / 1000 > 75 ||
  738. this.weighingList.grossWeight / 1000 < 85
  739. ) {
  740. this.weighingList.receivableWeighingFee = 350
  741. this.weighingList.actualWeighingFee = 350
  742. } else if (
  743. this.weighingList.grossWeight / 1000 > 85 ||
  744. this.weighingList.grossWeight / 1000 < 95
  745. ) {
  746. this.weighingList.receivableWeighingFee = 400
  747. this.weighingList.actualWeighingFee = 400
  748. } else if (
  749. this.weighingList.grossWeight / 1000 > 95 ||
  750. this.weighingList.grossWeight / 1000 < 105
  751. ) {
  752. this.weighingList.receivableWeighingFee = 450
  753. this.weighingList.actualWeighingFee = 450
  754. } else if (
  755. this.weighingList.grossWeight / 1000 > 105 ||
  756. this.weighingList.grossWeight / 1000 < 120
  757. ) {
  758. this.weighingList.receivableWeighingFee = 500
  759. this.weighingList.actualWeighingFee = 500
  760. } else if (
  761. this.weighingList.grossWeight / 1000 > 120 ||
  762. this.weighingList.grossWeight / 1000 < 130
  763. ) {
  764. this.weighingList.receivableWeighingFee = 550
  765. this.weighingList.actualWeighingFee = 550
  766. } else if (
  767. this.weighingList.grossWeight / 1000 > 130 ||
  768. this.weighingList.grossWeight / 1000 < 150
  769. ) {
  770. this.weighingList.receivableWeighingFee = 700
  771. this.weighingList.actualWeighingFee = 700
  772. }
  773. } else if (this.weighingList.carModel == '冷藏箱(不抠箱)') {
  774. if (this.weighingList.grossWeight / 1000 < 50) {
  775. this.weighingList.receivableWeighingFee = 120
  776. this.weighingList.actualWeighingFee = 120
  777. } else if (
  778. this.weighingList.grossWeight / 1000 > 50 ||
  779. this.weighingList.grossWeight / 1000 < 65
  780. ) {
  781. this.weighingList.receivableWeighingFee = 150
  782. this.weighingList.actualWeighingFee = 150
  783. } else if (
  784. this.weighingList.grossWeight / 1000 > 65 ||
  785. this.weighingList.grossWeight / 1000 < 75
  786. ) {
  787. this.weighingList.receivableWeighingFee = 170
  788. this.weighingList.actualWeighingFee = 170
  789. } else if (
  790. this.weighingList.grossWeight / 1000 > 75 ||
  791. this.weighingList.grossWeight / 1000 < 80
  792. ) {
  793. this.weighingList.receivableWeighingFee = 190
  794. this.weighingList.actualWeighingFee = 190
  795. } else if (
  796. this.weighingList.grossWeight / 1000 > 80 ||
  797. this.weighingList.grossWeight / 1000 < 85
  798. ) {
  799. this.weighingList.receivableWeighingFee = 210
  800. this.weighingList.actualWeighingFee = 210
  801. } else if (
  802. this.weighingList.grossWeight / 1000 > 85 ||
  803. this.weighingList.grossWeight / 1000 < 95
  804. ) {
  805. this.weighingList.receivableWeighingFee = 240
  806. this.weighingList.actualWeighingFee = 240
  807. } else if (
  808. this.weighingList.grossWeight / 1000 > 95 ||
  809. this.weighingList.grossWeight / 1000 < 105
  810. ) {
  811. this.weighingList.receivableWeighingFee = 260
  812. this.weighingList.actualWeighingFee = 260
  813. } else if (
  814. this.weighingList.grossWeight / 1000 > 105 ||
  815. this.weighingList.grossWeight / 1000 < 120
  816. ) {
  817. this.weighingList.receivableWeighingFee = 300
  818. this.weighingList.actualWeighingFee = 300
  819. }
  820. } else if (this.weighingList.carModel == '冷藏箱(抠箱)') {
  821. if (this.weighingList.grossWeight / 1000 < 50) {
  822. this.weighingList.receivableWeighingFee = 360
  823. this.weighingList.actualWeighingFee = 360
  824. } else if (
  825. this.weighingList.grossWeight / 1000 > 50 ||
  826. this.weighingList.grossWeight / 1000 < 65
  827. ) {
  828. this.weighingList.receivableWeighingFee = 390
  829. this.weighingList.actualWeighingFee = 390
  830. } else if (
  831. this.weighingList.grossWeight / 1000 > 65 ||
  832. this.weighingList.grossWeight / 1000 < 75
  833. ) {
  834. this.weighingList.receivableWeighingFee = 410
  835. this.weighingList.actualWeighingFee = 410
  836. } else if (
  837. this.weighingList.grossWeight / 1000 > 75 ||
  838. this.weighingList.grossWeight / 1000 < 80
  839. ) {
  840. this.weighingList.receivableWeighingFee = 430
  841. this.weighingList.actualWeighingFee = 430
  842. } else if (
  843. this.weighingList.grossWeight / 1000 > 80 ||
  844. this.weighingList.grossWeight / 1000 < 85
  845. ) {
  846. this.weighingList.receivableWeighingFee = 450
  847. this.weighingList.actualWeighingFee = 450
  848. } else if (
  849. this.weighingList.grossWeight / 1000 > 85 ||
  850. this.weighingList.grossWeight / 1000 < 95
  851. ) {
  852. this.weighingList.receivableWeighingFee = 480
  853. this.weighingList.actualWeighingFee = 480
  854. } else if (
  855. this.weighingList.grossWeight / 1000 > 95 ||
  856. this.weighingList.grossWeight / 1000 < 105
  857. ) {
  858. this.weighingList.receivableWeighingFee = 500
  859. this.weighingList.actualWeighingFee = 500
  860. } else if (
  861. this.weighingList.grossWeight / 1000 > 105 ||
  862. this.weighingList.grossWeight / 1000 < 120
  863. ) {
  864. this.weighingList.receivableWeighingFee = 540
  865. this.weighingList.actualWeighingFee = 540
  866. }
  867. } else {
  868. this.weighingList.receivableWeighingFee = ''
  869. }
  870. },
  871. tabClick(val) {
  872. this.mListTop = []
  873. this.mListBottom = []
  874. this.pListTop = []
  875. this.pListBottom = []
  876. this.carWeightInfo.carNumber = ''
  877. this.weighingList = []
  878. this.index = val
  879. if (this.information == '皮重') {
  880. this.information = '毛重'
  881. this.tpyeNo = 1
  882. } else {
  883. this.tpyeNo = 2
  884. this.information = '皮重'
  885. }
  886. this.getList()
  887. },
  888. setCurrent(row) {
  889. this.$refs.singleTable.setCurrentRow(row)
  890. },
  891. handleCurrentChange(val) {
  892. this.currentRow = val
  893. this.carWeightInfo = {
  894. carNumber: val.carNumber,
  895. type: this.information,
  896. weight: val.grossWeight,
  897. }
  898. this.weighingList = val
  899. this.paramType = val.qualityInspectionManagement.paramType
  900. },
  901. cancel() {
  902. if (this.reader) {
  903. this.reader.cancel()
  904. }
  905. this.$router.push({
  906. path: 'weighingManagement',
  907. })
  908. },
  909. calculation(status) {
  910. // if (this.weighingList.grossWeight && this.weighingList.tare) {
  911. // this.weighingList.netWeight = this.weighingList.grossWeight - this.weighingList.tare - parseInt(this.weighingList.buckleMiscellaneous)
  912. // this.weighingList.netWeight = this.weighingList.netWeight.toFixed(2)
  913. // }
  914. },
  915. printSmall() {
  916. window.open(
  917. '../../../../static/weightCheck.html?type=1&tableData=' +
  918. JSON.stringify(this.inspect)
  919. )
  920. },
  921. printBig() {
  922. window.open(
  923. '../../../../static/weightCheck.html?type=2&tableData=' +
  924. JSON.stringify(this.inspect)
  925. )
  926. },
  927. opendBtn() {
  928. html2canvas(this.$refs.saveImg.$el).then((canvas) => {
  929. let dataURL = canvas.toDataURL('image/png')
  930. this.imgUrl = dataURL
  931. if (this.imgUrl !== '') {
  932. let b = this.dataURLtoFile(this.imgUrl, 'printImage')
  933. let formdata = new FormData()
  934. formdata.append('file', b)
  935. axios({
  936. method: 'post',
  937. url: 'https://www.zthymaoyi.com/upload/admin',
  938. data: formdata,
  939. }).then((response) => {
  940. //编辑接口
  941. this.weighingList.pictureAddress = response.data.url
  942. tare(this.weighingList)
  943. .toPromise()
  944. .then((response) => {})
  945. })
  946. }
  947. })
  948. },
  949. closeDialog() {
  950. html2canvas(this.$refs.saveImg.$el).then((canvas) => {
  951. let dataURL = canvas.toDataURL('image/png')
  952. this.imgUrl = dataURL
  953. if (this.imgUrl !== '') {
  954. let b = this.dataURLtoFile(this.imgUrl, 'printImage')
  955. let formdata = new FormData()
  956. formdata.append('file', b)
  957. axios({
  958. method: 'post',
  959. url: 'https://www.zthymaoyi.com/upload/admin',
  960. data: formdata,
  961. }).then((response) => {
  962. //编辑接口
  963. this.weighingList.pictureAddress = response.data.url
  964. tare(this.weighingList)
  965. .toPromise()
  966. .then((response) => {})
  967. })
  968. this.dialogTableVisible = true
  969. }
  970. })
  971. this.isShowPrint = false
  972. // this.$router.push({
  973. // path: 'weighingManagement'
  974. // })
  975. },
  976. closePrint() {
  977. this.isShowPrint = false
  978. // this.$router.push({
  979. // path: 'weighingManagement'
  980. // })
  981. },
  982. print() {
  983. if (this.reader) {
  984. this.reader.cancel()
  985. }
  986. if (!this.weighingList.grossWeight) {
  987. this.$message({
  988. message: '毛重不能为空',
  989. type: 'warning',
  990. })
  991. return
  992. }
  993. if (
  994. this.weighingList.grossWeight < 1 ||
  995. this.weighingList.grossWeight > 200000
  996. ) {
  997. this.$message({
  998. message: '毛重输入错误',
  999. type: 'warning',
  1000. })
  1001. return
  1002. }
  1003. if (
  1004. String(this.weighingList.grossWeight).indexOf('.') != -1 &&
  1005. String(this.weighingList.grossWeight).length -
  1006. (String(this.weighingList.grossWeight).indexOf('.') + 1) >
  1007. 1
  1008. ) {
  1009. this.$message({
  1010. message: '毛重输入错误',
  1011. type: 'warning',
  1012. })
  1013. return
  1014. }
  1015. if (this.tpyeNo == 2) {
  1016. if (!this.weighingList.tare) {
  1017. this.$message({
  1018. message: '皮重不能为空',
  1019. type: 'warning',
  1020. })
  1021. return
  1022. }
  1023. if (!this.weighingList.tare) {
  1024. this.$message({
  1025. message: '皮重不能为空',
  1026. type: 'warning',
  1027. })
  1028. return
  1029. }
  1030. if (this.weighingList.tare > this.weighingList.grossWeight) {
  1031. this.$message({
  1032. message: '皮重不能大于毛重',
  1033. type: 'warning',
  1034. })
  1035. return
  1036. }
  1037. if (this.weighingList.tare < 1 || this.weighingList.tare > 100000) {
  1038. this.$message({
  1039. message: '皮重输入错误',
  1040. type: 'warning',
  1041. })
  1042. return
  1043. }
  1044. if (
  1045. String(this.weighingList.tare).indexOf('.') != -1 &&
  1046. String(this.weighingList.tare).length -
  1047. (String(this.weighingList.tare).indexOf('.') + 1) >
  1048. 1
  1049. ) {
  1050. this.$message({
  1051. message: '皮重输入错误',
  1052. type: 'warning',
  1053. })
  1054. return
  1055. }
  1056. if (this.weighingList.netWeight < 0) {
  1057. this.$message({
  1058. message: '净重不能小于0',
  1059. type: 'warning',
  1060. })
  1061. return
  1062. }
  1063. }
  1064. this.$confirm('确定保存检斤信息?', '提示', {
  1065. confirmButtonText: '确定',
  1066. cancelButtonText: '取消',
  1067. type: 'warning',
  1068. })
  1069. .then(() => {
  1070. if (this.tpyeNo == 1) {
  1071. //毛检保存前进行校验
  1072. getamount({
  1073. compId: localStorage.getItem('ws-pf_compId'),
  1074. customerNumberCard: this.weighingList.customerNumberCard,
  1075. goodsName: this.weighingList.goodsName,
  1076. })
  1077. .toPromise()
  1078. .then((response) => {
  1079. for (let i = 0; i < this.purchasePriceList.length; i++) {
  1080. if (
  1081. this.weighingList.goodsName ==
  1082. this.purchasePriceList[i].goodsName
  1083. ) {
  1084. //累计售粮超上限不能完成毛检保存
  1085. let count = (
  1086. this.purchasePriceList[i].saleLimit -
  1087. response / 1000
  1088. ).toFixed(2)
  1089. // console.log(this.weighingList.grossWeight / 1000, '毛重转吨')
  1090. // this.weighingList.grossWeight/=1000
  1091. if (count - this.weighingList.grossWeight / 1000 < 0) {
  1092. this.$alert(
  1093. '该客户累计销售' +
  1094. this.weighingList.goodsName +
  1095. (response / 1000).toFixed(2) +
  1096. '吨,还可售粮' +
  1097. count +
  1098. '吨',
  1099. '提示', {
  1100. confirmButtonText: '确定',
  1101. callback: (action) => {
  1102. this.$message({
  1103. type: 'info',
  1104. message: `累计售粮已超出上限`,
  1105. })
  1106. },
  1107. }
  1108. )
  1109. } else {
  1110. //累计售粮没有超上限完成毛检保存
  1111. // this.weighingList.relationId = this.relationId;
  1112. (this.weighingList.secretaryWeigher =
  1113. localStorage.getItem('ws-pf_staffName')),
  1114. grossWeight(this.weighingList)
  1115. .toPromise()
  1116. .then((response) => {
  1117. if (this.reader) {
  1118. this.reader.cancel()
  1119. }
  1120. this.$notify.success({
  1121. title: '成功',
  1122. message: '保存成功',
  1123. })
  1124. // this.$router.go(-1)
  1125. })
  1126. .catch((response) => {
  1127. // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
  1128. })
  1129. }
  1130. }
  1131. }
  1132. })
  1133. } else if (this.tpyeNo == 2) {
  1134. // this.weighingList.grossWeight/=1000
  1135. // this.weighingList.tare/=1000
  1136. // if(this.weighingList.buckleMiscellaneous){
  1137. // this.weighingList.buckleMiscellaneous/=1000
  1138. // }
  1139. // this.weighingList.netWeight/=1000
  1140. this.weighingList.warehouseId = this.warehouseId;
  1141. (this.weighingList.skinInspector =
  1142. localStorage.getItem('ws-pf_staffName')),
  1143. tare(this.weighingList)
  1144. .toPromise()
  1145. .then((response) => {
  1146. this.idprint = response
  1147. if (this.reader) {
  1148. this.reader.cancel()
  1149. }
  1150. this.isShowPrintType = true
  1151. this.$notify.success({
  1152. title: '成功',
  1153. message: '保存成功',
  1154. })
  1155. })
  1156. .catch((response) => {
  1157. // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
  1158. })
  1159. }
  1160. })
  1161. .catch(() => {
  1162. return false
  1163. })
  1164. },
  1165. },
  1166. }
  1167. </script>
  1168. <style lang="scss" scoped>
  1169. /deep/.el-pagination {
  1170. margin-bottom: 0;
  1171. }
  1172. .center {
  1173. background: #f6f7fc;
  1174. }
  1175. .ws-info-table {
  1176. border: none;
  1177. // height: 610px;
  1178. }
  1179. .ws-info-table .el-form-item {
  1180. width: 100%;
  1181. border: none;
  1182. }
  1183. .formItem {
  1184. width: 100%;
  1185. display: inline;
  1186. }
  1187. /deep/.ws-info-table .el-form-item .el-form-item__label {
  1188. width: 30%;
  1189. text-align: center;
  1190. background: #ffffff;
  1191. font-size: 14px;
  1192. color: #8890b1;
  1193. }
  1194. /deep/.ws-info-table .el-form-item .el-form-item__content {
  1195. border: none;
  1196. }
  1197. .title {
  1198. font-size: 16px;
  1199. font-weight: 600;
  1200. margin: 10px;
  1201. }
  1202. .titleup {
  1203. position: relative;
  1204. }
  1205. .title::before {
  1206. content: '';
  1207. display: inline-block;
  1208. width: 5px;
  1209. height: 15px;
  1210. background: #8890b1;
  1211. margin-right: 5px;
  1212. }
  1213. .substance {
  1214. padding-bottom: 20px;
  1215. overflow-y: scroll;
  1216. .active {
  1217. background: #5878e8;
  1218. color: white;
  1219. }
  1220. // background: #ffffff;
  1221. width: 100%;
  1222. height: calc(100vh - 125px);
  1223. border-radius: 4px;
  1224. margin: 0 auto;
  1225. display: flex;
  1226. .left {
  1227. min-width: 570px;
  1228. position: relative;
  1229. // padding:0 20px 20px 20px;
  1230. .top {
  1231. background: black;
  1232. color: #2aff7c;
  1233. font-size: 32px;
  1234. text-align: right;
  1235. padding: 0 10px 0 20px;
  1236. border-radius: 10px;
  1237. margin: 0 20px 20px 20px;
  1238. position: absolute;
  1239. top: 130px;
  1240. width: 90%;
  1241. .zujian {
  1242. position: relative;
  1243. }
  1244. // .car-type {
  1245. // text-align: left;
  1246. // }
  1247. .kg-style {
  1248. font-size: 30px;
  1249. }
  1250. .confirmInfo {
  1251. display: flex;
  1252. .car-type {
  1253. text-align: left;
  1254. width: 50%;
  1255. }
  1256. .car-no {
  1257. width: 50%;
  1258. text-align: right;
  1259. }
  1260. }
  1261. .confirmWeight {
  1262. display: flex;
  1263. .titleWeight {
  1264. width: 35%;
  1265. text-align: left;
  1266. line-height: 90px;
  1267. }
  1268. .weight {
  1269. width: 65%;
  1270. text-align: right;
  1271. }
  1272. }
  1273. }
  1274. .bottom {
  1275. text-align: center;
  1276. background: white;
  1277. margin: 20px 20px 0 20px;
  1278. border-radius: 10px;
  1279. padding-bottom: 20px;
  1280. .img1,
  1281. .img2 {
  1282. width: 200px;
  1283. padding: 20px;
  1284. }
  1285. .video-content {
  1286. width: 100%;
  1287. }
  1288. }
  1289. }
  1290. .right {
  1291. width: 70%;
  1292. padding: 20px;
  1293. height: 750px;
  1294. background: white;
  1295. border-radius: 10px;
  1296. .tab {
  1297. display: flex;
  1298. .tab-item {
  1299. padding: 5px 10px;
  1300. margin-right: 20px;
  1301. border-radius: 10px;
  1302. }
  1303. }
  1304. .table-title {
  1305. background: red;
  1306. .top {
  1307. display: inline-block;
  1308. width: 48%;
  1309. .top-item {
  1310. display: inline-block;
  1311. }
  1312. }
  1313. }
  1314. .table {
  1315. background: red;
  1316. .table-content {
  1317. background: green;
  1318. display: inline-block;
  1319. width: 50%;
  1320. .table-content-item {
  1321. display: inline-block;
  1322. }
  1323. }
  1324. }
  1325. }
  1326. }
  1327. /deep/.el-table .el-table__header .cell,
  1328. /deep/.el-table .el-table__body .cell {
  1329. text-align: center;
  1330. font-size: 16px;
  1331. // background: #f6f7fc;
  1332. }
  1333. /deep/.el-table td {
  1334. background: #e7e8ef;
  1335. }
  1336. /deep/.el-table--enable-row-transition .el-table__body td {
  1337. text-align: center;
  1338. }
  1339. .bg-left {
  1340. padding-left: 30px;
  1341. }
  1342. .bg-right {
  1343. padding-right: 10px;
  1344. text-align: right;
  1345. }
  1346. .bg-bottom {
  1347. margin: 15px 0px;
  1348. }
  1349. .titleup {
  1350. position: relative;
  1351. }
  1352. .titleup::before {
  1353. content: '';
  1354. display: inline-block;
  1355. width: 5px;
  1356. height: 30px;
  1357. background: #5473e8;
  1358. position: absolute;
  1359. left: 0;
  1360. }
  1361. .but {
  1362. text-align: center;
  1363. margin: 20px auto;
  1364. }
  1365. .butCss {
  1366. opacity: 0;
  1367. }
  1368. /deep/.el-dialog__title {
  1369. font-size: 24px !important;
  1370. }
  1371. /deep/.el-dialog__header {
  1372. text-align: center !important;
  1373. padding: 10px 0 !important;
  1374. height: auto !important;
  1375. }
  1376. .weight {
  1377. font-size: 68px;
  1378. }
  1379. .right-content {
  1380. display: flex;
  1381. .left {
  1382. position: relative;
  1383. .but {
  1384. position: absolute;
  1385. left: 0;
  1386. right: 0;
  1387. margin: auto;
  1388. }
  1389. }
  1390. .left {
  1391. width: 40%;
  1392. }
  1393. .right {
  1394. width: 60%;
  1395. }
  1396. }
  1397. .car-right {
  1398. width: 60%;
  1399. }
  1400. .mask {
  1401. background: black;
  1402. width: 100vw;
  1403. height: 100vh;
  1404. position: fixed;
  1405. top: 0;
  1406. z-index: 99;
  1407. opacity: 0.3;
  1408. }
  1409. .print-type-title {
  1410. text-align: center;
  1411. font-size: 18px;
  1412. margin: 20px;
  1413. }
  1414. .bottom-btn {
  1415. display: flex;
  1416. margin-top: 20px;
  1417. justify-content: space-around;
  1418. }
  1419. .print-type-checkbox {
  1420. // padding-left: 20px;
  1421. }
  1422. .print-type {
  1423. position: absolute;
  1424. top: 0;
  1425. bottom: 0;
  1426. left: 0;
  1427. right: 0;
  1428. margin: auto;
  1429. width: 440px;
  1430. height: 320px;
  1431. background: white;
  1432. border-radius: 10px;
  1433. z-index: 999;
  1434. }
  1435. .sh-address {
  1436. display: flex;
  1437. }
  1438. .print-type-ew {
  1439. display: flex;
  1440. justify-content: space-between;
  1441. padding: 0 20px;
  1442. /deep/.el-radio__label {
  1443. font-size: 14px;
  1444. }
  1445. margin-top: 10px;
  1446. }
  1447. /deep/.el-table .cell {
  1448. text-align: center;
  1449. }
  1450. .shdw-style {
  1451. display: flex;
  1452. justify-content: space-between;
  1453. align-items: center;
  1454. padding: 0 20px;
  1455. margin-top: 20px;
  1456. }
  1457. .ew-print {
  1458. padding: 0 20px;
  1459. margin-top: 10px;
  1460. // display: flex;
  1461. // justify-content: space-between;
  1462. // align-content: center;
  1463. .row {
  1464. display: flex;
  1465. margin-top: 10px;
  1466. align-items: center;
  1467. }
  1468. }
  1469. </style>