yangpeilai преди 1 седмица
родител
ревизия
498eca1f69

+ 20
- 20
src/utils/baseService.ts Целия файл

@@ -125,25 +125,25 @@ export default {
}
// hasPathInArray(paths, url) ? : url /newDev
// 连本地用的
if(url.startsWith('/invw')){
console.log('===>userw本地')
return httpN({
url: 'http://localhost:9085' + url,
method: 'post',
timeout: 60000,
headers: {
'Content-Type': 'application/json;charset=UTF-8',
...headers,
},
data: encryptionN(
{
...body,
},
2,
hasPathInArray(paths, url)
),
})
}else{
// if(url.startsWith('/invw')){
// console.log('===>userw本地')
// return httpN({
// url: 'http://localhost:9085' + url,
// method: 'post',
// timeout: 60000,
// headers: {
// 'Content-Type': 'application/json;charset=UTF-8',
// ...headers,
// },
// data: encryptionN(
// {
// ...body,
// },
// 2,
// hasPathInArray(paths, url)
// ),
// })
// }else{
return httpN({
url: urls + url,
method: 'post',
@@ -160,7 +160,7 @@ export default {
hasPathInArray(paths, url)
),
})
}
// }
},
get(
url: string | number,

+ 5
- 42
src/views/inventoryControl/newInventory/allocationManagement/addOrUpdate.vue Целия файл

@@ -213,7 +213,6 @@
<el-table-column label="操作" width="340" v-if="typeOption === 'add' || typeOption === 'edit'">
<template v-slot="scope">
<el-button class="op-btn" type="primary" @click="validHandle(scope.row, scope.$index)">校验</el-button>
<!-- <el-button class="op-btn" type="primary" @click="validDetailHandle(scope.row)" v-if="scope.row.isShowBtn">校验失败明细</el-button>-->
<el-button class="op-btn" type="danger" v-if="scope.$index > 0" @click="deleteHandle(scope.row, scope.$index)">删除</el-button>
<el-button class="op-btn" type="success" v-if="scope.$index === (addForm.detailList.length - 1)" @click="addMoreHandle(scope.row)">继续添加</el-button>
</template>
@@ -318,7 +317,6 @@ const initForm = {
{
startId: "",
endId: "",
// warranty: "",
count: 0,
isShowBtn: false,
failTotal: 0,
@@ -333,18 +331,10 @@ const templateDownload = () => {
BaseService.getDownload(url, '设备备货号段导入模板')
}
const beforeAvatarUpload: UploadProps['beforeUpload'] = (rawFile) => {
// dataFormRef.value.validate((valid) => {
// if (valid) {
// return true;
// }else {
// return false;
// }
// })
}
const state = reactive({
btnLoding: false,
addForm: cloneDeep(initForm),
warrantyList: [] as IObject[],
allList: [] as IObject[],
treeData: [] as IObject[],
summary: false
@@ -352,7 +342,6 @@ const state = reactive({
const interfaceLowerListArr = ref([]);
const interfaceAgencyArr = ref([]);
const deviceTypeList = computed(() => {
// return $storeinitData.state.dictData['DEVICE_TYPE'] || [];
return $storeinitData.state.dictData['INVENTORY_TYPE'] || [];
})
const OWN_TYPE = computed(() => {
@@ -363,7 +352,6 @@ const cardDeviceVersion = computed(() => {
})
const obuDeviceVersion = computed(() => {
return $storeinitData.state.dictData['DEVICE_VERSION'] || [];
// return $storeinitData.state.dictData['DEVICE_VERSION_OBU'] || [];
})

const deviceModelList = computed(() => {
@@ -383,14 +371,13 @@ const obuType = computed(() => {
return $storeinitData.state.dictData['OBU_TYPE'] || [];
})

const {addForm, warrantyList, allList, treeData, btnLoding, summary}: any = toRefs(state)
const {addForm, allList, treeData, btnLoding, summary}: any = toRefs(state)
const rules = reactive({
storeCodeList: [{required: true, message: "请选择入库仓库", trigger: "blur"}],
ownType: [{required: true, message: "请选择产权", trigger: "blur"}],
version: [{required: true, message: "请选择设备型号", trigger: "blur"}],
inventoryType: [{required: true, message: "请选择设备类型", trigger: "blur"}],
brand: [{required: true, message: "请选择设备厂商", trigger: "blur"}],
// brand: [{ required: true, message: "请选择申请单类型", trigger: "blur" }],
receiveStoreCode: [{required: true, message: "请选择收货仓库", trigger: "blur"}],
sendStoreCode: [{required: true, message: "请选择发货仓库", trigger: "blur"}],
cardType: [{ required: true, message: "请选择卡类型", trigger: "blur" }],
@@ -400,7 +387,6 @@ const props2 = {
value: "code",
label: "name",
children: "subordinateModel",
// multiple: true,
checkStrictly: true,
}
const handleExceed: UploadProps['onExceed'] = (files) => {
@@ -445,31 +431,8 @@ function init(row: any) {
idex = row.id
}
getLowerList();
// getAgency();
clearData();
fileList.value = []
warrantyList.value = [
{
label: "一年质保期",
value: "1年"
},
{
label: "两年质保期",
value: "2年"
},
{
label: "三年质保期",
value: "3年"
},
{
label: "四年质保期",
value: "4年"
},
{
label: "五年质保期",
value: "5年"
}
]
if (row && row.id) {
getInfo(row.id)
}
@@ -484,7 +447,9 @@ function getInfo(id: string) {
let data = bizContent.transferApply || {};
let detailList = bizContent.transferDetails || [];
let files = [];
files.push({url:data.filePath,name:data.filePath});
if(data.filePath!== '' && data.filePath !== null && data.filePath !== undefined){
files.push({url:data.filePath,name:data.filePath});
}
fileList.value = files;
let list: any = [];
detailList.map((item) => {
@@ -511,9 +476,6 @@ function getInfo(id: string) {

//addForm.value.detailList = list;
formLoding.value = false;
} else {
formLoding.value = false;
ElMessage.error(res.message)
}
})
}
@@ -920,6 +882,7 @@ function getSummaries(param) {

// 更新 sums 和字符串(避免直接修改外部变量)
sums[1] = totalNum;
addForm.value.applyCount = totalNum
str = str + ',已校验可入库数量' + totalNum
}
}

+ 4
- 11
src/views/inventoryControl/newInventory/warehouseManagement/index.vue Целия файл

@@ -3,7 +3,7 @@
<crud-template ref="crudRef" class="as-weight" :submit-state="false" :home-data="field" :tableData="tableData"
@btnSearch="btnSearch" @CurrentChange="handleCurrentChange" @importData="importData" @download="downloadHandle"
@refreshLeft="refreshLeft" @add="Adds" @cancel="cancel" @submit="submitAdd"
@customSelectorSelection="customSelectorSelection" @handleEdit="itemEdit" @handleDelete="deleteHandle">
@customSelectorSelection="customSelectorSelection" @handleEdit="handleEdit" @handleDelete="deleteHandle">
<template #search>
<el-input maxlength="60" v-trim clearable v-model="searchForm.agencyId" style="width: 200px"
placeholder="请输入渠道编号" />
@@ -140,6 +140,7 @@ function toEdit(row) {
const data: any = toRaw(row)
crudRef.value.dialogFormVisible = true
crudRef.value.title = '编辑'
itemStartValue.value = 2
nextTick(() => {
crudRef.value.form={
...data
@@ -207,23 +208,19 @@ function getList() {

const Adds = () => {
itemStartValue.value = 1
console.log("type111====>", itemStartValue.value)
}
//表单编辑按钮
function itemEdit(idx: any, row: any) {
function handleEdit(idx: any, row: any) {
itemStartValue.value = 2
console.log("type====>", itemStartValue.value)
}

// 添加
const submitAdd = (data: any) => {
console.log("type====>", typeOption.value)
// request(data, itemStartValue.value)
request(data, itemStartValue.value)
}

const request = (data: any, type: any) => {
//操作类型 1新增 2修改
console.log("type====>",type,"---->", itemStartValue.value)
BaseService.postN(type == 1 ? '/invw/api/warehouse/add' : '/invw/api/warehouse/edit', data).then((res: any) => {
if (res && res.code === 0) {
getList()
@@ -277,10 +274,6 @@ function getAgencyList() {

}

//编辑
function handleEdit() {

}
// 删除
function handleDetele() {


Loading…
Отказ
Запис