Browse Source

盘点修复

pre-production
马远东 11 months ago
parent
commit
5c091b99f2
  1. 186
      src/views/aftersales/aftersalesWorkOrderAddTemp.vue
  2. 5
      src/views/distribution/checkInventoryTask/createTask.vue

186
src/views/aftersales/aftersalesWorkOrderAddTemp.vue

@ -46,6 +46,7 @@
v-model="form.discoveryNode" v-model="form.discoveryNode"
placeholder="请选择发现节点" placeholder="请选择发现节点"
style="width: 100%" style="width: 100%"
@change="DiscoveringNodesChange"
> >
<el-option <el-option
v-for="item in Discoveringoptions" v-for="item in Discoveringoptions"
@ -151,14 +152,14 @@
> >
<el-tab-pane label="基础信息" name="0"> <el-tab-pane label="基础信息" name="0">
<div class="Basicinformation"> <div class="Basicinformation">
<el-form-item label="车次号" prop="trainNumber"> <el-form-item label="车次号" prop="trainNumber" v-if="displaySettings.trainNumber">
<el-select <el-select
v-model="form.trainNumber" v-model="form.trainNumber"
placeholder="请选择车次号" placeholder="请选择车次号"
style="width: 100%" style="width: 100%"
> >
<el-option <el-option
v-for="item in Discoveringoptions" v-for="item in Trainoptions"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value" :value="item.value"
@ -167,7 +168,11 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="配送时间" prop="deliveryTime"> <el-form-item
label="配送时间"
prop="deliveryTime"
v-if="displaySettings.deliveryTime"
>
<el-date-picker <el-date-picker
v-model="form.deliveryTime" v-model="form.deliveryTime"
style="width: 100%" style="width: 100%"
@ -177,13 +182,28 @@
placeholder="请选择配送时间" placeholder="请选择配送时间"
/> />
</el-form-item> </el-form-item>
<el-form-item label="配送司机" prop="deliveryDriver">
<el-form-item
label="配送司机"
prop="deliveryDriver"
v-if="displaySettings.deliveryDriver"
>
<el-input v-model="form.deliveryDriver" placeholder="请输配送司机" clearable /> <el-input v-model="form.deliveryDriver" placeholder="请输配送司机" clearable />
</el-form-item> </el-form-item>
<el-form-item label="车辆线路" prop="vehicleRoute">
<el-form-item
label="车辆线路"
prop="vehicleRoute"
v-if="displaySettings.vehicleRoute"
>
<el-input v-model="form.vehicleRoute" placeholder="请输入车辆线路" clearable /> <el-input v-model="form.vehicleRoute" placeholder="请输入车辆线路" clearable />
</el-form-item> </el-form-item>
<el-form-item label="发货时间" prop="deliverGoodsTime">
<el-form-item
label="发货时间"
prop="deliverGoodsTime"
v-if="displaySettings.deliverGoodsTime"
>
<el-date-picker <el-date-picker
v-model="form.deliverGoodsTime" v-model="form.deliverGoodsTime"
style="width: 100%" style="width: 100%"
@ -193,7 +213,12 @@
placeholder="请选择发货时间" placeholder="请选择发货时间"
/> />
</el-form-item> </el-form-item>
<el-form-item label="入库时间" prop="warehousingTime">
<el-form-item
label="入库时间"
prop="warehousingTime"
v-if="displaySettings.warehousingTime"
>
<el-date-picker <el-date-picker
v-model="form.warehousingTime" v-model="form.warehousingTime"
style="width: 100%" style="width: 100%"
@ -203,7 +228,12 @@
placeholder="请选择入库时间" placeholder="请选择入库时间"
/> />
</el-form-item> </el-form-item>
<el-form-item label="发现时间" prop="discoveryTime">
<el-form-item
label="发现时间"
prop="discoveryTime"
v-if="displaySettings.discoveryTime"
>
<el-date-picker <el-date-picker
v-model="form.discoveryTime" v-model="form.discoveryTime"
style="width: 100%" style="width: 100%"
@ -213,32 +243,59 @@
placeholder="请选择发现时间" placeholder="请选择发现时间"
/> />
</el-form-item> </el-form-item>
<el-form-item label="运单商场" prop="waybillMall"> <!-- 初始必填 -->
<el-form-item label="运单商场" prop="waybillMall" v-if="displaySettings.waybillMall">
<el-input v-model="form.waybillMall" placeholder="请输入运单商场" clearable /> <el-input v-model="form.waybillMall" placeholder="请输入运单商场" clearable />
</el-form-item> </el-form-item>
<el-form-item label="合作模式" prop="typeServiceName"> <!-- 初始必填 -->
<el-input v-model="form.typeServiceName" placeholder="合作模式(自动带出)" clearable /> <el-form-item
label="合作模式"
prop="typeServiceName"
v-if="displaySettings.typeServiceName"
>
<el-input
v-model="form.typeServiceName"
placeholder="合作模式(自动带出)"
clearable
/>
</el-form-item> </el-form-item>
<!-- 初始必填 -->
<div class="el_Basic"> <div class="el_Basic">
<el-form-item label="处理方" prop="processor" class="el_Processing"> <el-form-item
<el-select label="处理方"
v-model="form.processor" prop="processor"
placeholder="请选择处理方" class="el_Processing"
style="width: 100%" v-if="displaySettings.processor"
> >
<el-option <el-select
v-for="item in Discoveringoptions" v-model="form.processor"
:key="item.value" placeholder="请选择处理方"
:label="item.label" style="width: 100%"
:value="item.value" >
<el-option
v-for="item in Processingoptions"
:key="item.value"
:label="item.label"
:value="item.value"
multiple
filterable
clearable
/>
</el-select>
</el-form-item>
<!-- 初始必填 -->
<el-form-item
label="调查经过"
prop="investigationPocess"
class="el_Investigation"
v-if="displaySettings.investigationPocess"
>
<el-input
v-model="form.investigationPocess"
placeholder="请输调查经过"
clearable clearable
/> />
</el-select> </el-form-item>
</el-form-item>
<el-form-item label="调查经过" prop="deliveryTime" class="el_Investigation">
<el-input v-model="form.investigationPocess" placeholder="请输调查经过" clearable />
</el-form-item>
</div> </div>
</div> </div>
</el-tab-pane> </el-tab-pane>
@ -274,7 +331,7 @@
</template> </template>
<script setup> <script setup>
import { ref, reactive } from 'vue'; import { ref, reactive, computed } from 'vue';
import { ElMessage, ElMessageBox } from 'element-plus'; import { ElMessage, ElMessageBox } from 'element-plus';
import { getDictionaryBiz } from '@/api/system/dict'; // import { getDictionaryBiz } from '@/api/system/dict'; //
import { import {
@ -286,12 +343,15 @@ import {
$_getAbnormalPackage, $_getAbnormalPackage,
$_shippingInformation, $_shippingInformation,
} from '@/api/aftersales/aftersalesWorkOrder'; } from '@/api/aftersales/aftersalesWorkOrder';
import { getDetailWarehouse, getDeptWarehouse } from '@/api/basicdata/basicdataWarehouse'; //
import { deepClone } from '@/utils/util';
const form = ref({ const form = ref({
TabactiveName: '0', // TabactiveName: '0', //
activPackage: '0', // activPackage: '0', //
Pageloading: false, // Pageloading: false, //
Packageloading: false, // Packageloading: false, //
historydialog: false, // historydialog: false, //
groundlineType: 0, //
// //
PackageList: [ PackageList: [
{ {
@ -316,12 +376,27 @@ const ruleForm = reactive({
first: [{ required: true, message: '请输入一级品', trigger: 'change' }], first: [{ required: true, message: '请输入一级品', trigger: 'change' }],
secondary: [{ required: true, message: '请输入二级品', trigger: 'change' }], secondary: [{ required: true, message: '请输入二级品', trigger: 'change' }],
brandName: [{ required: true, message: '请输入品牌', trigger: 'change' }], brandName: [{ required: true, message: '请输入品牌', trigger: 'change' }],
trainNumber: [{ required: true, message: '请选择车次号', trigger: 'change' }],
deliveryTime: [{ required: true, message: '请输入配送时间', trigger: 'change' }],
deliveryDriver: [{ required: true, message: '请输入配送司机', trigger: 'change' }],
vehicleRoute: [{ required: true, message: '请输入车辆线路', trigger: 'change' }],
deliverGoodsTime: [{ required: true, message: '请输入发货时间', trigger: 'change' }],
warehousingTime: [{ required: true, message: '请选择入库时间', trigger: 'change' }],
discoveryTime: [{ required: true, message: '请选择发现时间', trigger: 'change' }],
waybillMall: [{ required: true, message: '请输入运单商场', trigger: 'change' }],
typeServiceName: [{ required: true, message: '请输入合作模式', trigger: 'change' }],
processor: [{ required: true, message: '请输入处理方', trigger: 'change' }],
investigationPocess: [{ required: true, message: '请输入调查经过', trigger: 'change' }],
}); });
const ruleFormRef = ref(); // const ruleFormRef = ref(); //
// //
const Exceptionoptions = ref([]); const Exceptionoptions = ref([]);
// //
const Discoveringoptions = ref([]); const Discoveringoptions = ref([]);
//
const Processingoptions = ref([]);
//
const Trainoptions = ref([]);
// //
async function updateDictionary(targetArray, dictionaryType) { async function updateDictionary(targetArray, dictionaryType) {
await getDictionaryBiz(dictionaryType).then(res => { await getDictionaryBiz(dictionaryType).then(res => {
@ -333,18 +408,61 @@ async function updateDictionary(targetArray, dictionaryType) {
}); });
}); });
} }
//
const Handling = () => {
getDeptWarehouse().then(res => {
let data = [];
if (res.data.code == 200) {
if (res.data && res.data.data.length) {
res.data.data.forEach(item => {
data.push({
value: item.id,
label: item.name,
});
});
}
Processingoptions.value = deepClone(data);
}
});
};
// //
const onLoad = async () => { const onLoad = async () => {
form.value.Pageloading = true; // form.value.Pageloading = true; //
await updateDictionary(Exceptionoptions.value, 'pc_work_order'); // await updateDictionary(Exceptionoptions.value, 'pc_work_order'); //
await updateDictionary(Discoveringoptions.value, 'pc_discovery_node'); // await updateDictionary(Discoveringoptions.value, 'pc_discovery_node'); //
await Handling(); //
form.value.Pageloading = false; // form.value.Pageloading = false; //
}; };
onLoad(); onLoad();
// //
const handleClick = (tab, event) => { const handleClick = (tab, event) => {
console.log(tab, event); console.log(tab, event);
}; };
//
const DiscoveringNodesChange = value => {
console.log(value);
form.value.groundlineType = value;
};
//
const displaySettings = computed(() => {
const groundType = form.value.groundlineType;
const includesType = types => types.includes(groundType);
return {
trainNumber: includesType([3, 5, 7, 6]), //
deliveryTime: includesType([5, 7, 6]), //
deliveryDriver: includesType([5, 7, 6]), //
vehicleRoute: includesType([3]), // 线
deliverGoodsTime: includesType([2]), //
warehousingTime: includesType([4]), //
discoveryTime: includesType([4, 5, 6, 7]), //
waybillMall: true, //
typeServiceName: true, //
processor: true, //
investigationPocess: true, //
};
});
// //
const Addpackages = () => { const Addpackages = () => {
form.value.Packageloading = true; form.value.Packageloading = true;
@ -362,6 +480,7 @@ const Addpackages = () => {
}; };
form.value.PackageList.push(data); form.value.PackageList.push(data);
}; };
// //
const Removepackage = index => { const Removepackage = index => {
console.log(index, 'index'); console.log(index, 'index');
@ -390,6 +509,7 @@ const Removepackage = index => {
const ViewhistoricalPackages = () => { const ViewhistoricalPackages = () => {
form.value.historydialog = true; // form.value.historydialog = true; //
}; };
const historyPush = () => {}; const historyPush = () => {};
// //
const onSubmit = () => { const onSubmit = () => {
@ -527,14 +647,14 @@ const TabactiveClick = (a, b) => {
margin-bottom: 0; margin-bottom: 0;
} }
} }
.el_Basic{ .el_Basic {
flex: 1; flex: 1;
display: flex; display: flex;
.el_Processing{ .el_Processing {
width: 54%; width: 54%;
} }
.el_Investigation{ .el_Investigation {
flex: 1; flex: 1;
} }
} }
} }

5
src/views/distribution/checkInventoryTask/createTask.vue

@ -1592,14 +1592,15 @@ const InInputSo = (values, val) => {
const InputSo = val => { const InputSo = val => {
TcPdloading.value = true; TcPdloading.value = true;
console.log(val, '搜索框接收的值'); console.log(val, '搜索框接收的值');
console.log( UncountedDetails.value,' UncountedDetails.value');
let data = {}; let data = {};
console.log(row.value, 'row.value'); console.log(row.value, 'row.value');
data.current = TccurrentPage.value; data.current = TccurrentPage.value;
data.size = TcpageSize.value; data.size = TcpageSize.value;
let dataS = { let dataS = {
questNum: UncountedDetails.value.questNum, questNum: UncountedDetails.value?UncountedDetails.value.questNum:'',
questId: UncountedDetails.value.id, questId: UncountedDetails.value?UncountedDetails.value.id:'',
current: TccurrentPage.value, // current: TccurrentPage.value, //
size: TcpageSize.value, // size: TcpageSize.value, //
[val.prop]: val.values, [val.prop]: val.values,

Loading…
Cancel
Save