AlanWong před 1 rokem
rodič
revize
1437321589

+ 63 - 11
src/views/audit/depots/index.vue

@@ -5,7 +5,7 @@
 				@resert="getDataList" @detail="openEdit" @onRefresh="onRefresh">
 			</module-view>
 			<!-- 注册/编辑弹窗 -->
-			<el-dialog :title="popTitle+'仓库'" :visible.sync="dialogFormVisible" width="30%">
+			<el-dialog :title="popTitle+'仓库'" :visible.sync="dialogFormVisible" width="960px" height="450px">
 				<by-form :propConfig="addConfig" ref="addFormId"></by-form>
 				<div slot="footer" class="dialog-footer">
 					<el-button @click="dialogFormVisible = false">取 消</el-button>
@@ -110,28 +110,53 @@
 					triggerRowCheck: 'row'
 				},
 				columns: [{
+					width: 200,
 					title: '名称',
 					field: 'name',
 					isDetail: true,
 				},
 				{
+					width: 120,
 					title: '第三方仓库名称',
 					field: 'financeStorehouseName',
 				},
 				{
+					width: 120,
 					title: '第三方系统名称',
 					field: 'financeType',
 				},
 				{
+					width: 120,
 					title: '第三方仓库编码',
 					field: 'financeStorehouseNo',
 				},
 				{
+					width: 120,
+					title: '省',
+					field: 'tmsShipmentProvince',
+				},
+				{
+					width: 120,
+					title: '市',
+					field: 'tmsShipmentCity',
+				},
+				{
+					width: 150,
+					title: '县/区',
+					field: 'tmsShipmentRegion',
+				},
+				{
+					width: 150,
+					title: '街道',
+					field: 'tmsShipmentStreet',
+				},
+				{
+					width: 200,
 					title: '地址',
 					field: 'address',
 				},
 				{
-					width: 100,
+					width: 70,
 					title: '仓位',
 					action: true,
 					plugins: [{
@@ -145,7 +170,7 @@
 						}
 					}]
 				}, {
-					width: 120,
+					width: 104,
 					title: '操作',
 					action: true,
 					plugins: [{
@@ -294,44 +319,68 @@
 						required: true, message: '请输入名称', trigger: 'blur'
 					}],
 					address: [{
-						required: true, message: '请输入地址', trigger: 'blur'
-					}]
+						required: true, message: '请输入详细地址', trigger: 'blur'
+					}],
+					tmsShipmentProvince: [{
+						required: true, message: '请选择仓库地址', trigger: 'change'
+					}],
 				}
 			},
 			columns: [
 				[
 					{
-						span: 23,
+						span: 24,
 						labelWidth: '110px',
 						label: '名称',
 						prop: 'name',
 						component: 'by-input',
 					},
 					{
-						span: 23,
+						span: 24,
 						labelWidth: '110px',
 						label: '第三方仓库名称',
 						prop: 'financeStorehouseName',
 						component: 'by-input',
 					},
 					{
-						span: 23,
+						span: 24,
 						labelWidth: '110px',
 						label: '第三方系统名称',
 						prop: 'financeType',
 						component: 'by-input',
 					},
 					{
-						span: 23,
+						span: 24,
 						labelWidth: '110px',
 						label: '第三方仓库编码',
 						prop: 'financeStorehouseNo',
 						component: 'by-input',
 					},
+				],
+				[{
+					labelWidth: '110px',
+					label: '仓库地址',
+					prop: 'tmsShipmentProvince',
+					component: 'by-area',
+					compConfig: {
+						attr: {
+							province: 'tmsShipmentProvince', //省
+							provinceCode: 'tmsShipmentProvinceNo', //省编码
+							city: 'tmsShipmentCity',   //市
+							cityCode: 'tmsShipmentCityNo',  //市编码
+							county: 'tmsShipmentRegion',  //县/区
+							countyCode: 'tmsShipmentRegionNo',   //县/区编码
+							town: 'tmsShipmentStreet', //街道
+							townCode: 'tmsShipmentStreetNo', //街道编码
+						}
+					}
+				},
+				],
+				[
 					{
-						span: 23,
+						span: 24,
 						labelWidth: '110px',
-						label: '地址',
+						label: '详细地址',
 						prop: 'address',
 						component: 'by-input',
 					},
@@ -409,6 +458,7 @@
 		confirm() {
 			(this as any).$refs.addFormId.validate().then(() => {
 				let query = (this as any).$refs.addFormId.getValue();
+				console.log(query);
 				this.dialogFormVisible = false;
 				if (this.popTitle === '注册') {
 					let loading = this.$loading({ target: '.main-container' });
@@ -592,6 +642,8 @@
 		openEdit(e : any) {
 			this.popTitle = '编辑'
 			this.dialogFormVisible = true;
+			e.tmsShipmentProvince = "北京市"
+			e.tmsShipmentProvinceNo= "110000"
 			setTimeout(() => {
 				if ((this as any).$refs.addFormId) (this as any).$refs.addFormId.setValue(e);
 			}, 0)

+ 74 - 0
src/views/audit/productManagement/components/selectKin.vue

@@ -0,0 +1,74 @@
+<template>
+	<div class="clearfix parentC">
+		<div class="selectC" @click="vxeValue = true;">选择</div>
+		<vxe-modal v-model="vxeValue" width="60%" height="70%" show-zoom resize transfer show-footer>
+			<template #title>
+				<span>选择数据</span>
+			</template>
+			<template #default>
+				<by-table :propConfig="config" ref="form" style="margin-top: 10px;"></by-table>
+			</template>
+			<template #footer>
+				<div class="btn">
+					<el-button size="small" @click="vxeValue=false">取消</el-button>
+					<el-button type="primary" size="small" @click="doConfirm">确定</el-button>
+				</div>
+			</template>
+		</vxe-modal>
+	</div>
+</template>
+
+<script lang="ts">
+	import { Component, Prop, Vue, Watch } from "vue-property-decorator";
+	import api from "@/api/order";
+	@Component
+	export default class SelectKin extends Vue {
+		vxeValue : any = false
+		@Prop()
+		propValue : any;
+		@Prop()
+		parentValue : any;
+		@Prop()
+		propConfig : any;
+
+		config = {}
+		created() {
+			// console.log(this.getPropConfig());
+		}
+		// 打开弹窗
+		openModal() {
+			let data = (this as any).$lodash.cloneDeep(this.propValue);
+			console.log(this.parentValue);
+
+			this.vxeValue = true;
+		}
+		// 确定仓库仓位
+		doConfirm() {
+			// let data : any = (this as any).$refs.form.getValue();
+			// this.$emit('onChange', data);
+			this.vxeValue = false;
+		}
+	}
+</script>
+
+<style scoped lang="scss">
+	.parentC {
+		display: flex;
+		align-items: center;
+
+		.inputC {
+			float: left;
+			width: calc(100% - 54px);
+		}
+
+		.selectC {
+			float: left;
+			margin-left: -10px;
+			color: #fff;
+			background-color: #0089ff;
+			padding: 0 10px;
+			border-radius: 12px;
+			cursor: pointer;
+		}
+	}
+</style>