bug问题修复
This commit is contained in:
		
							parent
							
								
									368aaa4c75
								
							
						
					
					
						commit
						fffec2d96e
					
				| 
						 | 
				
			
			@ -232,6 +232,16 @@
 | 
			
		|||
                align="center"
 | 
			
		||||
                label="抱杆设备名称"
 | 
			
		||||
            />
 | 
			
		||||
            <el-table-column align="center" label="抱杆设备数量" width="260">
 | 
			
		||||
                <template slot-scope="scope">
 | 
			
		||||
                    <el-input-number
 | 
			
		||||
                        :min="1"
 | 
			
		||||
                        :max="1000"
 | 
			
		||||
                        @change="onChangeInput($event, scope.$index)"
 | 
			
		||||
                        v-model="scope.row.wholeTypeNum"
 | 
			
		||||
                    />
 | 
			
		||||
                </template>
 | 
			
		||||
            </el-table-column>
 | 
			
		||||
            <el-table-column align="center" label="操作" width="180">
 | 
			
		||||
                <template slot-scope="scope">
 | 
			
		||||
                    <el-button
 | 
			
		||||
| 
						 | 
				
			
			@ -1136,10 +1146,14 @@ export default {
 | 
			
		|||
            const wholeTypeNameData = {
 | 
			
		||||
                id: val,
 | 
			
		||||
                wholeTypeName: selLable.wholeTypeName,
 | 
			
		||||
                wholeTypeNum: 1,
 | 
			
		||||
                childrenList: [],
 | 
			
		||||
            }
 | 
			
		||||
            queryCompleteSetToolsApi(wholeTypeNameData).then((res) => {
 | 
			
		||||
                wholeTypeNameData.childrenList = res.data
 | 
			
		||||
                wholeTypeNameData.childrenList.forEach(
 | 
			
		||||
                    (e) => (e.initNum = e.deviceNum),
 | 
			
		||||
                )
 | 
			
		||||
                const isREpeat = this.wholeTypeNameList.find(
 | 
			
		||||
                    (e) => e.id === val,
 | 
			
		||||
                )
 | 
			
		||||
| 
						 | 
				
			
			@ -1161,6 +1175,13 @@ export default {
 | 
			
		|||
        onHandelDelete(index) {
 | 
			
		||||
            this.wholeTypeNameList.splice(index, 1)
 | 
			
		||||
        },
 | 
			
		||||
 | 
			
		||||
        /* 更改数量 */
 | 
			
		||||
        onChangeInput(val, v) {
 | 
			
		||||
            this.wholeTypeNameList[v].childrenList.forEach(
 | 
			
		||||
                (e) => (e.deviceNum = e.initNum * val),
 | 
			
		||||
            )
 | 
			
		||||
        },
 | 
			
		||||
    },
 | 
			
		||||
}
 | 
			
		||||
</script>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -691,7 +691,7 @@ export default {
 | 
			
		|||
            outQuery: {
 | 
			
		||||
                //编码出库-搜索条件
 | 
			
		||||
                pageNum: 1,
 | 
			
		||||
                pageSize: 20,
 | 
			
		||||
                pageSize: 10,
 | 
			
		||||
                maCode: undefined,
 | 
			
		||||
            },
 | 
			
		||||
            outTotal: 0, //编码弹窗分页-总数
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -117,10 +117,12 @@ export default {
 | 
			
		|||
        /* 求和 */
 | 
			
		||||
        getSumTotalPrice() {
 | 
			
		||||
            if (this.addOtherCostList.length > 0) {
 | 
			
		||||
                this.totalPrice = this.addOtherCostList.reduce(
 | 
			
		||||
                    (sum, e) => sum + e.addCost * 1,
 | 
			
		||||
                    0,
 | 
			
		||||
                )
 | 
			
		||||
                this.totalPrice =
 | 
			
		||||
                    this.addOtherCostList.reduce((sum, e) => {
 | 
			
		||||
                        const cost = parseFloat(e.addCost)
 | 
			
		||||
                        // 检查 cost 是否为数字且不是 NaN
 | 
			
		||||
                        return !isNaN(cost) ? sum + Math.round(cost * 100) : sum
 | 
			
		||||
                    }, 0) / 100
 | 
			
		||||
            } else {
 | 
			
		||||
                this.totalPrice = 0
 | 
			
		||||
            }
 | 
			
		||||
| 
						 | 
				
			
			@ -147,11 +149,11 @@ export default {
 | 
			
		|||
                            this.activeIndexCostRemark = ''
 | 
			
		||||
                        }
 | 
			
		||||
                        const regex_2 =
 | 
			
		||||
                            /^(?!\s*$)(?:[1-9][0-9]{0,7}|100000000)$/
 | 
			
		||||
                            /^(?!\s*$)(?:(?:[1-9][0-9]{0,7}|100000000)(\.[0-9]{1,2})?|0(\.[0-9]{1,2})?)$/
 | 
			
		||||
 | 
			
		||||
                        if (!regex_2.test(e.addCost)) {
 | 
			
		||||
                            this.$modal.msgError(
 | 
			
		||||
                                '金额不能为空,不能为小数,不能以0开头,不能大于1亿',
 | 
			
		||||
                                '金额不能为空,只能为数字,如果是小数,则小数点后最多两位,不能以0开头,不能大于1亿',
 | 
			
		||||
                            )
 | 
			
		||||
                            this.activeIndex = index
 | 
			
		||||
                            this.$refs[`addCost_${index}`].focus()
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -379,7 +379,7 @@ export default {
 | 
			
		|||
        // 查询
 | 
			
		||||
        handleQuery() {
 | 
			
		||||
            this.queryParams.pageNum = 1
 | 
			
		||||
            const keyWord = this.formData.keyWord?.trim() || ''
 | 
			
		||||
            const keyWord = this.formData.wholeTypeName?.trim() || ''
 | 
			
		||||
            this.getList({ keyWord })
 | 
			
		||||
        },
 | 
			
		||||
        handleSearch() {
 | 
			
		||||
| 
						 | 
				
			
			@ -388,11 +388,11 @@ export default {
 | 
			
		|||
        },
 | 
			
		||||
        // 重置
 | 
			
		||||
        resetQuery() {
 | 
			
		||||
            this.formData.keyWord = ''
 | 
			
		||||
            this.formData.wholeTypeName = ''
 | 
			
		||||
            this.getList()
 | 
			
		||||
        },
 | 
			
		||||
        resetSearch() {
 | 
			
		||||
            this.dialogForm.keyWord = ''
 | 
			
		||||
            this.dialogForm.wholeTypeName = ''
 | 
			
		||||
            this.getDetail({ id: this.rowId })
 | 
			
		||||
        },
 | 
			
		||||
        // 新增
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -190,13 +190,13 @@
 | 
			
		|||
                :show-overflow-tooltip="true"
 | 
			
		||||
            />
 | 
			
		||||
            <el-table-column
 | 
			
		||||
                label="报废数量"
 | 
			
		||||
                label="已报废数量"
 | 
			
		||||
                align="center"
 | 
			
		||||
                prop="scrapNum"
 | 
			
		||||
                :show-overflow-tooltip="true"
 | 
			
		||||
            />
 | 
			
		||||
            <el-table-column
 | 
			
		||||
                label="预报废数量"
 | 
			
		||||
                label="待报废数量"
 | 
			
		||||
                align="center"
 | 
			
		||||
                prop="preScrapNum"
 | 
			
		||||
                :show-overflow-tooltip="true"
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -68,10 +68,18 @@
 | 
			
		|||
                />
 | 
			
		||||
            </el-form-item>
 | 
			
		||||
            <el-form-item>
 | 
			
		||||
                <el-button size="mini" plain @click="handleQuery"
 | 
			
		||||
                <el-button
 | 
			
		||||
                    size="mini"
 | 
			
		||||
                    type="primary"
 | 
			
		||||
                    @click="handleQuery"
 | 
			
		||||
                    icon="el-icon-search"
 | 
			
		||||
                    >查询</el-button
 | 
			
		||||
                >
 | 
			
		||||
                <el-button size="mini" type="warning" @click="handleReset"
 | 
			
		||||
                <el-button
 | 
			
		||||
                    size="mini"
 | 
			
		||||
                    type="warning"
 | 
			
		||||
                    @click="handleReset"
 | 
			
		||||
                    icon="el-icon-refresh"
 | 
			
		||||
                    >重置</el-button
 | 
			
		||||
                >
 | 
			
		||||
                <el-button size="mini" type="primary" @click="handleExport"
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -619,9 +619,9 @@ export default {
 | 
			
		|||
            getAccessoryTree().then((response) => {
 | 
			
		||||
                this.equipmentTypeList = response.data
 | 
			
		||||
                this.equipmentTypeList.forEach((item, index) => {
 | 
			
		||||
                    if (item.children.length > 0) {
 | 
			
		||||
                    if (item.children && item.children.length > 0) {
 | 
			
		||||
                        item.children.forEach((item2, index2) => {
 | 
			
		||||
                            if (item2.children.length > 0) {
 | 
			
		||||
                            if (item2.children && item2.children.length > 0) {
 | 
			
		||||
                                item2.children.forEach((item3) => {
 | 
			
		||||
                                    item3.machineTypeName = item2.label
 | 
			
		||||
                                    item3.specificationType = item3.label
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -42,7 +42,7 @@ module.exports = {
 | 
			
		|||
                // target: `https://test-cc.zhgkxt.com`,//线上环境-南网
 | 
			
		||||
                // target: `https://z.csgmall.com.cn`,
 | 
			
		||||
 | 
			
		||||
                target: `http://192.168.2.158:49080`, //超
 | 
			
		||||
                target: `http://192.168.2.127:39080`, //超
 | 
			
		||||
                // target: `http://10.40.92.81:8080`, //韩/
 | 
			
		||||
                // target: `http://192.168.2.74:49080`, //旭/
 | 
			
		||||
                // target: `http://192.168.2.17:39080`, //帅
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue