Merge branch 'Dev' of http://101.37.171.70:10101/r/~jhz/STUWMS into Dev
| | |
| | | if(data.HCorrespondentTypeID==1){ |
| | | this.hform.TypeName = "供应商" |
| | | }else if(data.HCorrespondentTypeID==2){ |
| | | this.hform.TypeName = "部门" |
| | | }else{ |
| | | this.hform.TypeName = "客户" |
| | | }else{ |
| | | this.hform.TypeName = "部门" |
| | | } |
| | | |
| | | |
| | |
| | | HStockPlaceNameList: [], |
| | | arrayHDeptName: [], //部门 |
| | | HDeptNameList: [], |
| | | arrayHCusName: [], |
| | | arrayHCusName: [],//客户 |
| | | HCusNameList: [], |
| | | arrayHSupName: [], //客户 |
| | | HSupNameList: [], |
| | | arrayHSupplierName: [], //供应商 |
| | | HSuplierList: [], |
| | | linterid: '', |
| | |
| | | HWHID: getUserInfo().HWhID, |
| | | HStockPlaceName: getUserInfo().HSPName, |
| | | HStockPlaceID: getUserInfo().HSPID, |
| | | HSactterUserName: getUserInfo().User, |
| | | HSactterUserID: getUserInfo().User, |
| | | HCollectUserName: getUserInfo().HEmpName, |
| | | HCollectUserID: getUserInfo().HEmpID, |
| | | |
| | | HDeptName: getUserInfo().HDept, |
| | | HDeptID: getUserInfo().HDeptID, |
| | | HSupName: '', |
| | | HSupID: '', |
| | | HSecManagerID: getUserInfo().HEmpID, |
| | | HSecManagerName: getUserInfo().HEmpName, |
| | | HKeeperID: 0, |
| | |
| | | }, |
| | | getHSupList() { |
| | | CommonUtils.doRequest( |
| | | "/Gy_Customer/list", { |
| | | "/Gy_Supplier/list", { |
| | | sWhere: "", |
| | | user: uni.getStorageSync('HUserName'), |
| | | Organization: uni.getStorageSync('Organization') |
| | |
| | | count |
| | | } = res1 |
| | | if (count == 1) { |
| | | this.HSupNameList = data |
| | | this.HSuplierList = data |
| | | for (var i = 0; i < data.length; i++) { |
| | | this.arrayHSupName[i] = data[i].客户名称 |
| | | this.arrayHSupplierName[i] = data[i].供应商名称 |
| | | } |
| | | this.$forceUpdate(); |
| | | } else { |
| | |
| | | } |
| | | ) |
| | | }, |
| | | getSupplier() { |
| | | CommonUtils.doRequest( |
| | | "/WEBSController/GetSupplier_Json", { |
| | | HBarCode: uni.getStorageSync(''), |
| | | Organization: uni.getStorageSync('Organization') |
| | | }, |
| | | (res) => { |
| | | let res1 = res.data |
| | | let { |
| | | data, |
| | | count |
| | | } = res1 |
| | | if (count == 1) { |
| | | this.HSupNameList = data |
| | | for (var i = 0; i < data.length; i++) { |
| | | this.arrayHSupName[i] = data[i].客户名称 |
| | | } |
| | | this.$forceUpdate(); |
| | | } else { |
| | | uni.showToast({ |
| | | title: data.Message, |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | } |
| | | ) |
| | | }, |
| | | |
| | | //选择使用部门 |
| | | HDeptNameChange(e) { |
| | | for (var i = 0; i < this.HDeptNameList.length; i++) { |
| | |
| | | if (!this.hform.HStockPlaceName) { |
| | | this.hform.HStockPlaceID = 0 |
| | | } |
| | | if (!this.hform.HSactterUserName) { |
| | | this.hform.HSactterUserID = 0 |
| | | } else { |
| | | this.HSecManagerID = this.hform.HSactterUserID |
| | | } |
| | | if (!this.hform.HCollectUserName) { |
| | | this.hform.HCollectUserID = 0 |
| | | } else { |
| | | this.HKeeperID = this.hform.HCollectUserID |
| | | } |
| | | |
| | | if (!this.hform.HDeptName) { |
| | | this.hform.HDeptID = 0 |
| | | } |
| | |
| | | style="background-color: #3A78FF;padding: 6rpx;color: #fff;border-radius: 100%;flex-shrink: 0;" |
| | | size="20" @click="toScanCode"></uni-icons> |
| | | </view> |
| | | <view class="form-item" @click="searchModule"> |
| | | <view class="title">器具</view> |
| | | <view class="righton" style="width: 350rpx;"> |
| | | <input placeholder="请选择器具" /> |
| | | </view> |
| | | <uni-icons type="search" |
| | | style="margin-left: 10rpx;background-color: #3A78FF;padding: 6rpx;color: #fff;border-radius: 100%;" |
| | | size="20" ></uni-icons> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">故障发生日期</view> |
| | | |
| | |
| | | </view> |
| | | </view> |
| | | <BarCodePopupVue ref="barcodePopup"></BarCodePopupVue> |
| | | <BillListPopupMouldVue @BillSelectComplete="MouldBillHandler" ref="billListMould"></BillListPopupMouldVue> |
| | | </view> |
| | | </template> |
| | | <script> |
| | |
| | | import BillListPopupVue from '../../components/BillListPopup/BillListPopup.vue'; |
| | | import BarCodePopupVue from "../../components/BarCodePopup/BarCodePopup.vue"; |
| | | import BillSelectPopupXiaoWeiVue from '../../components/BillSelectPopupXiaoWei/BillSelectPopupXiaoWei.vue'; |
| | | import BillListPopupMouldVue from '../../components/BillListPopup/BillListPopup_Mould.vue'; |
| | | import dayjs from 'dayjs'; |
| | | import { MpaasScan } from '../../utils/mpaasScan'; |
| | | export default { |
| | | components: { |
| | | BillListPopupVue, |
| | | BarCodePopupVue, |
| | | BillSelectPopupXiaoWeiVue |
| | | BillSelectPopupXiaoWeiVue, |
| | | BillListPopupMouldVue, |
| | | }, |
| | | |
| | | data() { |
| | |
| | | "HDate": dayjs(new Date()).format("YYYY-MM-DD hh:mm:ss"), |
| | | "HDeptName": getUserInfo()["HDeptName"], |
| | | "HDeptID": getUserInfo()["HDeptID"], |
| | | "HEmpName": "", |
| | | "HEmpID": "0", |
| | | "HManagerName": "", |
| | | "HManagerID": "0", |
| | | "HEmpName": getUserInfo().HEmpName, |
| | | "HEmpID": getUserInfo().HEmpID, |
| | | "HManagerName": getUserInfo().HSecManager, |
| | | "HManagerID": getUserInfo().HSecManagerID, |
| | | "HBarName": "", |
| | | "HMouldID": "0", |
| | | "HBarSpec": "", |
| | |
| | | this.InitEmp() |
| | | }, |
| | | methods: { |
| | | searchModule() { |
| | | this.$refs['billListMould'].showPopup() |
| | | }, |
| | | MouldBillHandler(mould) { |
| | | if(!mould.enableMultiSourceBill){ |
| | | let val = mould.val[0] |
| | | this.hform.HBarCode = val['条码编号'] |
| | | this.getHBarCodeData(this.hform.HBarCode) |
| | | } |
| | | this.$refs['billListMould'].exit() |
| | | }, |
| | | // 故障类别 |
| | | async InitConkType() { // 初始化故障类别 |
| | | try { |
| | |
| | | style="background-color: #3A78FF;padding: 6rpx;color: #fff;border-radius: 100%;flex-shrink: 0;" |
| | | size="20" @click="toScanCode"></uni-icons> |
| | | </view> |
| | | <view class="form-item" @click="searchModule"> |
| | | <view class="title">器具</view> |
| | | <view class="righton" style="width: 350rpx;"> |
| | | <input placeholder="请选择器具" /> |
| | | </view> |
| | | <uni-icons type="search" |
| | | style="margin-left: 10rpx;background-color: #3A78FF;padding: 6rpx;color: #fff;border-radius: 100%;" |
| | | size="20" ></uni-icons> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">源单类型</view> |
| | | <view class="right" v-show="showHMainSourceBillType"> |
| | | <picker :range="arrayHMainSourceBillType" v-model="HMainSourceBillType" |
| | | <picker :range="arrayHMainSourceBillType" |
| | | @change="HMainSourceBillTypeChange"> |
| | | |
| | | <input disabled name="HMainSourceBillType" v-model="HMainSourceBillType" |
| | |
| | | <view class="form-item"> |
| | | <view class="title">新设计寿命</view> |
| | | <view class="right"> |
| | | <textarea v-model="hform.HNewDesignLife" style="height: 6em;" maxlength="2000" |
| | | <input v-model="hform.HNewDesignLife" |
| | | placeholder="请输入新设计寿命..." /> |
| | | </view> |
| | | </view> |
| | |
| | | :HSourceBillType="hform.HMainSourceBillType" :HStockOrgID="hform.HStockOrgID"> |
| | | </BillListPopupMouldConkBookBillVue> |
| | | <BarCodePopupVue ref="barcodePopup"></BarCodePopupVue> |
| | | <BillListPopupMouldVue @BillSelectComplete="MouldBillHandler" ref="billListMould"></BillListPopupMouldVue> |
| | | </view> |
| | | </template> |
| | | <script> |
| | |
| | | } from '../../utils/userRelationManager'; |
| | | import BillListPopupMouldConkBookBillVue from '../../components/BillListPopup/BillListPopupMouldConkBookBill.vue'; |
| | | import BarCodePopupVue from "../../components/BarCodePopup/BarCodePopup.vue"; |
| | | import BillListPopupMouldVue from '../../components/BillListPopup/BillListPopup_Mould.vue'; |
| | | import dayjs from 'dayjs'; |
| | | export default { |
| | | components: { |
| | | BarCodePopupVue, |
| | | BillListPopupMouldConkBookBillVue |
| | | BillListPopupMouldConkBookBillVue, |
| | | BillListPopupMouldVue, |
| | | }, |
| | | |
| | | data() { |
| | |
| | | "HBillNo": "", |
| | | "HInterID": "0", |
| | | "HDate": dayjs(new Date()).format("YYYY-MM-DD HH:mm:ss"), |
| | | "HDeptName": "", |
| | | "HDeptID": "0", |
| | | "Department": "", |
| | | "HEmpName": "", |
| | | "HEmpID": "0", |
| | | "HEmp": "", |
| | | "HManagerName": "", |
| | | "HManagerID": "0", |
| | | "HManager": "", |
| | | "HDeptName": getUserInfo()["HDeptName"], |
| | | "HDeptID": getUserInfo()["HDeptID"], |
| | | "HEmpName": getUserInfo().HEmpName, |
| | | "HEmpID": getUserInfo().HEmpID, |
| | | "HManagerName": getUserInfo().HSecManager, |
| | | "HManagerID": getUserInfo().HSecManagerID, |
| | | "HRepairName": "", |
| | | "HRepairID": "0", |
| | | "HRepairList": "", |
| | |
| | | "HSupIDList": "", |
| | | "HRepairType": "内部维修", |
| | | "HNewModel": "", |
| | | "HNewDesignLife": "", |
| | | "HNewDesignLife": "0", |
| | | "HBarName": "", |
| | | "HMouldID": "0", |
| | | "HBarSpec": "", |
| | |
| | | this.InitEmp() |
| | | this.InitSupplier() |
| | | this.InitRepairName() |
| | | |
| | | this.loadCache() |
| | | uni.$on('BillSelectComplete', (e) => { |
| | | console.log("接收到的消息: ", e) |
| | | this.hform.HMainSourceInterID = e.HInterID |
| | |
| | | uni.$off('BillSelectComplete') |
| | | }, |
| | | methods: { |
| | | searchModule() { |
| | | this.$refs['billListMould'].showPopup() |
| | | }, |
| | | MouldBillHandler(mould) { |
| | | if(!mould.enableMultiSourceBill){ |
| | | let val = mould.val[0] |
| | | this.hform.HBarCode = val['条码编号'] |
| | | this.getHBarCodeData(this.hform.HBarCode) |
| | | } |
| | | this.$refs['billListMould'].exit() |
| | | }, |
| | | // 维修项目 |
| | | async InitRepairName() { // 初始化维修项目 |
| | | try { |
| | |
| | | this.hform.HMainSourceBillType = -1 |
| | | return |
| | | } |
| | | |
| | | console.log(e.detail.value) |
| | | console.log(e) |
| | | this.HMainSourceBillType = this.arrayHMainSourceBillType[e.detail.value] |
| | | this.hform.HMainSourceBillType = this.arrayHMainSourceBillTypeID[e.detail.value] |
| | | const pages = getCurrentPages() |
| | | // 获取页面栈中的最后一个元素,也就是当前显示的页面 |
| | | const currentPage = pages[pages.length - 1] |
| | | // 选择源单类型后 缓存当前页面选择 |
| | | uni.setStorageSync(`${currentPage.route.split("/").pop()}_HSourceBillTypeCache`, { |
| | | HSourceBillTypeName: this.HMainSourceBillType, |
| | | HSourceBillType: this.hform.HMainSourceBillType |
| | | }) |
| | | }, |
| | | // 读取缓存 |
| | | loadCache() { |
| | | const pages = getCurrentPages() |
| | | // 获取页面栈中的最后一个元素,也就是当前显示的页面 |
| | | const currentPage = pages[pages.length - 1] |
| | | let HBillTypeCache = uni.getStorageSync(`${currentPage.route.split("/").pop()}_HSourceBillTypeCache`) |
| | | if (HBillTypeCache) { |
| | | this.HMainSourceBillType = HBillTypeCache.HSourceBillTypeName |
| | | this.hform.HMainSourceBillType = HBillTypeCache.HSourceBillType |
| | | } |
| | | }, |
| | | // 扫描模具条码 |
| | | async getHBarCodeData(HBarCode) { |
| | | if (!HBarCode) { |