|  | @@ -2,14 +2,9 @@
 | 
		
	
		
			
			| 2 | 2 |  	<div>
 | 
		
	
		
			
			| 3 | 3 |  		<el-row>
 | 
		
	
		
			
			| 4 | 4 |  			<el-form :model="query" label-width="100px" inline="">
 | 
		
	
		
			
			| 5 |  | -				<el-form-item label="物料名称">
 | 
		
	
		
			
			| 6 |  | -					<el-input v-model="query.materialName" size="small" style="width: 300px;">
 | 
		
	
		
			
			| 7 |  | -						<el-button slot="append" icon="el-icon-search" @click="showMaterial"></el-button>
 | 
		
	
		
			
			| 8 |  | -					</el-input>
 | 
		
	
		
			
			| 9 |  | -				</el-form-item>
 | 
		
	
		
			
			| 10 |  | -				<el-form-item label="钢种">
 | 
		
	
		
			
			| 11 |  | -					<el-input v-model="query.standard" size="small" style="width: 300px;">
 | 
		
	
		
			
			| 12 |  | -						<el-button slot="append" icon="el-icon-search" @click="showMaterial"></el-button>
 | 
		
	
		
			
			|  | 5 | +				<el-form-item label="客户名称">
 | 
		
	
		
			
			|  | 6 | +					<el-input v-model="query.customerName" size="small" style="width: 300px;">
 | 
		
	
		
			
			|  | 7 | +						<el-button slot="append" icon="el-icon-search" @click="showCustomer"></el-button>
 | 
		
	
		
			
			| 13 | 8 |  					</el-input>
 | 
		
	
		
			
			| 14 | 9 |  				</el-form-item>
 | 
		
	
		
			
			| 15 | 10 |  				<el-button type="info" @click="search" size="small">查询</el-button>
 | 
		
	
	
		
			
			|  | @@ -19,11 +14,10 @@
 | 
		
	
		
			
			| 19 | 14 |  
 | 
		
	
		
			
			| 20 | 15 |  		<el-table v-loading="loading" :data="tableData" border>
 | 
		
	
		
			
			| 21 | 16 |  			<el-table-column prop="id" label="编号" width="60" v-if="isShow"></el-table-column>
 | 
		
	
		
			
			| 22 |  | -			<el-table-column prop="material.name" label="物料" width="180" show-overflow-tooltip ></el-table-column>
 | 
		
	
		
			
			| 23 |  | -			<el-table-column prop="material.standard" label="钢种" width="180" show-overflow-tooltip ></el-table-column>
 | 
		
	
		
			
			| 24 |  | -			<el-table-column prop="storageType" label="类型" width="180" show-overflow-tooltip align="center" :formatter="typeFormatter"></el-table-column>
 | 
		
	
		
			
			| 25 |  | -			<el-table-column prop="storagePrice" label="价格" width="100" show-overflow-tooltip align="right"></el-table-column>
 | 
		
	
		
			
			| 26 |  | -				<el-table-column prop="weightPrice" label="价格" width="100" show-overflow-tooltip align="right"></el-table-column>
 | 
		
	
		
			
			|  | 17 | +			<el-table-column prop="customer.name" label="客户名称" width="180" show-overflow-tooltip ></el-table-column>
 | 
		
	
		
			
			|  | 18 | +			<el-table-column prop="keepDay" label="保存天数" width="180" show-overflow-tooltip ></el-table-column>
 | 
		
	
		
			
			|  | 19 | +			<el-table-column prop="ordPrice" label="价格" width="180" show-overflow-tooltip ></el-table-column>
 | 
		
	
		
			
			|  | 20 | +			<el-table-column prop="outOrdPrice" label="超期价格" width="180" show-overflow-tooltip ></el-table-column>
 | 
		
	
		
			
			| 27 | 21 |  			<el-table-column prop="addUser.userDesc" label="添加人" width="120" show-overflow-tooltip ></el-table-column>
 | 
		
	
		
			
			| 28 | 22 |  			<el-table-column prop="addTime" label="添加时间" width="200" show-overflow-tooltip ></el-table-column>
 | 
		
	
		
			
			| 29 | 23 |  			<el-table-column label="操作" width="200">
 | 
		
	
	
		
			
			|  | @@ -42,32 +36,24 @@
 | 
		
	
		
			
			| 42 | 36 |  
 | 
		
	
		
			
			| 43 | 37 |  		<!-- 弹出框  另起名字  var json = JSON.stringify(this.自己起的名字)
 | 
		
	
		
			
			| 44 | 38 |          var url = 后台对应的url 'MaintPrice/save.do' -->
 | 
		
	
		
			
			| 45 |  | -		<el-dialog title="物料明细" :visible.sync="dialogVisible" width="500px">
 | 
		
	
		
			
			|  | 39 | +		<el-dialog title="价格配置" :visible.sync="dialogVisible" width="500px">
 | 
		
	
		
			
			| 46 | 40 |  			<el-form :model="obj" label-width="100px">
 | 
		
	
		
			
			| 47 | 41 |  				<el-form-item label="id" v-if="isShow">
 | 
		
	
		
			
			| 48 | 42 |  					<el-input v-model="obj.id"></el-input>
 | 
		
	
		
			
			| 49 | 43 |  				</el-form-item>
 | 
		
	
		
			
			| 50 |  | -				<el-form-item label="物料">
 | 
		
	
		
			
			| 51 |  | -					<el-input v-model="obj.material.name" style="width: 300px;">
 | 
		
	
		
			
			| 52 |  | -						<el-button slot="append" icon="el-icon-search" @click="showMaterialDialog"></el-button>
 | 
		
	
		
			
			|  | 44 | +				<el-form-item label="客户名称">
 | 
		
	
		
			
			|  | 45 | +					<el-input v-model="obj.customer.name" style="width: 300px;">
 | 
		
	
		
			
			|  | 46 | +						<el-button slot="append" icon="el-icon-search" @click="showCustomerDialog"></el-button>
 | 
		
	
		
			
			| 53 | 47 |  					</el-input>
 | 
		
	
		
			
			| 54 | 48 |  				</el-form-item>
 | 
		
	
		
			
			| 55 |  | -				<el-form-item label="钢种">
 | 
		
	
		
			
			| 56 |  | -					<el-input v-model="obj.material.standard" style="width: 300px;">
 | 
		
	
		
			
			| 57 |  | -						<el-button slot="append" icon="el-icon-search" @click="showMaterialDialog"></el-button>
 | 
		
	
		
			
			| 58 |  | -					</el-input>
 | 
		
	
		
			
			|  | 49 | +				<el-form-item label="保存时间">
 | 
		
	
		
			
			|  | 50 | +					<el-input v-model="obj.keepDay" style="width: 300px;"></el-input>
 | 
		
	
		
			
			| 59 | 51 |  				</el-form-item>
 | 
		
	
		
			
			| 60 |  | -				<el-form-item label="类型">
 | 
		
	
		
			
			| 61 |  | -					<el-select v-model="obj.storageType" placeholder="请选择" style="width: 300px;">
 | 
		
	
		
			
			| 62 |  | -						<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
 | 
		
	
		
			
			| 63 |  | -						</el-option>
 | 
		
	
		
			
			| 64 |  | -					</el-select>
 | 
		
	
		
			
			|  | 52 | +				<el-form-item label="价格">
 | 
		
	
		
			
			|  | 53 | +					<el-input v-model="obj.ordPrice" style="width: 300px;"></el-input>
 | 
		
	
		
			
			| 65 | 54 |  				</el-form-item>
 | 
		
	
		
			
			| 66 |  | -				<el-form-item label="库存单价">
 | 
		
	
		
			
			| 67 |  | -					<el-input v-model="obj.storagePrice" style="width: 300px;"></el-input>
 | 
		
	
		
			
			| 68 |  | -				</el-form-item>
 | 
		
	
		
			
			| 69 |  | -				<el-form-item label="过磅单价">
 | 
		
	
		
			
			| 70 |  | -					<el-input v-model="obj.weightPrice" style="width: 300px;"></el-input>
 | 
		
	
		
			
			|  | 55 | +				<el-form-item label="超期价格">
 | 
		
	
		
			
			|  | 56 | +					<el-input v-model="obj.outOrdPrice" style="width: 300px;"></el-input>
 | 
		
	
		
			
			| 71 | 57 |  				</el-form-item>
 | 
		
	
		
			
			| 72 | 58 |  				<el-form-item>
 | 
		
	
		
			
			| 73 | 59 |  					<el-button type="success" @click="handleSave">保存</el-button>
 | 
		
	
	
		
			
			|  | @@ -75,18 +61,26 @@
 | 
		
	
		
			
			| 75 | 61 |  				</el-form-item>
 | 
		
	
		
			
			| 76 | 62 |  			</el-form>
 | 
		
	
		
			
			| 77 | 63 |  		</el-dialog>
 | 
		
	
		
			
			|  | 64 | +
 | 
		
	
		
			
			|  | 65 | +
 | 
		
	
		
			
			| 78 | 66 |  		<popup-material ref="PopupMaterial" @receviceFromChild="receviceFromMaterial"></popup-material>
 | 
		
	
		
			
			|  | 67 | +		<popup-customer ref="PopupCustomer" @receviceFromChild="receviceFromCustomer"></popup-customer>
 | 
		
	
		
			
			| 79 | 68 |  		<popup-material-dialog ref="PopupMaterialDialog" @receviceFromChild="receviceFromMaterialDialog"></popup-material-dialog>
 | 
		
	
		
			
			|  | 69 | +		<popup-customer-dialog ref="PopupCustomerDialog" @receviceFromChild="receviceFromCustomerDialog"></popup-customer-dialog>
 | 
		
	
		
			
			| 80 | 70 |  	</div>
 | 
		
	
		
			
			| 81 | 71 |  </template>
 | 
		
	
		
			
			| 82 | 72 |  <script>
 | 
		
	
		
			
			| 83 | 73 |  	import axios from '@/axios'
 | 
		
	
		
			
			| 84 | 74 |  	import PopupMaterial from '@/components/PopupMaterial.vue'
 | 
		
	
		
			
			| 85 | 75 |  	import PopupMaterialDialog from '@/components/PopupMaterial.vue'
 | 
		
	
		
			
			|  | 76 | +	import PopupCustomer from '@/components/PopupCustomer.vue'
 | 
		
	
		
			
			|  | 77 | +	import PopupCustomerDialog from '@/components/PopupCustomer.vue'
 | 
		
	
		
			
			| 86 | 78 |  	export default {
 | 
		
	
		
			
			| 87 | 79 |  		components: {
 | 
		
	
		
			
			| 88 | 80 |  			PopupMaterial,
 | 
		
	
		
			
			| 89 |  | -			PopupMaterialDialog
 | 
		
	
		
			
			|  | 81 | +			PopupCustomer,
 | 
		
	
		
			
			|  | 82 | +			PopupMaterialDialog,
 | 
		
	
		
			
			|  | 83 | +			PopupCustomerDialog
 | 
		
	
		
			
			| 90 | 84 |  		},
 | 
		
	
		
			
			| 91 | 85 |  		data() {
 | 
		
	
		
			
			| 92 | 86 |  			return {
 | 
		
	
	
		
			
			|  | @@ -104,22 +98,20 @@
 | 
		
	
		
			
			| 104 | 98 |  				pageSize: 50,
 | 
		
	
		
			
			| 105 | 99 |  				//查询条件
 | 
		
	
		
			
			| 106 | 100 |  				query: {
 | 
		
	
		
			
			| 107 |  | -					material: '',
 | 
		
	
		
			
			| 108 |  | -					standard: '',
 | 
		
	
		
			
			|  | 101 | +					customerName: ''
 | 
		
	
		
			
			| 109 | 102 |  				},
 | 
		
	
		
			
			| 110 | 103 |  				//录入框
 | 
		
	
		
			
			| 111 | 104 |  				dialogVisible: false,
 | 
		
	
		
			
			| 112 | 105 |  				isShow: false,
 | 
		
	
		
			
			| 113 | 106 |  				loading: true,
 | 
		
	
		
			
			| 114 | 107 |  				obj: {
 | 
		
	
		
			
			| 115 |  | -					material: {
 | 
		
	
		
			
			|  | 108 | +					customer: {
 | 
		
	
		
			
			| 116 | 109 |  						id: '',
 | 
		
	
		
			
			| 117 | 110 |  						name: '',
 | 
		
	
		
			
			| 118 |  | -						standard: '',
 | 
		
	
		
			
			| 119 | 111 |  					},
 | 
		
	
		
			
			| 120 |  | -					storagePrice: '',
 | 
		
	
		
			
			| 121 |  | -					storageType: '',
 | 
		
	
		
			
			| 122 |  | -					weightType: '',
 | 
		
	
		
			
			|  | 112 | +					keepDay: '',
 | 
		
	
		
			
			|  | 113 | +					ordPrice: '',
 | 
		
	
		
			
			|  | 114 | +					outOrdPrice: '',
 | 
		
	
		
			
			| 123 | 115 |  				},
 | 
		
	
		
			
			| 124 | 116 |  
 | 
		
	
		
			
			| 125 | 117 |  			}
 | 
		
	
	
		
			
			|  | @@ -143,26 +135,38 @@
 | 
		
	
		
			
			| 143 | 135 |  			showMaterial() {
 | 
		
	
		
			
			| 144 | 136 |  				this.$refs.PopupMaterial.show()
 | 
		
	
		
			
			| 145 | 137 |  			},
 | 
		
	
		
			
			|  | 138 | +			showCustomer() {
 | 
		
	
		
			
			|  | 139 | +				this.$refs.PopupCustomer.show()
 | 
		
	
		
			
			|  | 140 | +			},
 | 
		
	
		
			
			| 146 | 141 |  			receviceFromMaterial(material) {
 | 
		
	
		
			
			| 147 | 142 |  				this.query.materialName = material.name
 | 
		
	
		
			
			| 148 | 143 |  				this.query.standard = material.standard
 | 
		
	
		
			
			| 149 | 144 |  			},
 | 
		
	
		
			
			|  | 145 | +			receviceFromCustomer(customer) {
 | 
		
	
		
			
			|  | 146 | +				this.query.customerName = customer.name
 | 
		
	
		
			
			|  | 147 | +			},
 | 
		
	
		
			
			| 150 | 148 |  			showMaterialDialog() {
 | 
		
	
		
			
			| 151 | 149 |  				this.$refs.PopupMaterialDialog.show()
 | 
		
	
		
			
			| 152 | 150 |  			},
 | 
		
	
		
			
			|  | 151 | +			showCustomerDialog() {
 | 
		
	
		
			
			|  | 152 | +				this.$refs.PopupCustomerDialog.show()
 | 
		
	
		
			
			|  | 153 | +			},
 | 
		
	
		
			
			| 153 | 154 |  			receviceFromMaterialDialog(material) {
 | 
		
	
		
			
			| 154 | 155 |  				this.obj.material.id = material.id
 | 
		
	
		
			
			| 155 | 156 |  				this.obj.material.name = material.name
 | 
		
	
		
			
			| 156 | 157 |  				this.obj.material.standard = material.standard
 | 
		
	
		
			
			| 157 | 158 |  			},
 | 
		
	
		
			
			|  | 159 | +			receviceFromCustomerDialog(customer) {
 | 
		
	
		
			
			|  | 160 | +				this.obj.customer.id = customer.id
 | 
		
	
		
			
			|  | 161 | +				this.obj.customer.name = customer.name
 | 
		
	
		
			
			|  | 162 | +			},
 | 
		
	
		
			
			| 158 | 163 |  			getTableData() {
 | 
		
	
		
			
			| 159 | 164 |  				this.loading = true
 | 
		
	
		
			
			| 160 | 165 |  				var url = 'MaintPrice/query.do'
 | 
		
	
		
			
			| 161 | 166 |  				var param = {
 | 
		
	
		
			
			| 162 | 167 |  					page: this.currentPage,
 | 
		
	
		
			
			| 163 | 168 |  					rows: this.pageSize,
 | 
		
	
		
			
			| 164 |  | -					materialName: this.query.material,
 | 
		
	
		
			
			| 165 |  | -					standard: this.query.standard,
 | 
		
	
		
			
			|  | 169 | +					materialName: this.query.customerName,
 | 
		
	
		
			
			| 166 | 170 |  				}
 | 
		
	
		
			
			| 167 | 171 |  				axios.get(url, param).then(response => {
 | 
		
	
		
			
			| 168 | 172 |  					if (response.data.code == 0) {
 | 
		
	
	
		
			
			|  | @@ -198,7 +202,7 @@
 | 
		
	
		
			
			| 198 | 202 |  					json: json
 | 
		
	
		
			
			| 199 | 203 |  				}
 | 
		
	
		
			
			| 200 | 204 |  				axios.post(url, param).then(response => {
 | 
		
	
		
			
			| 201 |  | -					alert(JSON.stringify(response))
 | 
		
	
		
			
			|  | 205 | +					//alert(JSON.stringify(response))
 | 
		
	
		
			
			| 202 | 206 |  					if (response.data.code == 0) {
 | 
		
	
		
			
			| 203 | 207 |  						this.$message({
 | 
		
	
		
			
			| 204 | 208 |  							type: 'success',
 | 
		
	
	
		
			
			|  | @@ -226,13 +230,13 @@
 | 
		
	
		
			
			| 226 | 230 |  			handleAdd() {
 | 
		
	
		
			
			| 227 | 231 |  				this.dialogVisible = true
 | 
		
	
		
			
			| 228 | 232 |  				this.obj = {
 | 
		
	
		
			
			| 229 |  | -					material: {
 | 
		
	
		
			
			|  | 233 | +					customer: {
 | 
		
	
		
			
			| 230 | 234 |  						id: '',
 | 
		
	
		
			
			| 231 | 235 |  						name: '',
 | 
		
	
		
			
			| 232 |  | -						standard: '',
 | 
		
	
		
			
			| 233 | 236 |  					},
 | 
		
	
		
			
			| 234 |  | -					storagePrice: '',
 | 
		
	
		
			
			| 235 |  | -					storageType: '',
 | 
		
	
		
			
			|  | 237 | +					keepDay: '',
 | 
		
	
		
			
			|  | 238 | +					ordPrice: '',
 | 
		
	
		
			
			|  | 239 | +					outOrdPrice: '',
 | 
		
	
		
			
			| 236 | 240 |  				}
 | 
		
	
		
			
			| 237 | 241 |  
 | 
		
	
		
			
			| 238 | 242 |  			},
 |