warehouseManagementNoWeightOut.vue 50 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449
  1. // 完善出库信息
  2. <template>
  3. <div class="container">
  4. <el-row>
  5. <el-col :span="20">
  6. <h2 class="bg-left title">出库毛重检斤</h2>
  7. </el-col>
  8. <el-col :span="4" class="bg-right">
  9. <el-button class="bg-bottom" type="primary" size="small" @click="revert()"><img width="6" height="10"
  10. style="vertical-align: bottom; margin-right: 3px" src="../../../public/img/lujing.png" alt="" />返回
  11. </el-button>
  12. </el-col>
  13. </el-row>
  14. <ws-form ref="dataList" :model="dataList" :rules="rules">
  15. <div class="basicInformation">
  16. <h2>
  17. {{ this.deptBudgetList1.warehouseName }}库
  18. <span class="position" v-show="this.$route.query.warehouseType == 1">
  19. {{ this.deptBudgetList1.binNumber }}仓位
  20. </span>
  21. <span v-show="this.$route.query.warehouseType == 2"> (临) </span>
  22. </h2>
  23. <div class="small-title">基本信息</div>
  24. <ws-info-table>
  25. <!--任务编号-->
  26. <ws-form-item label="任务编号" span="1" prop="inOutTaskNo">
  27. <el-select filterable clearable v-model="dataList.inOutTaskNo" placeholder="请选择任务编号" class="typeselect"
  28. @change="contractNoChange">
  29. <el-option v-for="item in deptBudgetList2" :key="item.inOutTaskNo" :label="item.inOutTaskNo"
  30. :value="item.inOutTaskNo" />
  31. </el-select>
  32. </ws-form-item>
  33. <ws-form-item label="合同编号" span="1" prop="contractNo">
  34. <ws-select disabled v-model="dataList.contractNo" placeholder="请选择合同编号或移库任务编号" class="typeselect"
  35. @change='contractNoChange'>
  36. <ws-option v-for="item in outContractNo" :key="item.constKey" :label="item.contractNo"
  37. :value="item.contractNo" />
  38. </ws-select>
  39. </ws-form-item>
  40. <!-- 货名 -->
  41. <ws-form-item label="货名" span="1">
  42. <ws-select disabled v-model="dataList.goodsName" placeholder class="typeselect" @change="selectgoodsName">
  43. <ws-option v-for="item in goodnameList" :key="item.constKey" :label="item.constValue"
  44. :value="item.constValue" />
  45. </ws-select>
  46. </ws-form-item>
  47. <ws-form-item label="类型" span="1" prop="type">
  48. <ws-select disabled v-model="dataList.type" @change="typeChange">
  49. <ws-option v-for="item in typeList" :key="item" :label="item" :value="item" />
  50. </ws-select>
  51. </ws-form-item>
  52. <!--毛重(公斤)-->
  53. <ws-form-item label="毛重(公斤)" span="1" prop="grossWeight">
  54. <ws-input :disabled="allowEdit" @input="grossWeightchange" v-model="dataList.grossWeight"
  55. placeholder="请输入毛重" maxlength="20" size="small" />
  56. <el-button type="primary" @click="openPort">重新获取</el-button>
  57. </ws-form-item>
  58. <!--皮重(公斤)-->
  59. <ws-form-item label="皮重(公斤)" span="1" prop="tare" class="readonly">
  60. <ws-input :disabled="allowEdit" @input="tarechange" v-model="dataList.tare" placeholder="请输入皮重"
  61. maxlength="100" size="small" />
  62. </ws-form-item>
  63. <!--净重(公斤)-->
  64. <ws-form-item label="净重(公斤)" span="1" prop="netWeight">
  65. <ws-input readonly="readonly" v-model="dataList.netWeight" placeholder="不可编辑,自动计算" maxlength="120"
  66. size="small" />
  67. </ws-form-item>
  68. <ws-form-item v-if='dataList.type=="潮粮"' label="扣重比" span="1" prop="buckleWeightRatio" class="readonly">
  69. <ws-input @input='pureweight' v-model="dataList.buckleWeightRatio" placeholder="请输入扣重比" maxlength="100"
  70. size="small" />
  71. </ws-form-item>
  72. <ws-form-item v-if='dataList.type=="潮粮"' label="干粮水分占比" span="1" prop="solidGrainWater" class="readonly">
  73. <ws-input @input='pureweight' v-model="dataList.solidGrainWater" placeholder="请输入干粮水分占比" maxlength="100"
  74. size="small" />
  75. </ws-form-item>
  76. <ws-form-item v-if='dataList.type=="潮粮"' label="潮粮水分占比" span="1" prop="tidalGrainWater" class="readonly">
  77. <ws-input @input='pureweight' v-model="dataList.tidalGrainWater" placeholder="请输入潮粮水分占比" maxlength="100"
  78. size="small" />
  79. </ws-form-item>
  80. <ws-form-item v-if='dataList.type=="潮粮"' label="纯重" span="1" prop="pureWeight" class="readonly">
  81. <ws-input disabled v-model="dataList.pureWeight" placeholder="不可编辑,自动计算" maxlength="100" size="small" />
  82. </ws-form-item>
  83. <!-- 品级 -->
  84. <ws-form-item label="品级" span="1" class="readonly">
  85. <ws-select v-model="dataList.grade" placeholder="" class="typeselect" @change="selectpackingMethod">
  86. <ws-option v-for="item in gradeList" :key="item.constKey" :label="item.constValue"
  87. :value="item.constValue" />
  88. </ws-select>
  89. </ws-form-item>
  90. <!--经办人-->
  91. <ws-form-item label="经办人" span="1" prop="agent">
  92. <el-select v-model="dataList.agent" placeholder="请选择经办人" filterable clearable @change="selectstaff">
  93. <el-option v-for="item in options" :key="item.value" :label="item.staffName" :value="item.staffName" />
  94. </el-select>
  95. </ws-form-item>
  96. <!--出库日期-->
  97. <ws-form-item label="出库日期" span="1" prop="inOutDate" class="deliverydate">
  98. <ws-date-picker v-model="dataList.inOutDate" type="date" placeholder="请选择出库日期" value-format="yyyy-MM-dd" />
  99. </ws-form-item>
  100. <!-- 出库类型 -->
  101. <ws-form-item label="出库类型" span="1">
  102. <ws-select v-model="dataList.inOutType" placeholder="" class="typeselect" @change="selectstorageType">
  103. <ws-option v-for="item in deliveryType" :key="item.constKey" :label="item.constValue"
  104. :value="item.constValue" />
  105. </ws-select>
  106. </ws-form-item>
  107. <!--车牌号-->
  108. <ws-form-item label="车牌号" span="1" prop="carNo">
  109. <ws-input v-if="!carstatus" v-model="dataList.carNo" placeholder="请输入车牌号" maxlength="20" size="small" />
  110. <el-select v-if="carstatus" filterable clearable :filter-method="dataFilter2" v-model="deptBudgetList.carNo"
  111. placeholder="请选择车牌号" class="typeselect" @change="carChange">
  112. <el-option v-for="item in options2" :key="item.constKey" :label="item.carNo + '(' + item.tranCarNo + ')'"
  113. :value="item.carNo" />
  114. </el-select>
  115. </ws-form-item>
  116. <ws-form-item label="箱号-1" span="1" prop="boxNo">
  117. <ws-input v-model="dataList.boxNo" placeholder="请输入箱号" maxlength="20"
  118. size="small" />
  119. </ws-form-item>
  120. <ws-form-item label="箱号-2" span="1" prop="boxNoOther">
  121. <ws-input v-model="dataList.boxNoOther" placeholder="请输入箱号" maxlength="20"
  122. size="small" />
  123. </ws-form-item>
  124. <ws-form-item label="封号-1" span="1" prop="titleNo">
  125. <ws-input v-model="dataList.titleNo" placeholder="请输入封号" maxlength="20"
  126. size="small" />
  127. </ws-form-item>
  128. <ws-form-item label="封号-2" span="1" prop="titleNoOther">
  129. <ws-input v-model="dataList.titleNoOther" placeholder="请输入封号" maxlength="20"
  130. size="small" />
  131. </ws-form-item>
  132. </ws-info-table>
  133. </div>
  134. <!-- <div class="small-title">上传磅单照片</div>
  135. <el-upload
  136. action="https://www.zthymaoyi.com/upload/admin"
  137. :show-file-list="false"
  138. :on-success="
  139. (res) => {
  140. uploadSuccessHandle1(res)
  141. }
  142. "
  143. class="avatar-uploader"
  144. accept=".jpg, .jpeg, .png, .gif"
  145. ><el-button size="small" type="primary">点击上传</el-button>
  146. </el-upload>
  147. <div v-if='dataList.addressUrl!=""'>
  148. <img style='width:100px;height:100px;' :src="dataList.addressUrl" alt="">
  149. </div> -->
  150. <div class="small-title">化验数据(选填)</div>
  151. <div class="inspector">
  152. <!--质检员-->
  153. <!-- <ws-form-item label="质检员" span="1" prop="qualityInspector">
  154. <ws-input
  155. v-model="dataList.warehouseInOutDetail.qualityInspector"
  156. placeholder="请输入质检员姓名"
  157. maxlength="120"
  158. size="small"
  159. />
  160. </ws-form-item> -->
  161. <ws-form-item label="质检员" span="1" prop="qualityInspector">
  162. <el-select v-model="dataList.warehouseInOutDetail.qualityInspector" placeholder="请选择质检员" filterable clearable>
  163. <el-option v-for="item in qualityInspectorList" :key="item.value" :label="item.staffName"
  164. :value="item.staffName" />
  165. </el-select>
  166. </ws-form-item>
  167. </div>
  168. <div class="neifor">
  169. <ws-info-table>
  170. <!--水分(%)<=-->
  171. <ws-form-item label="水分(%)<=" span="1" prop="waterContent">
  172. <ws-input v-model="dataList.warehouseInOutDetail.waterContent" placeholder="请输入水分占比" maxlength="120"
  173. size="small" />
  174. </ws-form-item>
  175. <!--杂质(%)<=-->
  176. <ws-form-item label="杂质(%)<=" span="1" prop="impurity">
  177. <ws-input v-model="dataList.warehouseInOutDetail.impurity" placeholder="请输入杂质占比" maxlength="120"
  178. size="small" />
  179. </ws-form-item>
  180. <!--容重(克/升)>=-->
  181. <ws-form-item label="容重(克/升)>=" span="1" prop="bulkDensity">
  182. <ws-input v-model="dataList.warehouseInOutDetail.bulkDensity" placeholder="请输入容重" maxlength="120"
  183. size="small" />
  184. </ws-form-item>
  185. <!--霉变粒(%)<=-->
  186. <ws-form-item label="霉变粒(%)<=" span="1" prop="mildewGrain">
  187. <ws-input v-model="dataList.warehouseInOutDetail.mildewGrain" placeholder="请输入霉变粒占比" maxlength="120"
  188. size="small" />
  189. </ws-form-item>
  190. <!--热损伤(%)<=-->
  191. <ws-form-item label="热损伤(%)<=" span="1" prop="jiaorenli">
  192. <ws-input v-model="dataList.warehouseInOutDetail.jiaorenli" placeholder="请输入热损伤占比" maxlength="120"
  193. size="small" />
  194. </ws-form-item>
  195. <!--不完善粒(%)<=-->
  196. <ws-form-item label="不完善粒(%)<=" span="1" prop="imperfectGrain">
  197. <ws-input v-model="dataList.warehouseInOutDetail.imperfectGrain" placeholder="请输入不完善粒占比" maxlength="120"
  198. size="small" />
  199. </ws-form-item>
  200. </ws-info-table>
  201. </div>
  202. <div style="text-align: right; padding: 10px">
  203. <!-- <el-button
  204. class="bg-bottom-up"
  205. type="primary"
  206. size="small"
  207. @click="temporaryStorage()"
  208. >暂存</el-button
  209. > -->
  210. <el-button class="bg-bottom-up" type="primary" size="small" @click="submit()">提交</el-button>
  211. </div>
  212. </ws-form>
  213. </div>
  214. </template>
  215. <script>
  216. import {
  217. pullDown,
  218. addstorageputList,
  219. xialaNo,
  220. getstaff,
  221. getPrintInfo,
  222. getReceiptTaskNo
  223. } from '@/model/warehouse/index'
  224. import {
  225. downloadFile
  226. } from '@/utils/batchDown'
  227. import Pagination from '@/components/Pagination'
  228. import WsUpload from '@/components/WsUpload'
  229. import {
  230. mapActions,
  231. mapGetters,
  232. mapState
  233. } from 'vuex'
  234. // import { dayjs, fmoney, EventBus } from 'base-core-lib'
  235. import {
  236. dayjs,
  237. EventBus
  238. } from 'base-core-lib'
  239. export default {
  240. name: 'viewSpareMoney',
  241. components: {
  242. WsUpload,
  243. Pagination,
  244. },
  245. watch: {
  246. isShow(val) {
  247. this.showType = val
  248. },
  249. dataList: { //深度监听,可监听到对象、数组的变化
  250. handler(val, oldVal) {
  251. if (val.grossWeight) {
  252. this.dataList.netWeight = val.grossWeight - this.dataList.tare
  253. }
  254. },
  255. deep: true //true 深度监听
  256. }
  257. },
  258. computed: {
  259. ...mapGetters(['deptBudgetList']),
  260. },
  261. data() {
  262. return {
  263. deptBudgetList2: [],
  264. //弹出框
  265. dialogViewSpareMoney: false,
  266. dialogApproveFormVisible: false,
  267. // 船舶类型
  268. monetaryKey: null,
  269. // 表格显示数据
  270. tableDate: [],
  271. // 是否显示
  272. showType: true,
  273. // 年
  274. year: '',
  275. readonly: true,
  276. typeList: ['干粮', '潮粮'],
  277. qualityInspectorList: [],
  278. deptBudgetTotal: 0,
  279. currentPage: 1,
  280. pageSize: 10,
  281. searchType: 1,
  282. searchKeyWord: '',
  283. contractType: 2,
  284. startDate: null,
  285. endDate: null,
  286. goodnameList: {},
  287. tranCarInfoList: [],
  288. staffList: [],
  289. options: [],
  290. options1: [],
  291. options2: [],
  292. carstatus: false,
  293. storageType: [],
  294. deliveryType: [],
  295. outContractNo: [],
  296. // 提交类型
  297. submitType: true,
  298. storageType: [],
  299. appendixIdsAdd: '',
  300. uploadSuccess: {},
  301. onChange: {},
  302. deptBudgetList1: [],
  303. gradeList: [],
  304. rules: {
  305. netWeight: [{
  306. required: true,
  307. type: 'number',
  308. message: '请输入活动名称',
  309. trigger: 'blur',
  310. }, ],
  311. },
  312. size: 10,
  313. compId: localStorage.getItem('ws-pf_compId'),
  314. secretaryWeigher: localStorage.getItem('ws-pf_staffName'),
  315. deptCircularPage: {},
  316. packtypeList: {},
  317. date: {
  318. year: dayjs().format('YYYY'),
  319. month: dayjs().format('MM'),
  320. },
  321. contractList: [],
  322. dataList: {
  323. id: '',
  324. grossWeight: '',
  325. contractNo: '',
  326. tare: '',
  327. netWeight: '',
  328. grade: '',
  329. agent: '',
  330. carNo: '',
  331. inOutDate: '',
  332. inOutType: '',
  333. goodsName: '',
  334. warehouseInOutDetail: {
  335. qualityInspector: ''
  336. },
  337. cost: '',
  338. freight: 0,
  339. type: '',
  340. addressUrl: '',
  341. buckleWeightRatio: '',
  342. tidalGrainWater: '',
  343. solidGrainWater: '',
  344. pureWeight: '',
  345. deductionAmount: '',
  346. deductionWeigh: '',
  347. },
  348. historyList: [],
  349. pickerBeginDateBefore: {
  350. disabledDate: (time) => {
  351. return time.getTime() > Date.now()
  352. },
  353. },
  354. accessoryTFs: false,
  355. param: 9600,
  356. allowEdit: true,
  357. result1: '00'
  358. }
  359. },
  360. activated() {
  361. if (this.$route.query.allowEdit == 1) {
  362. this.allowEdit = false
  363. } else {
  364. this.allowEdit = true
  365. }
  366. this.deptBudgetList1.warehouseName = this.$route.query.warehouseName
  367. this.deptBudgetList1.binNumber = this.$route.query.binNumber
  368. this.getList()
  369. this.dataList.id = this.$route.query.id
  370. this.dataList.grossWeight = Math.round(this.$route.query.grossWeight * 1000)
  371. this.dataList.contractNo = this.$route.query.contractNo
  372. this.dataList.baseId = this.$route.query.baseId
  373. this.dataList.positionId = this.$route.query.positionId
  374. this.dataList.warehouseName = this.$route.query.warehouseName
  375. this.dataList.binNumber = this.$route.query.binNumber
  376. this.dataList.tare = Math.round(this.$route.query.tare * 1000)
  377. this.dataList.netWeight = Math.round(this.$route.query.netWeight * 1000)
  378. this.dataList.grade = this.$route.query.grade
  379. this.dataList.agent = this.$route.query.agent
  380. this.dataList.carNo = this.$route.query.carNo
  381. this.dataList.inOutDate = this.$route.query.inOutDate
  382. this.dataList.contractNo = this.$route.query.contractNo
  383. this.dataList.inOutType = this.$route.query.inOutType
  384. this.dataList.compId = this.$route.query.compId
  385. this.dataList.goodsName = this.$route.query.goodsName
  386. this.dataList.goodsNameKey = Number(this.$route.query.goodsNameKey)
  387. this.dataList.inOutFlag = this.$route.inOutFlag
  388. this.dataList.inOutTypeKey = Number(this.$route.query.inOutTypeKey)
  389. this.dataList.statusFlag = this.$route.statusFlag
  390. this.dataList.warehouseInOutDetail = this.$route.query.warehouseInOutDetail
  391. console.log(this.dataList)
  392. getReceiptTaskNo().toPromise()
  393. .then((response) => {
  394. console.log(response)
  395. this.deptBudgetList2 = response
  396. })
  397. },
  398. methods: {
  399. async closePort() {
  400. console.log('closePort');
  401. this.reader.cancel()
  402. },
  403. async openPort() {
  404. console.log('openPort', navigator);
  405. if ('serial' in navigator) {
  406. // The Web Serial API is supported.
  407. console.log('the Web Serial API is supported.');
  408. console.log(this.param);
  409. const port = await navigator.serial.requestPort();
  410. await port.open({
  411. baudRate: this.param
  412. }); // set baud rate
  413. this.reader = port.readable.getReader();
  414. // 监听来自串行设备的数据
  415. while (true) {
  416. const {
  417. value,
  418. done
  419. } = await this.reader.read();
  420. // console.log("value",value);
  421. if (done) {
  422. // 允许稍后关闭串口。
  423. this.reader.releaseLock();
  424. break;
  425. }
  426. var result = '';
  427. //2。获取16进制字符串
  428. // var receData = HexConvert.ByteToString(value);
  429. // console.log("receData",receData);
  430. var flag = false;
  431. var flag1 = false;
  432. // for (var i = 0; i < value.length; i++) {
  433. // var tmp = String.fromCharCode(value[i])
  434. // if (tmp == '+') {
  435. // flag = true
  436. // }
  437. // if (flag && result.length < 6 && tmp != '+') {
  438. // result += tmp
  439. // }
  440. // }
  441. // if(parseInt(result)){
  442. // this.dataList.grossWeight = parseInt(result)
  443. // }
  444. if (this.deptBudgetList1.warehouseName && (this.deptBudgetList.warehouseName == '山东诸城迈饶库' || this
  445. .deptBudgetList1.warehouseName == '克东千红库' || this.deptBudgetList1.warehouseName == '鲅鱼圈祥腾库')) {
  446. for (var i = 0; i < value.length; i++) {
  447. var tmp = String.fromCharCode(value[i])
  448. if (tmp == '+') {
  449. flag = true
  450. }
  451. if (flag && result.length < 6 && tmp != '+') {
  452. result += tmp
  453. }
  454. }
  455. if (parseInt(result) || parseInt(result) == 0) {
  456. this.dataList.grossWeight = parseInt(result)
  457. }
  458. }
  459. else if (this.deptBudgetList1.warehouseName && (this.deptBudgetList1.warehouseName == '顺城粮库'||this.deptBudgetList1.warehouseName == '鲅鱼圈金信库')) {
  460. for (var i = value.length - 1; i >= 0; i--) {
  461. var tmp = String.fromCharCode(value[i])
  462. console.log(tmp)
  463. if (String.fromCharCode(value[0]) == '.') {
  464. flag = true
  465. }
  466. if (flag && result.length < 9 && tmp != '='&& tmp != '.') {
  467. result += tmp
  468. }
  469. }
  470. if (parseInt(result) || parseInt(result) == 0) {
  471. this.dataList.grossWeight = parseInt(result)
  472. }
  473. }
  474. else {
  475. for (var i = 0; i < value.length; i++) {
  476. var tmp = String.fromCharCode(value[i])
  477. if ((value[0] != 49 && value[0] != 2)) {
  478. if ((value[value.length - 1] == 48 && value[value.length - 2] == 48)) {
  479. flag1 = true
  480. } else {
  481. break
  482. }
  483. }
  484. if (tmp == String.fromCharCode(32)) {
  485. flag = true
  486. }
  487. if (flag && result.length < 7 && tmp != String.fromCharCode(32) && !(value[value.length - 1] == 48 &&
  488. value[value.length - 2] == 48)) {
  489. result += tmp
  490. }
  491. if (flag1 && tmp != String.fromCharCode(32)) {
  492. if ((value[value.length - 1] == 48 && value[value.length - 2] == 48)) {
  493. if (i == 0) {
  494. this.result1 = tmp + '0'
  495. }
  496. }
  497. }
  498. }
  499. if (parseInt(result) || parseInt(result) == 0) {
  500. this.dataList.grossWeight = parseInt(result + this.result1)
  501. }
  502. }
  503. // setTimeout(1000)
  504. // value 是一个 Uint8Array
  505. }
  506. await port.close();
  507. } else {
  508. console.log('the Web Serial API is not supported.', navigator);
  509. }
  510. },
  511. pureweight(status) {
  512. console.log(this.deptBudgetList)
  513. if (this.deptBudgetList.netWeight && this.deptBudgetList.tidalGrainWater && this.deptBudgetList
  514. .solidGrainWater && this.deptBudgetList.buckleWeightRatio) {
  515. this.deptBudgetList.pureWeight = (this.deptBudgetList.netWeight * (100 - (this.deptBudgetList
  516. .tidalGrainWater - this.deptBudgetList.solidGrainWater) * this.deptBudgetList.buckleWeightRatio)) / 100
  517. }
  518. },
  519. uploadSuccessHandle1(res) {
  520. this.dataList.addressUrl = res.url
  521. },
  522. //返回按钮
  523. revert() {
  524. this.$router.go(-1)
  525. },
  526. dataFilter(val) {
  527. // console.log(val,"名")
  528. this.deptBudgetList.staffList = val
  529. if (val) {
  530. //val存在
  531. this.options = this.staffList.filter((item) => {
  532. if (
  533. !!~item.staffName.indexOf(val) ||
  534. !!~item.staffName.toUpperCase().indexOf(val.toUpperCase())
  535. ) {
  536. return true
  537. }
  538. })
  539. } else {
  540. //val为空时,还原数组
  541. this.options = this.staffList
  542. }
  543. },
  544. selectstaff(e) {
  545. for (var i = 0; i < this.staffList.length; i++) {
  546. if (this.staffList[i].staffName == e) {
  547. this.deptBudgetList.personChargeKey = this.staffList[i].staffId
  548. }
  549. }
  550. },
  551. //暂存按钮
  552. temporaryStorage() {
  553. this.$confirm(`暂存后可在待完成页面查看,确定暂存`, {
  554. cancelButtonText: '取消',
  555. confirmButtonText: '确定',
  556. type: 'warning',
  557. })
  558. .then(() => {
  559. this.$refs.dataList.validate((valid) => {
  560. if (valid) {
  561. this.dataList.compId = localStorage.getItem('ws-pf_compId')
  562. this.dataList.inOutFlag = 1
  563. this.dataList.statusFlag = 1
  564. addstorageputList(this.dataList)
  565. .toPromise()
  566. .then((response) => {
  567. this.$message.success('暂存成功')
  568. this.$router.push({
  569. path: 'warehouseManagementList'
  570. })
  571. })
  572. } else {
  573. EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
  574. return false
  575. }
  576. })
  577. })
  578. .catch(() => {
  579. return false
  580. })
  581. },
  582. contractNoChange(e) {
  583. for (let i = 0; i < this.deptBudgetList2.length; i++) {
  584. if (this.deptBudgetList2[i].inOutTaskNo == e) {
  585. var data=this.deptBudgetList2[i]
  586. this.dataList.contractNo = this.deptBudgetList2[i].contractNo
  587. }
  588. }
  589. for (var i = 0; i < this.outContractNo.length; i++) {
  590. if (this.outContractNo[i].contractNo == e) {
  591. if (this.outContractNo[i].inOutType == '销售出库') {
  592. this.deptBudgetList.tips='买方'+this.outContractNo[i].buyer
  593. this.deptBudgetList.inOutTypeKey = 1
  594. } else if (this.outContractNo[i].inOutType == '移库出库') {
  595. this.deptBudgetList.tips='出货库'+data.warehouseName
  596. this.deptBudgetList.inOutTypeKey = 3
  597. } else if (this.outContractNo[i].inOutType == '暂存入库') {
  598. this.deptBudgetList.inOutTypeKey = 4
  599. } else if (this.outContractNo[i].inOutType == '贸易服务出库') {
  600. this.deptBudgetList.inOutTypeKey = 5
  601. } else if (this.outContractNo[i].inOutType == '采购出库') {
  602. this.deptBudgetList.inOutTypeKey = 6
  603. }
  604. this.dataList.goodsName = this.outContractNo[i].goodsName
  605. this.dataList.goodsNameKey = this.outContractNo[i].goodsNameKey
  606. if (this.outContractNo[i].deliverType == '1') {
  607. this.carstatus = true
  608. } else {
  609. this.carstatus = false
  610. }
  611. if (this.outContractNo[i].tranCarInfoList) {
  612. this.options2 = this.outContractNo[i].tranCarInfoList
  613. this.tranCarInfoList = this.outContractNo[i].tranCarInfoList
  614. // this.carstatus = true
  615. }
  616. }
  617. }
  618. },
  619. contractNoChange1(e) {
  620. for (var i = 0; i < this.outContractNo.length; i++) {
  621. if (this.outContractNo[i].contractNo == e) {
  622. if (this.outContractNo[i].inOutType == '销售出库') {
  623. this.deptBudgetList.inOutTypeKey = 1
  624. } else if (this.outContractNo[i].inOutType == '移库出库') {
  625. this.deptBudgetList.inOutTypeKey = 3
  626. } else if (this.outContractNo[i].inOutType == '暂存入库') {
  627. this.deptBudgetList.inOutTypeKey = 4
  628. } else if (this.outContractNo[i].inOutType == '贸易服务出库') {
  629. this.deptBudgetList.inOutTypeKey = 5
  630. } else if (this.detailData.inOutType == '采购出库') {
  631. this.deptBudgetList.inOutTypeKey = 6
  632. }
  633. this.dataList.goodsName = this.outContractNo[i].goodsName
  634. this.dataList.goodsNameKey = this.outContractNo[i].goodsNameKey
  635. if (this.outContractNo[i].deliverType == '1') {
  636. this.carstatus = true
  637. } else {
  638. this.carstatus = false
  639. }
  640. if (this.outContractNo[i].tranCarInfoList) {
  641. this.options2 = this.outContractNo[i].tranCarInfoList
  642. this.tranCarInfoList = this.outContractNo[i].tranCarInfoList
  643. // this.carstatus = true
  644. }
  645. }
  646. }
  647. },
  648. typeChange(e) {
  649. },
  650. //提交按钮
  651. submit() {
  652. if (!this.dataList.goodsName) {
  653. this.$message({
  654. message: '货名不能为空',
  655. type: 'warning',
  656. })
  657. return
  658. }
  659. if (!this.dataList.grossWeight) {
  660. this.$message({
  661. message: '毛重不能为空',
  662. type: 'warning',
  663. })
  664. return
  665. }
  666. if (
  667. this.dataList.grossWeight <= 0 ||
  668. this.dataList.grossWeight > 200000 ||
  669. (String(this.dataList.grossWeight).indexOf('.') != -1 &&
  670. String(this.dataList.grossWeight).length -
  671. (String(this.dataList.grossWeight).indexOf('.') + 1) >
  672. 3)
  673. ) {
  674. this.$message({
  675. message: '毛重输入错误',
  676. type: 'warning',
  677. })
  678. return
  679. }
  680. if (
  681. this.dataList.tare < 0 ||
  682. this.dataList.tare > 200000 ||
  683. (String(this.dataList.tare).indexOf('.') != -1 &&
  684. String(this.dataList.tare).length -
  685. (String(this.dataList.tare).indexOf('.') + 1) >
  686. 3)
  687. ) {
  688. this.$message({
  689. message: '皮重输入错误',
  690. type: 'warning',
  691. })
  692. return
  693. }
  694. if (this.dataList.type == '潮粮' && !this.dataList.buckleWeightRatio) {
  695. this.$message({
  696. message: '扣重比不能为空',
  697. type: 'warning'
  698. })
  699. return
  700. }
  701. if (
  702. this.dataList.type == '潮粮' && this.dataList.buckleWeightRatio < 0 ||
  703. this.dataList.type == '潮粮' && this.dataList.buckleWeightRatio > 3 ||
  704. (this.dataList.type == '潮粮' && String(this.dataList.buckleWeightRatio).indexOf('.') != -1 &&
  705. String(this.dataList.buckleWeightRatio).length -
  706. (String(this.dataList.buckleWeightRatio).indexOf('.') + 1) >
  707. 2)
  708. ) {
  709. this.$message({
  710. message: '扣重比输入错误',
  711. type: 'warning'
  712. })
  713. return
  714. }
  715. if (this.dataList.type == '潮粮' && !this.dataList.tidalGrainWater) {
  716. this.$message({
  717. message: '潮粮水分不能为空',
  718. type: 'warning'
  719. })
  720. return
  721. }
  722. if (
  723. this.dataList.type == '潮粮' && this.dataList.tidalGrainWater < 1 ||
  724. this.dataList.type == '潮粮' && this.dataList.tidalGrainWater > 40 ||
  725. (this.dataList.type == '潮粮' && String(this.dataList.tidalGrainWater).indexOf('.') != -1 &&
  726. String(this.dataList.tidalGrainWater).length -
  727. (String(this.dataList.tidalGrainWater).indexOf('.') + 1) >
  728. 2)
  729. ) {
  730. this.$message({
  731. message: '潮粮水分输入错误',
  732. type: 'warning'
  733. })
  734. return
  735. }
  736. if (this.dataList.type == '潮粮' && !this.dataList.solidGrainWater) {
  737. this.$message({
  738. message: '干粮水分不能为空',
  739. type: 'warning'
  740. })
  741. return
  742. }
  743. if (
  744. this.dataList.type == '潮粮' && this.dataList.solidGrainWater < 1 ||
  745. this.dataList.type == '潮粮' && this.dataList.solidGrainWater > 40 ||
  746. (this.dataList.type == '潮粮' && String(this.dataList.solidGrainWater).indexOf('.') != -1 &&
  747. String(this.dataList.solidGrainWater).length -
  748. (String(this.dataList.solidGrainWater).indexOf('.') + 1) >
  749. 1)
  750. ) {
  751. this.$message({
  752. message: '干粮水分输入错误',
  753. type: 'warning'
  754. })
  755. return
  756. }
  757. if (!this.dataList.agent) {
  758. this.$message({
  759. message: '经办人不能为空',
  760. type: 'warning',
  761. })
  762. return
  763. }
  764. if (this.dataList.agent.length < 2 || this.dataList.agent.length > 10) {
  765. this.$message({
  766. message: '经办人输入有误',
  767. type: 'warning',
  768. })
  769. return
  770. }
  771. if (!this.dataList.grade) {
  772. this.$message({
  773. message: '品级不能为空!',
  774. type: 'warning',
  775. })
  776. return
  777. }
  778. if (!this.dataList.inOutDate) {
  779. this.$message({
  780. message: '入库日期不能为空!',
  781. type: 'warning',
  782. })
  783. return
  784. }
  785. if (!this.dataList.inOutType) {
  786. this.$message({
  787. message: '出库类型不能为空!',
  788. type: 'warning',
  789. })
  790. return
  791. }
  792. if (!this.dataList.carNo) {
  793. this.$message({
  794. message: '车牌号不能为空',
  795. type: 'warning',
  796. })
  797. return
  798. }
  799. if (this.dataList.carNo.length > 7) {
  800. this.$message({
  801. message: '车牌号输入错误,请输入7个字符之内',
  802. type: 'warning',
  803. })
  804. return
  805. }
  806. if (this.dataList.boxNo&&this.dataList.boxNo.length > 20) {
  807. this.$message({
  808. message: '箱号-1输入错误',
  809. type: 'warning',
  810. })
  811. return
  812. }
  813. if (this.dataList.boxNoOther&&this.dataList.boxNoOther.length > 20) {
  814. this.$message({
  815. message: '箱号-2输入错误',
  816. type: 'warning',
  817. })
  818. return
  819. }
  820. if (this.dataList.titleNo&&this.dataList.titleNo.length > 20) {
  821. this.$message({
  822. message: '封号-1输入错误',
  823. type: 'warning',
  824. })
  825. return
  826. }
  827. if (this.dataList.titleNoOther&&this.dataList.titleNoOther.length > 20) {
  828. this.$message({
  829. message: '封号-2输入错误',
  830. type: 'warning',
  831. })
  832. return
  833. }
  834. if (!this.dataList.contractNo) {
  835. this.$message({
  836. message: '合同编号不能为空',
  837. type: 'warning',
  838. })
  839. return
  840. }
  841. // if (
  842. // this.dataList.contractNo.length < 6 ||
  843. // this.dataList.contractNo.length > 20
  844. // ) {
  845. // this.$message({
  846. // message: '合同编号长度不符合要求,请输入6-20个字符之内',
  847. // type: 'warning',
  848. // })
  849. // return
  850. // }
  851. if (this.dataList.netWeight > this.$route.query.capacity) {
  852. this.$message({
  853. message: '入库量大于该仓库容量!',
  854. type: 'warning',
  855. })
  856. return
  857. }
  858. //自检员
  859. if (this.dataList.warehouseInOutDetail.qualityInspector) {
  860. if (
  861. this.dataList.warehouseInOutDetail.qualityInspector.length < 2 ||
  862. this.dataList.warehouseInOutDetail.qualityInspector.length > 10
  863. ) {
  864. this.$message({
  865. message: '质检员姓名长度错误!',
  866. type: 'warning',
  867. })
  868. return
  869. }
  870. }
  871. if (this.dataList.warehouseInOutDetail.waterContent) {
  872. if (isNaN(this.dataList.warehouseInOutDetail.waterContent)) {
  873. this.$message({
  874. message: '水分(%)非数字!',
  875. type: 'warning',
  876. })
  877. return
  878. }
  879. if (
  880. this.dataList.warehouseInOutDetail.waterContent < 1 ||
  881. this.dataList.warehouseInOutDetail.waterContent > 40 ||
  882. (String(this.dataList.warehouseInOutDetail.waterContent).indexOf(
  883. '.'
  884. ) != -1 &&
  885. String(this.dataList.warehouseInOutDetail.waterContent).length -
  886. (String(this.dataList.warehouseInOutDetail.waterContent).indexOf(
  887. '.'
  888. ) +
  889. 1) >
  890. 2)
  891. ) {
  892. this.$message({
  893. message: '水分(%)输入错误! 取值范围1-40之间且可以保留2小数',
  894. type: 'warning',
  895. })
  896. return
  897. }
  898. }
  899. //杂质
  900. if (this.dataList.warehouseInOutDetail.impurity) {
  901. if (isNaN(this.dataList.warehouseInOutDetail.impurity)) {
  902. this.$message({
  903. message: '杂质(%)非数字!',
  904. type: 'warning',
  905. })
  906. return
  907. }
  908. if (
  909. this.dataList.warehouseInOutDetail.impurity < 1 ||
  910. this.dataList.warehouseInOutDetail.impurity > 40 ||
  911. (String(this.dataList.warehouseInOutDetail.impurity).indexOf('.') !=
  912. -1 &&
  913. String(this.dataList.warehouseInOutDetail.impurity).length -
  914. (String(this.dataList.warehouseInOutDetail.impurity).indexOf(
  915. '.'
  916. ) +
  917. 1) >
  918. 2)
  919. ) {
  920. this.$message({
  921. message: '杂质(%)输入错误! 取值范围1-40之间且可以保留2小数',
  922. type: 'warning',
  923. })
  924. return
  925. }
  926. }
  927. //霉变
  928. if (this.dataList.warehouseInOutDetail.mildewGrain) {
  929. if (isNaN(this.dataList.warehouseInOutDetail.mildewGrain)) {
  930. this.$message({
  931. message: '霉变粒(%)非数字!',
  932. type: 'warning',
  933. })
  934. return
  935. }
  936. if (
  937. this.dataList.warehouseInOutDetail.mildewGrain < 1 ||
  938. this.dataList.warehouseInOutDetail.mildewGrain > 40 ||
  939. (String(this.dataList.warehouseInOutDetail.mildewGrain).indexOf(
  940. '.'
  941. ) != -1 &&
  942. String(this.dataList.warehouseInOutDetail.mildewGrain).length -
  943. (String(this.dataList.warehouseInOutDetail.mildewGrain).indexOf(
  944. '.'
  945. ) +
  946. 1) >
  947. 2)
  948. ) {
  949. this.$message({
  950. message: '霉变粒(%)输入错误! 取值范围1-40之间且可以保留2小数',
  951. type: 'warning',
  952. })
  953. return
  954. }
  955. }
  956. //热损伤
  957. if (this.dataList.warehouseInOutDetail.jiaorenli) {
  958. if (isNaN(this.dataList.warehouseInOutDetail.jiaorenli)) {
  959. this.$message({
  960. message: '热损伤(%)非数字!',
  961. type: 'warning',
  962. })
  963. return
  964. }
  965. if (
  966. this.dataList.warehouseInOutDetail.jiaorenli < 1 ||
  967. this.dataList.warehouseInOutDetail.jiaorenli > 40 ||
  968. (String(this.dataList.warehouseInOutDetail.jiaorenli).indexOf('.') !=
  969. -1 &&
  970. String(this.dataList.warehouseInOutDetail.jiaorenli).length -
  971. (String(this.dataList.warehouseInOutDetail.jiaorenli).indexOf(
  972. '.'
  973. ) +
  974. 1) >
  975. 2)
  976. ) {
  977. this.$message({
  978. message: '热损伤(%)输入错误! 取值范围1-40之间且可以保留2小数',
  979. type: 'warning',
  980. })
  981. return
  982. }
  983. }
  984. //不完善粒(%)
  985. if (this.dataList.warehouseInOutDetail.imperfectGrain) {
  986. if (isNaN(this.dataList.warehouseInOutDetail.imperfectGrain)) {
  987. this.$message({
  988. message: '不完善粒(%)非数字!',
  989. type: 'warning',
  990. })
  991. return
  992. }
  993. if (
  994. this.dataList.warehouseInOutDetail.imperfectGrain < 1 ||
  995. this.dataList.warehouseInOutDetail.imperfectGrain > 40 ||
  996. (String(this.dataList.warehouseInOutDetail.imperfectGrain).indexOf(
  997. '.'
  998. ) != -1 &&
  999. String(this.dataList.warehouseInOutDetail.imperfectGrain).length -
  1000. (String(
  1001. this.dataList.warehouseInOutDetail.imperfectGrain
  1002. ).indexOf('.') +
  1003. 1) >
  1004. 2)
  1005. ) {
  1006. this.$message({
  1007. message: '不完善粒(%)输入错误! 取值范围1-40之间且可以保留2小数',
  1008. type: 'warning',
  1009. })
  1010. return
  1011. }
  1012. }
  1013. //容重
  1014. if (this.dataList.warehouseInOutDetail.bulkDensity) {
  1015. if (isNaN(this.dataList.warehouseInOutDetail.bulkDensity)) {
  1016. this.$message({
  1017. message: '容重(克/升)非数字!',
  1018. type: 'warning',
  1019. })
  1020. return
  1021. }
  1022. if (
  1023. (this.dataList.warehouseInOutDetail.bulkDensity &&
  1024. String(this.dataList.warehouseInOutDetail.bulkDensity).indexOf('.') != -1 &&
  1025. String(this.dataList.warehouseInOutDetail.bulkDensity).length -
  1026. (String(this.dataList.warehouseInOutDetail.bulkDensity).indexOf('.') + 1) >
  1027. 2) || this.dataList.warehouseInOutDetail.bulkDensity > 1000 || this.dataList.warehouseInOutDetail
  1028. .bulkDensity < 0
  1029. ) {
  1030. this.$message({
  1031. message: '容重输入错误',
  1032. type: 'warning',
  1033. })
  1034. return
  1035. }
  1036. }
  1037. this.$confirm(`确定提交毛重检斤`, {
  1038. cancelButtonText: '取消',
  1039. confirmButtonText: '确定',
  1040. type: 'warning',
  1041. })
  1042. .then(() => {
  1043. this.$refs.dataList.validate((valid) => {
  1044. if (valid) {
  1045. this.dataList.compId = localStorage.getItem('ws-pf_compId')
  1046. this.dataList.secretaryWeigher = localStorage.getItem('ws-pf_staffName')
  1047. this.dataList.inOutFlag = 1
  1048. this.dataList.statusFlag = 3
  1049. this.dataList.grossWeight /= 1000
  1050. this.dataList.tare /= 1000
  1051. this.dataList.netWeight /= 1000
  1052. this.dataList.pureWeight /= 1000
  1053. this.dataList.deductionAmount *= 1000
  1054. this.dataList.deductionWeight /= 1000
  1055. addstorageputList(this.dataList)
  1056. .toPromise()
  1057. .then((response) => {
  1058. this.$message.success('提交成功')
  1059. this.$confirm(`是否打印磅单`, {
  1060. cancelButtonText: '取消',
  1061. confirmButtonText: '确定',
  1062. type: 'warning',
  1063. })
  1064. .then(() => {
  1065. getPrintInfo({
  1066. id: this.dataList.id
  1067. })
  1068. .toPromise()
  1069. .then((response) => {
  1070. window.open('../../../../static/weightCheckInOut.html?type=2&tableData=' + JSON
  1071. .stringify(response))
  1072. })
  1073. this.$router.push({
  1074. path: 'warehouseManagementList'
  1075. })
  1076. })
  1077. .catch(() => {
  1078. return false
  1079. })
  1080. }).catch((response) => {
  1081. this.dataList.grossWeight = Math.round(this.dataList.grossWeight*1000)
  1082. this.dataList.tare = Math.round(this.dataList.tare*1000)
  1083. this.dataList.netWeight = Math.round(this.dataList.netWeight*1000)
  1084. this.dataList.pureWeight = Math.round(this.dataList.pureWeight*1000)
  1085. this.dataList.deductionAmount = Math.round(this.dataList.deductionAmount/1000)
  1086. this.dataList.deductionWeight = Math.round(this.dataList.deductionWeight*1000)
  1087. })
  1088. } else {
  1089. EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
  1090. return false
  1091. }
  1092. })
  1093. })
  1094. .catch(() => {
  1095. return false
  1096. })
  1097. },
  1098. tarechange(e) {
  1099. if (this.dataList.grossWeight && this.dataList.tare) {
  1100. this.dataList.netWeight = Number(
  1101. this.dataList.grossWeight - this.dataList.tare
  1102. ).toFixed(2)
  1103. }
  1104. },
  1105. grossWeightchange(e) {
  1106. if (this.dataList.grossWeight && this.dataList.tare) {
  1107. this.dataList.netWeight = Number(
  1108. this.dataList.grossWeight - this.dataList.tare
  1109. ).toFixed(2)
  1110. }
  1111. },
  1112. selectgoodsName(e) {
  1113. for (var i = 0; i < this.goodnameList.length; i++) {
  1114. if (this.goodnameList[i].constValue == e) {
  1115. this.dataList.goodsNameKey = this.goodnameList[i].constKey
  1116. if(e=='玉米(潮粮)'){
  1117. this.dataList.type='潮粮'
  1118. }else{
  1119. this.dataList.type='干粮'
  1120. }
  1121. }
  1122. }
  1123. },
  1124. selectpackingMethod(e) {
  1125. for (var i = 0; i < this.packtypeList.length; i++) {
  1126. if (this.packtypeList[i].constValue == e) {
  1127. this.dataList.packingMethodKey = this.packtypeList[i].constKey
  1128. }
  1129. }
  1130. },
  1131. selectstorageType(e) {
  1132. for (var i = 0; i < this.deliveryType.length; i++) {
  1133. if (this.deliveryType[i].constValue == e) {
  1134. this.dataList.inOutTypeKey = this.deliveryType[i].constKey
  1135. }
  1136. }
  1137. },
  1138. handleClose() {
  1139. this.accessoryTFs = false
  1140. },
  1141. handleSizeChange(val) {
  1142. console.log(`每页 ${val} 条`)
  1143. this.pageSize = val
  1144. this.getList()
  1145. },
  1146. handleCurrentChange(val) {
  1147. this.currentPage = val
  1148. console.log(`当前页: ${val}`)
  1149. this.getList()
  1150. },
  1151. getList() {
  1152. // 货名
  1153. pullDown({
  1154. constId: 'CON2'
  1155. })
  1156. .toPromise()
  1157. .then((response) => {
  1158. this.goodnameList = response
  1159. })
  1160. // 品级
  1161. pullDown({
  1162. constId: 'CON3'
  1163. })
  1164. .toPromise()
  1165. .then((response) => {
  1166. this.gradeList = response
  1167. })
  1168. // 类型
  1169. if (this.$route.query.warehouseType == '1') {
  1170. pullDown({
  1171. constId: 'CON6'
  1172. })
  1173. .toPromise()
  1174. .then((response) => {
  1175. this.deliveryType = response
  1176. })
  1177. } else if (this.$route.query.warehouseType == '2') {
  1178. //临时仓库出库类型
  1179. pullDown({
  1180. constId: 'WARE2'
  1181. })
  1182. .toPromise()
  1183. .then((response) => {
  1184. this.deliveryType = response
  1185. })
  1186. }
  1187. //合同编号
  1188. xialaNo({
  1189. compId: localStorage.getItem('ws-pf_compId'),
  1190. flag: 5
  1191. })
  1192. .toPromise()
  1193. .then((response) => {
  1194. this.outContractNo = response
  1195. for (let i = 0; i < response.length; i++) {
  1196. if (this.dataList.contractNo == response[i].contractNo) {
  1197. if (response[i].deliverType == '1') {
  1198. this.carstatus = true
  1199. } else {
  1200. this.carstatus = false
  1201. }
  1202. }
  1203. }
  1204. })
  1205. //经办人
  1206. getstaff({
  1207. compId: localStorage.getItem('ws-pf_compId'),
  1208. warehouseId: this.dataList.baseId
  1209. })
  1210. .toPromise()
  1211. .then((response) => {
  1212. this.options = response
  1213. this.qualityInspectorList = response
  1214. this.staffList = response
  1215. // this.agent = response
  1216. })
  1217. },
  1218. selecttaskType(e) {
  1219. for (var i = 0; i < this.taskTypeList.length; i++) {
  1220. if (this.taskTypeList[i].value == e) {
  1221. this.searchType = this.taskTypeList[i].type
  1222. }
  1223. }
  1224. },
  1225. fujian(row) {
  1226. if (
  1227. row.receiveAttachmentPath === null ||
  1228. row.receiveAttachmentPath === ''
  1229. ) {
  1230. EventBus.$emit(
  1231. 'warning',
  1232. this.$t('system.noticeCircular.NoInformation')
  1233. )
  1234. } else {
  1235. this.accessoryTFs = true
  1236. }
  1237. this.appendixIdss = row.receiveAttachmentPath
  1238. },
  1239. handleExamine(row) {
  1240. this.$router.push({
  1241. name: 'salesContractExamine',
  1242. query: {
  1243. id: row.id
  1244. },
  1245. })
  1246. },
  1247. // 关闭 dialog时 处理文件url 初始化upload组件
  1248. handleCloe() {
  1249. this.dialogViewSpareMoney = false
  1250. },
  1251. history(row) {
  1252. console.log(row)
  1253. billoperatehis({
  1254. id: row.id
  1255. })
  1256. .toPromise()
  1257. .then((response) => {
  1258. this.historyList = response
  1259. })
  1260. },
  1261. //删除
  1262. approve() {},
  1263. listQuery() {},
  1264. total() {},
  1265. clearfiltQuery() {},
  1266. selectCrtDuty() {},
  1267. },
  1268. }
  1269. </script>
  1270. <style lang="scss" scoped>
  1271. /deep/.basicInformation {
  1272. .ws-info-table {
  1273. border: none;
  1274. }
  1275. .el-form-item {
  1276. width: 33.3333%;
  1277. border: none;
  1278. .el-form-item__label {
  1279. background: transparent;
  1280. border: none;
  1281. }
  1282. .el-form-item__content {
  1283. border: none;
  1284. }
  1285. }
  1286. }
  1287. .title {
  1288. position: relative;
  1289. padding-left: 10px;
  1290. }
  1291. .title::before {
  1292. content: '';
  1293. display: inline-block;
  1294. width: 5px;
  1295. height: 30px;
  1296. background: #5473e8;
  1297. position: absolute;
  1298. left: 0;
  1299. }
  1300. .el-form {
  1301. padding: 0 10%;
  1302. }
  1303. .el-button--primary {
  1304. background-color: #5878e8;
  1305. border-color: #5878e8;
  1306. }
  1307. .el-col {
  1308. background: #f6f7fc;
  1309. }
  1310. .bg-right {
  1311. text-align: right;
  1312. padding: 16px 20px;
  1313. }
  1314. .center {
  1315. position: relative;
  1316. top: 50px;
  1317. width: 40%;
  1318. height: 2000px;
  1319. margin: 0 auto;
  1320. }
  1321. /deep/.el-form-item__label {
  1322. width: 160px;
  1323. }
  1324. //选填
  1325. /deep/.el-form-item {
  1326. width: 50%;
  1327. }
  1328. .container {
  1329. overflow: scroll;
  1330. height: 120vh;
  1331. }
  1332. /deep/.ws-info-table .el-form-item .el-form-item__label {
  1333. text-align: center;
  1334. }
  1335. .deliverydate {
  1336. display: inline-block;
  1337. width: 10%;
  1338. }
  1339. .center {
  1340. margin-top: -60px;
  1341. width: 80%;
  1342. }
  1343. //仓位
  1344. .position {
  1345. width: 52px;
  1346. height: 20px;
  1347. background: #afb5cb;
  1348. border-radius: 2px;
  1349. font-size: 12px;
  1350. font-family: PingFangSC-Medium, PingFang SC;
  1351. color: #ffffff;
  1352. line-height: 20px;
  1353. }
  1354. //表格文字
  1355. /deep/.ws-info-table .el-form-item .el-form-item__label {
  1356. text-align: left;
  1357. font-size: 14px;
  1358. font-family: PingFangSC-Regular, PingFang SC;
  1359. font-weight: 400;
  1360. color: #8890b1;
  1361. line-height: 16px;
  1362. }
  1363. .inspector {
  1364. width: 50%;
  1365. }
  1366. //质检员
  1367. .inspector .el-form-item__content {
  1368. text-align: left;
  1369. margin-left: 0px;
  1370. }
  1371. /deep/[data-v-d228e17e] .el-form-item__label {
  1372. width: 60px;
  1373. }
  1374. .small-title {
  1375. position: relative;
  1376. padding: 10px;
  1377. font-weight: 600;
  1378. }
  1379. .small-title::before {
  1380. position: absolute;
  1381. content: '';
  1382. display: block;
  1383. background: #5473e8;
  1384. width: 4px;
  1385. height: 14px;
  1386. left: 0px;
  1387. top: 13px;
  1388. }
  1389. //下面列表
  1390. .neifor {
  1391. width: 80%;
  1392. background-color: #f6f7fc;
  1393. }
  1394. /deep/.neifor .ws-info-table .el-form-item .el-form-item__label {
  1395. width: 35%;
  1396. text-align: center;
  1397. }
  1398. /deep/.neifor .ws-info-table .el-form-item .el-form-item__content {
  1399. width: 60%;
  1400. background-color: #f6f7fc;
  1401. }
  1402. /deep/.neifor .el-input--small .el-input__inner {
  1403. width: 100%;
  1404. }
  1405. .el-input__inner {
  1406. width: 150px;
  1407. }
  1408. </style>